Commit 77f3700c authored by fanjr's avatar fanjr

修改

parents 637ec26a a0367b59
......@@ -87,13 +87,13 @@
id="name" name="name"
placeholder="检测券名称"
value="$!{data.name}"
#if($!{pageType}== 'View') readonly="readonly" #end />
#if($!{pageType}== 'true') readonly="readonly" #end />
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="takeEffectYear">生效年</label>
<label for="takeEffectYear">有效期(年)</label>
<select class="form-control" name="takeEffectYear" id="takeEffectYear"
#if($!{pageType}== 'View') disabled="disabled" #end>
#if($!{pageType}== 'true') disabled="disabled" #end>
<option value="">请选择</option>
<option value="1" #if($!{data.takeEffectYear}==
'1') selected="selected" #end>1</option>
......@@ -105,9 +105,9 @@
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="takeEffectMonth">生效月</label>
<label for="takeEffectMonth">有效期(月)</label>
<select class="form-control select2" name="takeEffectMonth"
id="takeEffectMonth" #if($!{pageType}== 'View') disabled="disabled"
id="takeEffectMonth" #if($!{pageType}== 'true') disabled="disabled"
#end>
<option value="">请选择</option>
<option value="1" #if($!{data.takeEffectMonth}==
......@@ -138,9 +138,9 @@
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="expireMonth">过期月</label>
<label for="expireMonth">第一张券延期使用时间(月)</label>
<select class="form-control select2" name="expireMonth" id="expireMonth"
#if($!{pageType}== 'View') disabled="disabled" #end>
#if($!{pageType}== 'true') disabled="disabled" #end>
<option value="">请选择</option>
<option value="1" #if($!{data.expireMonth}==
'1') selected="selected" #end>1</option>
......@@ -170,14 +170,34 @@
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="type">检测券类型</label>
<select class="form-control select2" name="type" id="type"
#if($!{pageType}== 'View') disabled="disabled" #end>
<label for="expireTwoMonth">第二张券延期使用时间(月)</label>
<select class="form-control select2" name="expireTwoMonth" id="expireTwoMonth"
#if($!{pageType}== 'true') disabled="disabled" #end>
<option value="">请选择</option>
<option value="1" #if($!{data.type}==
'1') selected="selected" #end>第一张</option>
<option value="2" #if($!{data.type}==
'2') selected="selected" #end>第二张</option>
<option value="1" #if($!{data.expireTwoMonth}==
'1') selected="selected" #end>1</option>
<option value="2" #if($!{data.expireTwoMonth}==
'2') selected="selected" #end>2</option>
<option value="3" #if($!{data.expireTwoMonth}==
'3') selected="selected" #end>3</option>
<option value="4" #if($!{data.expireTwoMonth}==
'4') selected="selected" #end>4</option>
<option value="5" #if($!{data.expireTwoMonth}==
'5') selected="selected" #end>5</option>
<option value="6" #if($!{data.expireTwoMonth}==
'6') selected="selected" #end>6</option>
<option value="7" #if($!{data.expireTwoMonth}==
'7') selected="selected" #end>7</option>
<option value="8" #if($!{data.expireTwoMonth}==
'8') selected="selected" #end>8</option>
<option value="9" #if($!{data.expireTwoMonth}==
'9') selected="selected" #end>9</option>
<option value="10" #if($!{data.expireTwoMonth}==
'10') selected="selected" #end>10</option>
<option value="11" #if($!{data.expireTwoMonth}==
'11') selected="selected" #end>11</option>
<option value="12" #if($!{data.expireTwoMonth}==
'12') selected="selected" #end>12</option>
</select>
</div>
......@@ -186,8 +206,8 @@
<div class="form-group form-md-line-input col-xs-12">
<label for="remarks">描述</label>
<textarea class="form-control" rows="3" id="remarks" name="remarks"
#if($!{pageType}== 'View') readonly="readonly"
#end>$!{data.instructions}</textarea>
#if($!{pageType}== 'true') readonly="readonly"
#end>$!{data.remarks}</textarea>
</div>
<br/>
......@@ -195,7 +215,7 @@
<div class="form-group form-md-line-input col-xs-12">
<label for="instructions">使用说明</label>
<textarea class="form-control" rows="3" id="instructions"
name="instructions" #if($!{pageType}== 'View') readonly="readonly"
name="instructions" #if($!{pageType}== 'true') readonly="readonly"
#end>$!{data.instructions}</textarea>
</div>
......@@ -250,9 +270,48 @@
<script src="common/js/cfapp.js"></script>
<!-- END PAGE LEVEL PLUGINS -->
<script>
//通过系统获取换行符
function getSpaceBySystem(){
let space = "";
let browser = navigator.appName;
let b_version = navigator.appVersion;
let version = b_version.split(";");
let trim_Version = version[1].replace(/[ ]/g,"");
if(browser=="Microsoft Internet Explorer" && (trim_Version=="MSIE7.0" || trim_Version=="MSIE8.0"))
{
space = '\r\n';
} else
{
space = '\n';
}
let remarks = "$!{data.remarks}";
if (remarks != null && remarks != "") {
if (space == '\r\n') {
remarks = remarks.replace(/<br>/g, '\r\n'); //IE9、FF、chrome
} else {
remarks = remarks.replace(/<br>/g, '\n'); //IE7-8
}
$("#remarks").text(remarks);
}
let instructions = "$!{data.instructions}";
if (instructions != null && instructions != "") {
if (space == '\r\n') {
instructions = instructions.replace(/<br>/g, '\r\n'); //IE9、FF、chrome
} else {
instructions = instructions.replace(/<br>/g, '\n'); //IE7-8
}
$("#instructions").text(instructions);
}
}
$().ready(function () {
Cfapp.init();
recdTypeAdd.init();
getSpaceBySystem();
});
......
......@@ -86,7 +86,7 @@
<div class="col-xs-2">
<button type="button" class="search btn btn-primary">搜索</button>
#if($shiro.hasPermission("qy:checkcoupon:edit"))
<a href="#springUrl('/a/checkcoupon/form')" class="btn btn-primary">新增</a>
<!-- <a href="#springUrl('/a/checkcoupon/form')" class="btn btn-primary">新增</a>-->
<!-- <a href="#springUrl('/a/checkcoupon/exportExcel')" class="btn btn-primary">导出</a>-->
<!-- <a onclick="importExcel();" class="btn btn-primary">导入</a>-->
#end
......@@ -99,10 +99,10 @@
<tr>
<td hidden="true">Id</td>
<th>检测券名称</th>
<th>生效年</th>
<th>生效月</th>
<th>过期月</th>
<th>检测券类型</th>
<th>有效期(年)</th>
<th>有效期(月)</th>
<th>第一张券延期使用(月)</th>
<th>第二章券延期使用(月)</th>
<th>描述</th>
<th>使用说明</th>
<th>创建时间</th>
......@@ -198,6 +198,9 @@
"sAjaxSource": sSource,
"fnServerData": retrieveData,
"pagingType": "full_numbers",
// "autoWidth": true,
// "scrollX": true,
// "sScrollY": false,
"aoColumns": [
{
"mData": "id"
......
......@@ -4,11 +4,11 @@ import com.cftech.checkcoupon.model.Checkcoupon;
import com.cftech.core.generic.GenericDao;
/**
* 检测券管理Mapper
*
* @author Strive
* @date: 2021-01-25 14:42
*/
* 检测券管理Mapper
*
* @author Strive
* @date: 2021-01-25 14:42
*/
public interface CheckcouponMapper extends GenericDao<Checkcoupon> {
}
\ No newline at end of file
......@@ -7,6 +7,7 @@
<result column="take_effect_month" property="takeEffectMonth"/>
<result column="take_effect_year" property="takeEffectYear"/>
<result column="expire_month" property="expireMonth"/>
<result column="expire_two_month" property="expireTwoMonth"/>
<result column="type" property="type"/>
<result column="name" property="name"/>
<result column="remarks" property="remarks"/>
......@@ -49,11 +50,11 @@
</sql>
<sql id="sqlColumns">
id
,
id,
take_effect_month,
take_effect_year,
expire_month,
expire_two_month,
type,
name,
remarks,
......@@ -81,6 +82,7 @@
#{takeEffectMonth, jdbcType=VARCHAR},
#{takeEffectYear, jdbcType=VARCHAR},
#{expireMonth, jdbcType=VARCHAR},
#{expireTwoMonth, jdbcType=VARCHAR},
#{type, jdbcType=VARCHAR},
#{name, jdbcType=VARCHAR},
#{remarks, jdbcType=VARCHAR},
......@@ -104,9 +106,8 @@
</select>
<select id="count" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT COUNT(1) FROM t_aidea_check_coupon
SELECT COUNT(1) FROM t_aidea_check_coupon t
<include refid="sqlWhere"/>
</select>
<select id="fetchSearchByPage" parameterType="java.util.Map" resultMap="resultMap">
......@@ -133,6 +134,9 @@
<if test="expireMonth != null">
expire_month = #{expireMonth, jdbcType=VARCHAR},
</if>
<if test="expireTwoMonth != null">
expire_two_month = #{expireTwoMonth, jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type, jdbcType=VARCHAR},
</if>
......
......@@ -18,14 +18,17 @@ public class Checkcoupon implements Serializable {
/* 主键id */
private Long id;
/* 有效期年 */
@ExportConfig(value = "有效期", width = 100, showLevel = 1)
@ExportConfig(value = "有效期(年)", width = 100, showLevel = 1)
private String takeEffectYear;
/* 生效月 */
@ExportConfig(value = "生效月", width = 100, showLevel = 1)
@ExportConfig(value = "有效期(月)", width = 100, showLevel = 1)
private String takeEffectMonth;
/* 过期月份 */
@ExportConfig(value = "过期月份", width = 100, showLevel = 1)
@ExportConfig(value = "第一张券延期(月)", width = 100, showLevel = 1)
private String expireMonth;
/* 使用说明 */
@ExportConfig(value = "第二张券延期(月)", width = 100, showLevel = 1)
private String expireTwoMonth;
/* 检测券类型 */
@ExportConfig(value = "检测券类型", width = 100, showLevel = 1)
private String type;
......
......@@ -2,13 +2,13 @@ package com.cftech.checkcoupon.service;
import com.cftech.checkcoupon.model.Checkcoupon;
import com.cftech.core.generic.GenericService;
/**
* 检测券管理Service
*
* @author Strive
* @date: 2021-01-25 14:42
*/
* 检测券管理Service
*
* @author Strive
* @date: 2021-01-25 14:42
*/
public interface CheckcouponService extends GenericService<Checkcoupon> {
}
......@@ -11,21 +11,21 @@ import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
/**
* 检测券管理ServiceImpl
*
* @author Strive
* @date: 2021-01-25 14:42
*/
* 检测券管理ServiceImpl
*
* @author Strive
* @date: 2021-01-25 14:42
*/
@Service("checkcouponService")
public class CheckcouponServiceImpl extends GenericServiceImpl<Checkcoupon> implements CheckcouponService {
@Autowired
@Qualifier("checkcouponMapper")
private CheckcouponMapper checkcouponMapper;
@Autowired
@Qualifier("checkcouponMapper")
private CheckcouponMapper checkcouponMapper;
@Override
public GenericDao<Checkcoupon> getGenericMapper() {
return checkcouponMapper;
}
@Override
public GenericDao<Checkcoupon> getGenericMapper() {
return checkcouponMapper;
}
}
\ No newline at end of file
......@@ -18,10 +18,10 @@ public class LogoConfig {
/**
* 设置 logo
*
* @param matrixImage 源二维码图片
* @return 返回带有logo的二维码图片
* @throws IOException
* @author Administrator sangwenhao
*/
public BufferedImage LogoMatrix(BufferedImage matrixImage) throws IOException {
/**
......@@ -38,23 +38,23 @@ public class LogoConfig {
BufferedImage logo = ImageIO.read(new File("E:\\logo.png"));
//开始绘制图片
g2.drawImage(logo,matrixWidth/5*2,matrixHeigh/5*2, matrixWidth/5, matrixHeigh/5, null);//绘制
g2.drawImage(logo, matrixWidth / 5 * 2, matrixHeigh / 5 * 2, matrixWidth / 5, matrixHeigh / 5, null);//绘制
BasicStroke stroke = new BasicStroke(5, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
g2.setStroke(stroke);// 设置笔画对象
//指定弧度的圆角矩形
RoundRectangle2D.Float round = new RoundRectangle2D.Float(matrixWidth/5*2, matrixHeigh/5*2, matrixWidth/5, matrixHeigh/5,20,20);
RoundRectangle2D.Float round = new RoundRectangle2D.Float(matrixWidth / 5 * 2, matrixHeigh / 5 * 2, matrixWidth / 5, matrixHeigh / 5, 20, 20);
g2.setColor(Color.white);
g2.draw(round);// 绘制圆弧矩形
//设置logo 有一道灰色边框
BasicStroke stroke2 = new BasicStroke(1, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
g2.setStroke(stroke2);// 设置笔画对象
RoundRectangle2D.Float round2 = new RoundRectangle2D.Float(matrixWidth/5*2+2, matrixHeigh/5*2+2, matrixWidth/5-4, matrixHeigh/5-4,20,20);
g2.setColor(new Color(128,128,128));
RoundRectangle2D.Float round2 = new RoundRectangle2D.Float(matrixWidth / 5 * 2 + 2, matrixHeigh / 5 * 2 + 2, matrixWidth / 5 - 4, matrixHeigh / 5 - 4, 20, 20);
g2.setColor(new Color(128, 128, 128));
g2.draw(round2);// 绘制圆弧矩形
g2.dispose();
matrixImage.flush() ;
return matrixImage ;
matrixImage.flush();
return matrixImage;
}
}
......@@ -46,7 +46,7 @@ public class MatrixToImageWriter {
if (!ImageIO.write(image, format, file)) {
throw new IOException("Could not write an image of format " + format + " to " + file);
}else{
} else {
log.info("图片生成成功!");
return true;
}
......
......@@ -32,6 +32,7 @@ public class QrcodeUtil {
/**
* 对应卡券编码
*
* @param contents
* @return
* @throws WriterException
......
......@@ -65,7 +65,7 @@ public class CheckcouponController {
Checkcoupon checkcoupon = checkcouponService.fetchById(id);
model.addAttribute("data", checkcoupon);
}
model.addAttribute("isView", pageType.equals("View") ? true : false);//是否查看页面
model.addAttribute("pageType", pageType.equals("View") ? true : false);//是否查看页面
return "checkcoupon/checkcouponform";
}
......@@ -77,6 +77,19 @@ public class CheckcouponController {
Long accountsId = UserUtils.getmpaccounts(request);
JSONObject rtnJson = new JSONObject();
try {
//替换文本域中换行符
if (StringUtils.isNoneBlank(checkcoupon.getRemarks())) {
String remarks = checkcoupon.getRemarks()//
.replaceAll("\r\n", "<br>")
.replaceAll("\n", "<br>");
checkcoupon.setRemarks(remarks);
}
if (StringUtils.isNoneBlank(checkcoupon.getInstructions())) {
String instructions = checkcoupon.getInstructions()//
.replaceAll("\r\n", "<br>")
.replaceAll("\n", "<br>");
checkcoupon.setInstructions(instructions);
}
if (checkcoupon != null && checkcoupon.getId() != null) {
checkcoupon.setUpdateBy(UserUtils.getUser().getId());
checkcouponService.update(checkcoupon);
......@@ -108,12 +121,12 @@ public class CheckcouponController {
public JSONObject listData(int iDisplayStart, int iDisplayLength, Checkcoupon checkcoupon, HttpServletRequest request) {
Long accountsId = UserUtils.getmpaccounts(request);
Conds conds = new Conds();
conds.equal("del_flag", Constants.DEL_FLAG_0);
conds.equal("accounts_id", accountsId);
conds.equal("t.del_flag", Constants.DEL_FLAG_0);
conds.equal("t.accounts_id", accountsId);
if (StringUtils.isNoneBlank(checkcoupon.getName())) {
conds.like("name", checkcoupon.getName());
conds.like("t.name", checkcoupon.getName());
}
Sort sort = new Sort("create_time", OrderType.DESC);
Sort sort = new Sort("t.create_time", OrderType.DESC);
List<Checkcoupon> list = checkcouponService.fetchSearchByPage(conds, sort, iDisplayStart, iDisplayLength);
Integer counts = checkcouponService.count(conds);
......@@ -145,8 +158,8 @@ public class CheckcouponController {
Long accountId = UserUtils.getmpaccounts(request);
Sort sort = new Sort("create_time", OrderType.ASC);
Conds conds = new Conds();
conds.equal("del_flag", 0);
conds.equal("accounts_id", accountId);
conds.equal("t.del_flag", 0);
conds.equal("t.accounts_id", accountId);
List<Checkcoupon> list = checkcouponService.fetchSearchByPage(conds, sort, 0, 0);
ExcelKit.$Export(Checkcoupon.class, response).toExcel(list, "检测券管理信息");
}
......
......@@ -50,6 +50,7 @@
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" href="common/css/uePicPicker.css">
</head>
<!-- END HEAD -->
<body class="hold-transition skin-blue sidebar-mini">
......@@ -197,6 +198,9 @@
value="$!{data.result}" #if($!{pageType}== 'true')
readonly="readonly" #end></textarea>
</div>
<div class="form-group form-md-line-input col-md-12" id="img">
</div>
</div>
</div>
......@@ -252,6 +256,10 @@
<script type="text/javascript" src="plugins/daterangepicker-master/moment.min.js"></script>
<script type="text/javascript" src="plugins/daterangepicker-master/daterangepicker.js"></script>
<script src="js/jquery.serializejson.js"></script>
<script src="plugins/Sortable/Sortable.min.js"></script>
<script src="common/component/uePicPicker.js"></script>
<!-- END PAGE LEVEL PLUGINS -->
<script>
//定义locale汉化插件
......@@ -269,10 +277,25 @@
"firstDay": 1
};
var coverPP = null;
var initPicsSel = function () {
var resultImg = "$!{data.description}";
coverPP = new uePicPicker({
tarId: 'img',
title: '检测结果上传',
sizeDes: '',
max: 1,
datas: resultImg == '' ? null : resultImg.split(","),
success: null
});
coverPP.init();
};
$().ready(function () {
Cfapp.init();
recdTypeAdd.init();
initParams();
initPicsSel();
$('.datepicker').daterangepicker({
'locale': locale,
......@@ -320,7 +343,12 @@
messages: {},
submitHandler: function (form) {
$("#save").attr("disabled", true);
$.getJSON("#springUrl('/a/checkresult/formData')", $("#myForm").serialize(), function (returnobj) {
var description = coverPP.getStringValues().split(',')[0];
var data = $("#myForm").serializeJSON();
data.description = description;
$.getJSON("#springUrl('/a/checkresult/formData')", data, function (returnobj) {
$("#save").attr("disabled", false);
if (returnobj.errorNo == 2) { //保存成功
Cfapp.confirm({
......
......@@ -95,8 +95,8 @@ public class CheckresultController {
}
if (StringUtils.isNoneBlank(checkresult.getSendCheckNo())) {
Conds conds = new Conds();
conds.equal("del_flag", Constants.DEL_FLAG_0);
conds.equal("number", checkresult.getSendCheckNo());
conds.equal("t.del_flag", Constants.DEL_FLAG_0);
conds.equal("t.number", checkresult.getSendCheckNo());
Couponrecord couponrecord = couponrecordService.fetchSearchByConds(conds);
if (couponrecord != null)
checkresult.setOpenid(couponrecord.getOpenid());
......
......@@ -82,6 +82,18 @@
name="consultId" placeholder="咨询单编码">
</div>
<div class="col-xs-2">
<input type="text" class="form-control"
name="fansAlias" placeholder="别名">
</div>
<div class="col-xs-2">
<select id="isThree" name="isThree" class="form-control required">
<option value="">请选择患者类型</option>
<option value="3">三期患者</option>
</select>
</div>
<div class="col-xs-2">
<select id="status" name="status" class="form-control required">
<option value="">请选择审核状态</option>
......@@ -162,11 +174,13 @@
<th>咨询单编码</th>
<th>订单编码</th>
<th>用药人姓名</th>
<th>性别</th>
<th>联系电话</th>
<th>别名</th>
<!-- <th>性别</th>-->
<!-- <th>联系电话</th>-->
<th>是否购药</th>
<th>三期患者</th>
<th>药师姓名</th>
<th>客服姓名</th>
<th>药师</th>
<th>客服</th>
<th>审核状态</th>
<th>拒绝原由</th>
<th>提交时间</th>
......@@ -267,8 +281,9 @@
"sAjaxSource": sSource,
"fnServerData": retrieveData,
"pagingType": "full_numbers",
"autowidth": true,
"autoWidth": true,
"scrollX": true,
"sScrollY": false,
"aoColumns": [
{
"mData": "id"
......@@ -283,10 +298,16 @@
"mData": "userName"
},
{
"mData": "sex"
"mData": "fansAlias"
},
// {
// "mData": "sex"
// },
// {
// "mData": "phone"
// },
{
"mData": "phone"
"mData": "isSales"
},
{
"mData": "isThree"
......@@ -317,9 +338,10 @@
"aoColumnDefs": [
{ // set default column settings
'visible': false,
'targets': [0]
'targets': [0],
},
{
width: "100px",
"aTargets": [1],
"mData": "consultId",
"mRender": function (a, b, c, d) {
......@@ -332,6 +354,7 @@
}
},
{
"width": "100px",
"aTargets": [2],
"mData": "orderCode",
"mRender": function (a, b, c, d) {
......@@ -346,6 +369,7 @@
}
},
{
"width": "70px",
"aTargets": [3],
"mData": "userName",
"mRender": function (a, b, c, d) {
......@@ -357,31 +381,57 @@
}
},
{
"width": "60px",
"aTargets": [4],
"mData": "sex",
"mData": "fansAlias",
"mRender": function (a, b, c, d) {
if (a == 0) {
return "女";
if (a) {
return a;
} else {
return "男";
return null;
}
}
},
// {
// "aTargets": [4],
// "mData": "sex",
// "mRender": function (a, b, c, d) {
// if (a == 0) {
// return "女";
// } else {
// return "男";
// }
//
// }
// },
// {
// "aTargets": [5],
// "mData": "phone",
// "mRender": function (a, b, c, d) {
// if (c) {
// return c.phone.slice(0, 3) + '****' + c.phone.slice(7);
//
// } else {
// return null;
// }
// }
//
// },
{
"width": "60px",
"aTargets": [5],
"mData": "phone",
"mData": "isSales",
"mRender": function (a, b, c, d) {
if (c) {
return c.phone.slice(0, 3) + '****' + c.phone.slice(7);
} else {
return null;
if (a == '1') {
return '是';
} else if (a == '0') {
return '否';
}
}
},
{
"width": "60px",
"aTargets": [6],
"mData": "isThree",
"mRender": function (a, b, c, d) {
......@@ -394,6 +444,7 @@
},
{
"width": "50px",
"aTargets": [7],
"mData": "pharmaName",
"mRender": function (a, b, c, d) {
......@@ -405,6 +456,7 @@
}
},
{
"width": "50px",
"aTargets": [8],
"mData": "customerName",
"mRender": function (a, b, c, d) {
......@@ -416,6 +468,7 @@
}
},
{
"width": "60px",
"aTargets": [9],
"mData": "status",
"mRender": function (a, b, c, d) {
......@@ -429,6 +482,7 @@
}
},
{
"width": "120px",
"aTargets": [10],
"mData": "description",
"mRender": function (a, b, c, d) {
......@@ -440,6 +494,7 @@
}
},
{
"width": "120px",
"aTargets": [11],
"mData": "createTime",
"mRender": function (a, b, c, d) {
......@@ -451,6 +506,7 @@
}
},
{
"width": "120px",
"aTargets": [12],
"mData": "auditTime",
"mRender": function (a, b, c, d) {
......@@ -462,12 +518,13 @@
}
},
{
"width": "80px",
"aTargets": [13],
"mData": "id",
"mRender": function (a, b, c, d) {
let html = '';
html += '<div class="btn-group">\n' +
'<button type="button" class="btn btn-success btn-flat">操作</button>\n' +
//'<button type="button" class="btn btn-success btn-flat">操作</button>\n' +
'<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">\n' +
' <span class="caret"></span>\n' +
' <span class="sr-only">Toggle Dropdown</span>\n' +
......
......@@ -208,19 +208,24 @@
LEFT JOIN t_qyuser c ON c.id = a.service_id AND c.del_flag = '0'
LEFT JOIN wx_mp_member m ON m.open_id = a.open_id AND m.del_flag = '0'
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.del_flag = '0'
LEFT JOIN wx_mp_fanss f ON f.openid = a.open_id AND f.delflag = '0'
<include refid="sqlWhere"/>
<if test="id!=null">and (a.doctor_id = ${id} or a.service_id =${id} )</if>
</select>
<select id="fetchSearchByPage" parameterType="java.util.Map" resultType="com.cftech.consultsheet.model.ConsultSheet">
SELECT
<include refid="sqlColumns"/>, o.number orderCode, CASE WHEN au.name IS NOT NULL THEN 1 ELSE 0 END isThree
<include refid="sqlColumns"/>,
o.number orderCode, CASE WHEN au.name IS NOT NULL THEN 1 ELSE 0 END isThree,
CASE WHEN o.status = '2' OR o.status = '3' OR o.status = '4' THEN 1 ELSE 0 END isSales,
f.store fansAlias
FROM t_aidea_consult_sheet a
LEFT JOIN t_order o ON a.order_id = o.id
LEFT JOIN t_qyuser b ON b.id = a.doctor_id AND b.del_flag = '0'
LEFT JOIN t_qyuser c ON c.id = a.service_id AND c.del_flag = '0'
LEFT JOIN wx_mp_member m ON m.open_id = a.open_id AND m.del_flag = '0'
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.del_flag = '0'
LEFT JOIN wx_mp_fanss f ON f.openid = a.open_id AND f.delflag = '0'
<include refid="sqlWhere"/>
<if test="id!=null">AND (a.doctor_id = ${id} or a.service_id =${id})</if>
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
......
......@@ -94,6 +94,7 @@ public class ConsultSheet extends UserSheet implements Serializable {
private String fansAlias;//粉丝别名
private String nickName;//昵称
private String isThree;//是否三期患者
private String isSales;//是否购买
public ConsultSheet() {
this.delFlag = false;
......
......@@ -191,7 +191,13 @@ public class ConsultSheetController {
conds.equal("a.del_flag", Constants.DEL_FLAG_0);
conds.equal("a.accounts_id", accountsId);
if (StringUtils.isNoneBlank(consultSheet.getConsultId())) {
conds.like("a.consult_id", "%" + consultSheet.getConsultId() + "%");
conds.like("a.consult_id", consultSheet.getConsultId());
}
if (StringUtils.isNoneBlank(consultSheet.getFansAlias())) {
conds.like("f.store", consultSheet.getFansAlias());
}
if (StringUtils.equals(consultSheet.getIsThree(), "3")) {
conds.notNull("au.name");
}
if (StringUtils.isNoneBlank(consultSheet.getStatus())) {
conds.equal("a.status", consultSheet.getStatus());
......
......@@ -75,8 +75,109 @@
<form role="form" id="myForm">
<input name="id" value="$!{data.id}" hidden="true"/>
<div class="box-body">
<div class="panel panel-primary">
<div class="panel-heading">基础信息</div>
<div class="panel-body">
<div class="form-group form-md-line-input col-xs-6">
<label for="couponName">检测券名称</label>
<input type="text"
class="form-control"
id="couponName" name="couponName"
placeholder="检测券名称"
value="$!{data.couponName}"
readonly="readonly"/>
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="number">检测券编码</label>
<input type="text"
class="form-control"
id="number" name="number"
placeholder="检测券编码"
value="$!{data.number}"
readonly="readonly"/>
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="nickName">患者名称</label>
<input type="text"
class="form-control"
id="nickName" name="nickName"
placeholder="患者名称"
value="$!{data.nickName}"
readonly="readonly"/>
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="openid">患者openid</label>
<input type="text"
class="form-control"
id="openid" name="openid"
placeholder="患者openid"
value="$!{data.openid}"
readonly="readonly"/>
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="createTime">发放日期</label>
<input type="text"
class="form-control"
id="createTime" name="createTime"
placeholder="发放日期"
value = "$!date.format('yyyy-MM-dd HH:mm:ss ',$!data.createTime)"
readonly="readonly"/>
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="expireDate">失效时间</label>
<input type="text"
class="form-control"
id="expireDate" name="expireDate"
placeholder="失效时间"
value="$!date.format('yyyy-MM-dd HH:mm:ss ',$!data.expireDate)"
readonly="readonly"/>
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="verifDate">核销时间</label>
<input type="text"
class="form-control"
id="verifDate" name="verifDate"
placeholder="核销时间"
value="$!date.format('yyyy-MM-dd HH:mm:ss ',$!data.verifDate)"
readonly="readonly"/>
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="hospitalName">核销医院</label>
<input type="text"
class="form-control"
id="hospitalName" name="hospitalName"
placeholder="核销医院"
value="$!{data.hospitalName}"
readonly="readonly"/>
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="status">状态</label>
<input type="text"
class="form-control"
id="status" name="status"
placeholder="状态"
#if($!{data.status}== '0') value="未激活"
#elseif($!{data.status} == '1') value="待核销"
#elseif($!{data.status} == '2') value="已核销"
#else value="已过期" #end
readonly="readonly" />
</div>
</div>
</div>
</div>
<div class="box-footer">
#if($shiro.hasPermission("qy:couponrecord:edit"))
<input class="btn btn-primary" id="save" value="保存" type="submit">
......
......@@ -77,6 +77,26 @@
<div class="box">
<div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/couponrecord/list')" method="get">
<div class="col-xs-2">
<input type="text" class="form-control"
name="number" placeholder="检测券编码">
</div>
<div class="col-xs-2">
<input type="text" class="form-control"
name="nickName" placeholder="昵称">
</div>
<div class="col-xs-2">
<select id="status" name="status" class="form-control required">
<option value="">请选择状态</option>
<option value="0">未激活</option>
<option value="1">待核销</option>
<option value="2">已核销</option>
<option value="3">已过期</option>
</select>
</div>
<div class="col-xs-5">
<button type="button" class="search btn btn-primary">搜索</button>
#if($shiro.hasPermission("qy:couponrecord:edit"))
......@@ -90,7 +110,12 @@
<thead>
<tr>
<td hidden="true">Id</td>
<th>创建时间</th>
<th>检测券名称</th>
<th>检测券编码</th>
<th>患者名称</th>
<th>发放日期</th>
<th>状态</th>
<!-- <th>创建时间</th>-->
<th>操作</th>
</tr>
</thead>
......@@ -187,9 +212,21 @@
{
"mData": "id"
},
{
"mData": "couponName"
},
{
"mData": "number"
},
{
"mData": "nickName"
},
{
"mData": "createTime"
},
{
"mData": "status"
},
{
"mData": "id"
}],
......@@ -198,13 +235,46 @@
'visible': false,
'targets': [0]
},
{
"aTargets": [4],
"mData": "createTime",
"mRender": function (a, b, c, d) {
return formatDates(a, "yyyy-MM-dd HH:mm:ss");
}
},
{
"aTargets": [5],
"mData": "status",
"mRender": function (a, b, c, d) {
if (a == "0") {
return "未激活";
} else if (a == "1") {
return "待核销";
} else if (a == "2") {
return "已核销";
} else if (a == "3") {
return "已过期";
} else {
return "";
}
}
},
{
"aTargets": [1],
"aTargets": [6],
"mData": "createTime",
"mRender": function (a, b, c, d) {
return '<a href="#springUrl("/a/couponrecord/form?id=' + c.id + '")" data-id="' + c.id + '" data-action="view">' + formatDates(a, "yyyy-MM-dd HH:mm:ss");
+'</a>';
let html = '';
html += '<div class="btn-group">' +
'<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">' +
' <span class="caret"></span>' +
' <span class="sr-only">Toggle Dropdown</span>' +
'</button>' +
'<ul class="dropdown-menu" role="menu" style="min-width: 100px;">';
html += '<li>#if($shiro.hasPermission("qy:couponrecord:view"))<a href="#springUrl("/a/couponrecord/form?pageType=View&id=' + a + '")" class="btn green">查看</a>#end</li>';
// html += '<li>#if($shiro.hasPermission("qy:couponrecord:edit"))<a href="#springUrl("/a/couponrecord/form?pageType=Edit&id=' + a + '")" class="btn green">修改</a>#end</li>';
html += '</ul></div>';
return html;
}
},
......
......@@ -16,13 +16,19 @@
<result column="verif_date" property="verifDate"/>
<result column="facility_no" property="facilityNo"/>
<result column="accounts_id" property="accountsId"/>
<result column="coupon_id" property="couponId"/>
<result column="del_flag" property="delFlag"/>
<result column="status" property="status"/>
<result column="expire_date" property="expireDate"/>
<result column="take_effect_date" property="takeEffectDate"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="description" property="description"/>
<result column="create_by" property="createBy"/>
<result column="update_by" property="updateBy"/>
<result column="couponName" property="couponName"/>
<result column="nickName" property="nickName"/>
<result column="hospitalName" property="hospitalName"/>
</resultMap>
<sql id="sqlWhere">
......@@ -53,26 +59,29 @@
</sql>
<sql id="sqlColumns">
id,
take_effect_year,
take_effect_month,
expire_month,
type,
number,
openid,
qrcode,
invalid_date,
verif_date,
facility_no,
hospital_id,
accounts_id,
del_flag,
status,
create_time,
update_time,
description,
create_by,
update_by
t.id,
t.take_effect_year,
t.take_effect_month,
t.expire_month,
t.type,
t.number,
t.openid,
t.qrcode,
t.invalid_date,
t.verif_date,
t.facility_no,
t.hospital_id,
t.accounts_id,
t.coupon_id,
t.del_flag,
t.status,
t.expire_date,
t.take_effect_date,
t.create_time,
t.update_time,
t.description,
t.create_by,
t.update_by
</sql>
......@@ -80,7 +89,9 @@
keyProperty="id">
insert into t_aidea_coupon_record
(
<include refid="sqlColumns"/>
id, take_effect_year, take_effect_month, expire_month, type, number, openid, qrcode, invalid_date, verif_date,
facility_no, hospital_id, accounts_id, coupon_id, del_flag, status, expire_date, take_effect_date, create_time,
update_time, description, create_by, update_by
)
values
(
......@@ -92,13 +103,16 @@
#{number, jdbcType=VARCHAR},
#{openid, jdbcType=VARCHAR},
#{qrcode, jdbcType=VARCHAR},
now(),
now(),
#{invalidDate, jdbcType=TIMESTAMP},
#{verifDate, jdbcType=TIMESTAMP},
#{facilityNo, jdbcType=VARCHAR},
#{hospitalId, jdbcType=BIGINT},
#{accountsId, jdbcType=BIGINT},
#{couponId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
#{expireDate, jdbcType=TIMESTAMP},
#{takeEffectDate, jdbcType=TIMESTAMP},
now(),
now(),
#{description, jdbcType=VARCHAR},
......@@ -109,21 +123,27 @@
<select id="fetchById" parameterType="java.lang.Long" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>
<include refid="sqlColumns"/>, c.name couponName, f.nickname nickName, h.name hospitalName
FROM t_aidea_coupon_record t
LEFT JOIN t_aidea_check_coupon c ON t.coupon_id = c.id
LEFT JOIN wx_mp_fanss f ON f.openid = t.openid AND f.delflag = '0'
LEFT JOIN t_aidea_hospital h ON t.hospital_id = h.id AND h.del_flag = '0'
WHERE t.id=#{id}
</select>
<select id="count" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT COUNT(1) FROM t_aidea_coupon_record
SELECT COUNT(1) FROM t_aidea_coupon_record t
LEFT JOIN t_aidea_check_coupon c ON t.coupon_id = c.id
LEFT JOIN wx_mp_fanss f ON f.openid = t.openid
<include refid="sqlWhere"/>
</select>
<select id="fetchSearchByPage" parameterType="java.util.Map" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>
FROM t_aidea_coupon_record
<include refid="sqlColumns"/>, c.name couponName, f.nickname nickName
FROM t_aidea_coupon_record t
LEFT JOIN t_aidea_check_coupon c ON t.coupon_id = c.id
LEFT JOIN wx_mp_fanss f ON f.openid = t.openid AND f.delflag = '0'
<include refid="sqlWhere"/>
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
<if test="limit>0">limit #{offset},#{limit}</if>
......@@ -171,12 +191,21 @@
<if test="accountsId != null">
accounts_id = #{accountsId, jdbcType=BIGINT},
</if>
<if test="couponId != null">
coupon_id = #{couponId, jdbcType=BIGINT},
</if>
<if test="delFlag != null">
del_flag = #{delFlag, jdbcType=TINYINT},
</if>
<if test="status != null">
status = #{status, jdbcType=VARCHAR},
</if>
<if test="expireDate != null">
expire_date = #{expireDate, jdbcType=TIMESTAMP},
</if>
<if test="takeEffectDate != null">
take_effect_date = #{takeEffectDate, jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
create_time = #{createTime, jdbcType=TIMESTAMP},
</if>
......@@ -201,7 +230,8 @@
<select id="CheckCouponYSYList" resultType="map">
SELECT
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d') invalid_date,status
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d')
invalid_date,status
from t_aidea_coupon_record
where del_flag = 0 and status=2
<if test="openId!=null">
......@@ -215,7 +245,8 @@
<select id="CheckCouponYGQList" resultType="map">
SELECT
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d') invalid_date,status
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d')
invalid_date,status
from t_aidea_coupon_record
where del_flag = 0 and status=3
<if test="openId!=null">
......@@ -229,7 +260,8 @@
<select id="CheckCouponDSYList" resultType="map">
SELECT
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d') invalid_date,status
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d')
invalid_date,status
from t_aidea_coupon_record
where del_flag = 0 and status=1
<if test="openId!=null">
......@@ -243,43 +275,48 @@
<select id="checkCouponDetails" resultType="map">
SELECT
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d') invalid_date,status,description,qrcode,hospital_Id
SELECT id,
number,
DATE_FORMAT(create_time, '%Y-%m-%d') create_time,
DATE_FORMAT(invalid_date, '%Y-%m-%d') invalid_date,
status,
description,
qrcode,
hospital_Id
from t_aidea_coupon_record
where id = #{id}
</select>
<select id="buyingMedicineNumber" parameterType="java.util.Map" resultType="map">
<select id="buyingMedicineNumber" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT
SUM(d.drugs_num) number
IFNULL(SUM(d.drugs_num), 0) number
FROM t_order t
LEFT JOIN t_order_details d ON t.id = d.order_id
<include refid="sqlWhere"/>
</select>
<update id="updatePdaLog" parameterType="java.util.Map" >
update t_aidea_PdaLog set
resultJson = #{resultJson, jdbcType=VARCHAR},
<update id="updatePdaLog" parameterType="java.util.Map">
update t_aidea_PdaLog
set resultJson = #{resultJson, jdbcType=VARCHAR},
status = #{status, jdbcType=BIGINT},
update_time = now()
where id=#{id,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<insert id="insertPdaLog" parameterType="java.util.Map" useGeneratedKeys="true"
keyProperty="id">
insert into t_aidea_PdaLog (id,content,create_time)
values
(#{id, jdbcType=VARCHAR},#{content, jdbcType=VARCHAR},now())
insert into t_aidea_PdaLog (id, content, create_time)
values (#{id, jdbcType=VARCHAR}, #{content, jdbcType=VARCHAR}, now())
</insert>
<select id="isWriteOff" resultMap="resultMap">
SELECT
id,status
SELECT id,
status
FROM t_aidea_coupon_record
where number=#{number}
where number = #{number}
</select>
<select id="getHospitalIdByfaNo" resultType="map">
SELECT
id
FROM t_aidea_hospital t WHERE t.facility_no=#{facilityNo}
SELECT id
FROM t_aidea_hospital t
WHERE t.facility_no = #{facilityNo}
</select>
</mapper>
\ No newline at end of file
package com.cftech.couponrecord.job;
import com.cftech.accounts.model.SysJob;
import com.cftech.accounts.service.JobService;
import com.cftech.core.util.SpringContextHolder;
import com.cftech.core.util.SystemConfig;
import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import java.text.SimpleDateFormat;
@Slf4j
public class CouponRecordJob implements Job {
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
boolean isCluster = Boolean.valueOf(SystemConfig.p.getProperty("quartz.isCluster"));
if (!isCluster) {
return;
}
//获得明细数据
JobDataMap jobInfo = context.getJobDetail().getJobDataMap();
String id = jobInfo.get("uid") == null ? "" : jobInfo.getString("uid");//这个也是ID主键
log.info("任务ID:" + id);
//执行更新操作
if (context.getNextFireTime() != null) {
log.info("同步检测券时间定时任务:下次执行时间=====" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(context.getNextFireTime()) + "==============");
} else {
JobService jobService = SpringContextHolder.getBean(JobService.class);
SysJob sysJob = new SysJob();
sysJob.setJobuid(id);
sysJob.setStatus("0");
jobService.updateStatus(sysJob);
log.info("同步检测券时间定时任务,已执行完成!");
}
}
}
......@@ -57,6 +57,8 @@ public class Couponrecord implements Serializable {
private Long hospitalId;
/* 所属的账号 */
private Long accountsId;
/* 检测券Id */
private Long couponId;
/* 删除标识 */
private boolean delFlag;
/* 状态 */
......@@ -72,6 +74,11 @@ public class Couponrecord implements Serializable {
/* 更新人 */
private Long updateBy;
//未映射字段
private String couponName;
private String nickName;
private String hospitalName;
public Couponrecord() {
this.delFlag = false;
this.status = "0";
......
......@@ -10,6 +10,7 @@ import com.cftech.core.generic.GenericService;
import com.google.zxing.WriterException;
import java.io.IOException;
import java.util.Date;
import java.util.List;
/**
......@@ -39,10 +40,12 @@ public interface CouponrecordService extends GenericService<Couponrecord> {
/**
*
* 购买发券逻辑
* @param openId
* @param accountsId
* @return
* @throws IOException
* @throws WriterException
*/
boolean sendCouponRecord(String openId, Long accountsId) throws IOException, WriterException;
......@@ -51,5 +54,5 @@ public interface CouponrecordService extends GenericService<Couponrecord> {
* @param openid
* @return
*/
Integer buyingMedicineNumber(String openid);
Integer buyingMedicineNumber(String openid, Date date);
}
package com.cftech.couponrecord.web;
import com.alibaba.fastjson.JSONObject;
import com.cftech.core.util.StringUtils;
import com.cftech.couponrecord.model.Couponrecord;
import com.cftech.couponrecord.service.CouponrecordService;
import com.cftech.core.poi.ExcelKit;
......@@ -15,7 +16,6 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
......@@ -104,9 +104,18 @@ public class CouponrecordController {
public JSONObject listData(int iDisplayStart, int iDisplayLength, Couponrecord couponrecord, HttpServletRequest request) {
Long accountsId = UserUtils.getmpaccounts(request);
Conds conds = new Conds();
conds.equal("del_flag", Constants.DEL_FLAG_0);
conds.equal("accounts_id", accountsId);
Sort sort = new Sort("create_time", OrderType.DESC);
conds.equal("t.del_flag", Constants.DEL_FLAG_0);
conds.equal("t.accounts_id", accountsId);
if (StringUtils.isNoneBlank(couponrecord.getCouponName())) {
conds.like("c.name", couponrecord.getCouponName());
}
if (StringUtils.isNoneBlank(couponrecord.getNumber())) {
conds.like("t.number", couponrecord.getNumber());
}
if (StringUtils.isNoneBlank(couponrecord.getStatus())) {
conds.equal("t.status", couponrecord.getStatus());
}
Sort sort = new Sort("t.create_time", OrderType.DESC);
List<Couponrecord> list = couponrecordService.fetchSearchByPage(conds, sort, iDisplayStart, iDisplayLength);
Integer counts = couponrecordService.count(conds);
......@@ -134,12 +143,21 @@ public class CouponrecordController {
@RequestMapping("/exportExcel")
@RequiresPermissions(value = COUPONRECORD_VIEW)
public void exportExcel(HttpServletRequest request, HttpServletResponse response) {
public void exportExcel(HttpServletRequest request, HttpServletResponse response, Couponrecord couponrecord) {
Long accountId = UserUtils.getmpaccounts(request);
Sort sort = new Sort("create_time", OrderType.ASC);
Conds conds = new Conds();
conds.equal("del_flag", 0);
conds.equal("accounts_id", accountId);
conds.equal("t.del_flag", 0);
conds.equal("t.accounts_id", accountId);
if (StringUtils.isNoneBlank(couponrecord.getCouponName())) {
conds.like("c.name", couponrecord.getCouponName());
}
if (StringUtils.isNoneBlank(couponrecord.getNumber())) {
conds.like("t.number", couponrecord.getNumber());
}
if (StringUtils.isNoneBlank(couponrecord.getStatus())) {
conds.equal("t.status", couponrecord.getStatus());
}
List<Couponrecord> list = couponrecordService.fetchSearchByPage(conds, sort, 0, 0);
ExcelKit.$Export(Couponrecord.class, response).toExcel(list, "发券信息管理信息");
}
......
......@@ -90,18 +90,8 @@
#if($!{pageType} == 'true') readonly="readonly" #end />
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="telephone">联系方式</label>
<input type="text"
class="form-control datepicker"
id="telephone" name="telephone"
value="$!{data.telephone}"
#if($!{pageType} == 'true') readonly="readonly" #end />
</div>
<div class="form-group form-md-line-input col-xs-6">
<label>处方医院</label>
#if ($!{pageType} == 'true')
<input type="text"
class="form-control" value="$!{data.orgName}"
......@@ -109,17 +99,33 @@
maxlength="50" placeholder="所属组织"/>
#else
<div class="input-group">
<input type="text" name="orgName" id="orgName" value="$!{data.orgName}"
class="form-control" style="display: none">
<input type="text" id="orgId" name="orgId"
value="$!{data.orgId}" class="form-control" disabled>
<input type="text" name="orgName" id="orgName" value="$!{data.orgName}" class="form-control" disabled>
<input type="text" id="orgId" name="orgId" value="$!{data.orgId}" class="form-control" style="display: none">
<span class="input-group-btn">
<button type="button" name="selOrg" id="selOrg" class="btn btn-info btn-flat">选择</button>
<button type="button" name="selOrg" id="selOrg" class="btn btn-info btn-flat selOrg">选择</button>
</span>
</div>
#end
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="facilityNo">设备号</label>
<input type="text"
class="form-control datepicker"
id="facilityNo" name="facilityNo"
value="$!{data.facilityNo}"
#if($!{pageType} == 'true') readonly="readonly" #end />
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="telephone">联系方式</label>
<input type="text"
class="form-control datepicker"
id="telephone" name="telephone"
value="$!{data.telephone}"
#if($!{pageType} == 'true') readonly="readonly" #end />
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="address">地址</label>
<input type="text"
......@@ -237,7 +243,7 @@
/**
* 选择组织
*/
$("#selOrg").click(function () {
$(".selOrg").click(function () {
Cfapp.f7({
dataUrl: "#springUrl('/a/wxQrcode/listOrg')",
checkType: "single", // 多选为multi
......@@ -272,8 +278,8 @@
cancel: function () {
},
storeFields: 'orgName', //展示字段
displayFields: 'orgId'
storeFields: 'orgId', //存储字段
displayFields: 'orgName' //展示字段
})
});
......@@ -288,6 +294,9 @@
rules: {},
messages: {},
submitHandler: function (form) {
console.log(form);
console.log("=="+ $("#myForm").serialize());
$("#save").attr("disabled", true);
$.getJSON("#springUrl('/a/hospital/formData')", $("#myForm").serialize(), function (returnobj) {
$("#save").attr("disabled", false);
......
......@@ -101,6 +101,7 @@
<td hidden="true">Id</td>
<th>医院编码</th>
<th>医院名称</th>
<th>设备号</th>
<th>地址</th>
<th>联系方式</th>
<th>经度</th>
......@@ -202,6 +203,9 @@
"sAjaxSource": sSource,
"fnServerData": retrieveData,
"pagingType": "full_numbers",
"autoWidth": true,
"scrollX": true,
"sScrollY": false,
"aoColumns": [
{
"mData": "id"
......@@ -212,6 +216,9 @@
{
"mData": "name"
},
{
"mData": "facilityNo"
},
{
"mData": "address"
},
......@@ -236,7 +243,7 @@
'targets': [0]
},
{
"aTargets": [7],
"aTargets": [8],
"mData": "createTime",
"mRender": function (a, b, c, d) {
return formatDates(a, "yyyy-MM-dd HH:mm:ss");
......@@ -244,7 +251,7 @@
}
},
{
"aTargets": [8],
"aTargets": [9],
"mData": "id",
"mRender": function (a, b, c, d) {
let html = '';
......
......@@ -88,7 +88,8 @@
keyProperty="id">
insert into t_aidea_hospital
(
<include refid="sqlColumns"/>
id, number, name, address, telephone, longitude, latitude, remarks, province, city, adcode, reliability, level, org_id,
facility_no, accounts_id, del_flag, status, create_time, update_time, description, create_by, update_by
)
values
(
......
......@@ -29,9 +29,6 @@ public class Hospital implements Serializable {
/* 联系方式 */
@ExportConfig(value = "联系方式", width = 100)
private String telephone;
/* 备注 */
@ExportConfig(value = "备注", width = 100)
private String remarks;
/* 经度 */
@ExportConfig(value = "经度", width = 100, showLevel = 1)
private String longitude;
......@@ -45,7 +42,7 @@ public class Hospital implements Serializable {
@ExportConfig(value = "城市", width = 100, showLevel = 1)
private String city;
/* 设备号 */
@ExportConfig(value = "设备号", width = 100, showLevel = 1)
@ExportConfig(value = "设备号", width = 100)
private String facilityNo;
/* 所属的账号 */
private Long accountsId;
......@@ -71,6 +68,9 @@ public class Hospital implements Serializable {
private String orgCode;
@ExportConfig(value = "组织名称", width = 100, showLevel = 1)
private String orgName;//组织名称
/* 备注 */
@ExportConfig(value = "备注", width = 100)
private String remarks;
public Hospital() {
this.delFlag = false;
......
......@@ -117,7 +117,7 @@ public class HospitalController {
if (StringUtils.isNoneBlank(hospital.getOrgId())) {
Conds conds = new Conds();
conds.equal("t.del_flag", Constants.DEL_FLAG_0);
conds.equal("t.number", hospital.getOrgId());
conds.equal("t.id", hospital.getOrgId());
OrgUnit orgUnit = orgUnitService.fetchSearchByConds(conds);
if (orgUnit != null) {
hospital.setOrgId(orgUnit.getId().toString());
......@@ -261,7 +261,7 @@ public class HospitalController {
}
hospital.setTelephone(rowData.get(2));
hospital.setRemarks(rowData.get(3));
hospital.setFacilityNo(rowData.get(3));
//组织编码
if (StringUtils.isNoneBlank(rowData.get(4))) {
......@@ -274,6 +274,8 @@ public class HospitalController {
}
}
hospital.setRemarks(rowData.get(5));
hospital.setAccountsId(accountId);
hospital.setNumber(codingruleUtils.getNumber(accountId, Hospital.class.getName()));
hospital.setCreateBy(UserUtils.getUser().getId());
......
......@@ -267,11 +267,11 @@
<th>是否开票</th>
<th>三期患者</th>
<th>创建时间</th>
<th>确认时间</th>
<th>付款时间</th>
<th>发货时间</th>
<th>签收时间</th>
<th>取消时间</th>
<!-- <th>确认时间</th>-->
<!-- <th>付款时间</th>-->
<!-- <th>发货时间</th>-->
<!-- <th>签收时间</th>-->
<!-- <th>取消时间</th>-->
<th>操作</th>
</tr>
</thead>
......@@ -382,7 +382,7 @@
"pagingType": "full_numbers",
"autowidth": true,
"scrollX": true,
"sScrollY":"480px",
"sScrollY": false,
"aoColumns": [
{
"mData": "id"
......@@ -441,26 +441,26 @@
"mData": "createTime"
}
,
{
"mData": "orderTime"
}
,
{
"mData": "payTime"
}
,
{
"mData": "sendExpressDateStr"
}
,
{
"mData": "acceptExpressDateStr"
}
,
{
"mData": "cancelTime"
}
,
// {
// "mData": "orderTime"
// }
// ,
// {
// "mData": "payTime"
// }
// ,
// {
// "mData": "sendExpressDateStr"
// }
// ,
// {
// "mData": "acceptExpressDateStr"
// }
// ,
// {
// "mData": "cancelTime"
// }
// ,
{
"mData": "id"
}
......@@ -637,60 +637,60 @@
}
}
,
// {
// "aTargets": [13],
// "mData": "orderTime",
// "mRender": function (a, b, c, d) {
// let time = formatDates(a);
// if (time.indexOf("1970") != -1) {
// return '';
// }
// return formatDates(a);
// }
// }
// ,
// {
// "aTargets": [14],
// "mData": "payTime",
// "mRender": function (a, b, c, d) {
// let time = formatDates(a);
// if (time.indexOf("1970") != -1) {
// return '';
// }
// return formatDates(a);
// }
// }
// ,
// {
// "aTargets": [15],
// "mData": "sendExpressDateStr",
// "mRender": function (a, b, c, d) {
// return a;
// }
// }
// ,
// {
// "aTargets": [16],
// "mData": "acceptExpressDateStr",
// "mRender": function (a, b, c, d) {
// return a;
// }
// }
// ,
// {
// "aTargets": [17],
// "mData": "cancelTime",
// "mRender": function (a, b, c, d) {
// let time = formatDates(a);
// if (time.indexOf("1970") != -1) {
// return '';
// }
// return formatDates(a);
// }
// }
//,
{
"aTargets": [13],
"mData": "orderTime",
"mRender": function (a, b, c, d) {
let time = formatDates(a);
if (time.indexOf("1970") != -1) {
return '';
}
return formatDates(a);
}
}
,
{
"aTargets": [14],
"mData": "payTime",
"mRender": function (a, b, c, d) {
let time = formatDates(a);
if (time.indexOf("1970") != -1) {
return '';
}
return formatDates(a);
}
}
,
{
"aTargets": [15],
"mData": "sendExpressDateStr",
"mRender": function (a, b, c, d) {
return a;
}
}
,
{
"aTargets": [16],
"mData": "acceptExpressDateStr",
"mRender": function (a, b, c, d) {
return a;
}
}
,
{
"aTargets": [17],
"mData": "cancelTime",
"mRender": function (a, b, c, d) {
let time = formatDates(a);
if (time.indexOf("1970") != -1) {
return '';
}
return formatDates(a);
}
}
,
{
"aTargets": [18],
"mData": "id",
"mRender": function (a, b, c, d) {
var html = '#if($shiro.hasPermission("qy:order:edit"))';
......
......@@ -364,7 +364,7 @@
</select>
<select id="listProduct" resultType="com.cftech.order.model.ProductOrder">
SELECT id, product_name as productName,price FROM t_aidea_product where del_flag = 0
SELECT id, common_name as productName, price FROM t_aidea_product where del_flag = 0
</select>
<update id="update" parameterType="com.cftech.order.model.Order">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment