Commit 5ff91815 authored by 谢希宇's avatar 谢希宇

Submit by Strive

Date 2021/07/26
Project End
parent f9e261d6
...@@ -19,6 +19,6 @@ public class GiftboxLogDto { ...@@ -19,6 +19,6 @@ public class GiftboxLogDto {
private String surname; private String surname;
@ExportConfig(value = "会员名", width = 100) @ExportConfig(value = "会员名", width = 100)
private String name; private String name;
@ExportConfig(value = "参与时间", width = 100,dateFormat="yyyy-MM-dd HH:mm") @ExportConfig(value = "参与时间", width = 100, dateFormat="yyyy-MM-dd HH:mm")
private Date create_time; private Date create_time;
} }
...@@ -4,8 +4,10 @@ ...@@ -4,8 +4,10 @@
<resultMap id="resultMap" type="com.cftech.authentication.model.Authentication"> <resultMap id="resultMap" type="com.cftech.authentication.model.Authentication">
<id column="id" property="id"/> <id column="id" property="id"/>
<result column="id_card" property="idCard"/> <result column="order_id" property="orderId"/>
<result column="name" property="name"/> <result column="user_id" property="userId"/>
<result column="amount" property="amount"/>
<result column="old_amount" property="oldAmount"/>
<result column="accounts_id" property="accountsId"/> <result column="accounts_id" property="accountsId"/>
<result column="del_flag" property="delFlag"/> <result column="del_flag" property="delFlag"/>
<result column="status" property="status"/> <result column="status" property="status"/>
...@@ -44,18 +46,20 @@ ...@@ -44,18 +46,20 @@
</sql> </sql>
<sql id="sqlColumns"> <sql id="sqlColumns">
id, id,
id_card, order_id,
name, user_id,
accounts_id, amount,
del_flag, old_amount,
status, accounts_id,
create_time, del_flag,
update_time, status,
description, create_time,
create_by, update_time,
update_by description,
</sql> create_by,
update_by
</sql>
<insert id="save" parameterType="com.cftech.authentication.model.Authentication" useGeneratedKeys="true" <insert id="save" parameterType="com.cftech.authentication.model.Authentication" useGeneratedKeys="true"
...@@ -67,8 +71,10 @@ ...@@ -67,8 +71,10 @@
values values
( (
#{id, jdbcType=BIGINT}, #{id, jdbcType=BIGINT},
#{idCard, jdbcType=VARCHAR}, #{orderId, jdbcType=BIGINT},
#{name, jdbcType=VARCHAR}, #{userId, jdbcType=BIGINT},
#{amount, jdbcType=DOUBLE},
#{oldAmount, jdbcType=DOUBLE},
#{accountsId, jdbcType=BIGINT}, #{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT}, #{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR}, #{status, jdbcType=VARCHAR},
...@@ -108,11 +114,17 @@ ...@@ -108,11 +114,17 @@
<if test="id != null"> <if test="id != null">
id = #{id, jdbcType=BIGINT}, id = #{id, jdbcType=BIGINT},
</if> </if>
<if test="idCard != null"> <if test="orderId != null">
id_card = #{idCard, jdbcType=VARCHAR}, order_id = #{orderId, jdbcType=BIGINT},
</if>
<if test="userId != null">
user_id = #{userId, jdbcType=BIGINT},
</if> </if>
<if test="name != null"> <if test="amount != null">
name = #{name, jdbcType=VARCHAR}, amount = #{amount, jdbcType=DOUBLE},
</if>
<if test="oldAmount != null">
old_amount = #{oldAmount, jdbcType=DOUBLE},
</if> </if>
<if test="accountsId != null"> <if test="accountsId != null">
accounts_id = #{accountsId, jdbcType=BIGINT}, accounts_id = #{accountsId, jdbcType=BIGINT},
...@@ -140,6 +152,8 @@ ...@@ -140,6 +152,8 @@
</update> </update>
<update id="delete" parameterType="java.lang.Long"> <update id="delete" parameterType="java.lang.Long">
update t_aidea_authentication set del_flag=1 where id=#{id,jdbcType=BIGINT} update t_aidea_authentication
set del_flag=1
where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -7,7 +7,7 @@ import java.io.Serializable; ...@@ -7,7 +7,7 @@ import java.io.Serializable;
import java.util.Date; import java.util.Date;
/** /**
* 身份验证 * 记录改价表
* *
* @author Buyj * @author Buyj
* @date: 2020-11-23 16:56 * @date: 2020-11-23 16:56
...@@ -17,25 +17,22 @@ public class Authentication implements Serializable { ...@@ -17,25 +17,22 @@ public class Authentication implements Serializable {
/* 主键id */ /* 主键id */
private Long id; private Long id;
@ExportConfig(value = "姓名", width = 100) private Long orderId;
private String name; private Long userId;
/* 身份证号码 */ private Double amount;
@ExportConfig(value = "身份证号码", width = 150) private Double oldAmount;
private String idCard;
/* 所属的账号 */ /* 所属的账号 */
private Long accountsId; private Long accountsId;
/* 删除标识 */ /* 删除标识 */
private boolean delFlag; private boolean delFlag;
/* 状态 */ /* 状态 */
@ExportConfig(value = "患者类型(0:三期;1:四期)", width = 200)
private String status; private String status;
/* 更新时间 */ /* 更新时间 */
private Date updateTime; private Date updateTime;
/* 备注 */ /* 备注 */
@ExportConfig(value = "描述", width = 150)
private String description; private String description;
/* 创建时间 */ /* 创建时间 */
@ExportConfig(value = "创建时间",width = 150, showLevel = 1, dateFormat = "yyyy-MM-dd HH:mm")
private Date createTime; private Date createTime;
/* 创建人 */ /* 创建人 */
private Long createBy; private Long createBy;
......
...@@ -2,13 +2,13 @@ package com.cftech.authentication.service; ...@@ -2,13 +2,13 @@ package com.cftech.authentication.service;
import com.cftech.authentication.model.Authentication; import com.cftech.authentication.model.Authentication;
import com.cftech.core.generic.GenericService; import com.cftech.core.generic.GenericService;
/** /**
* 身份验证Service * 身份验证Service
* *
* @author Buyj * @author Buyj
* @date: 2020-11-23 16:56 * @date: 2020-11-23 16:56
*/ */
public interface AuthenticationService extends GenericService<Authentication> { public interface AuthenticationService extends GenericService<Authentication> {
} }
...@@ -11,21 +11,21 @@ import org.springframework.beans.factory.annotation.Qualifier; ...@@ -11,21 +11,21 @@ import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
* 身份验证ServiceImpl * 身份验证ServiceImpl
* *
* @author Buyj * @author Buyj
* @date: 2020-11-23 16:56 * @date: 2020-11-23 16:56
*/ */
@Service("authenticationService") @Service("authenticationService")
public class AuthenticationServiceImpl extends GenericServiceImpl<Authentication> implements AuthenticationService { public class AuthenticationServiceImpl extends GenericServiceImpl<Authentication> implements AuthenticationService {
@Autowired @Autowired
@Qualifier("authenticationMapper") @Qualifier("authenticationMapper")
private AuthenticationMapper authenticationMapper; private AuthenticationMapper authenticationMapper;
@Override @Override
public GenericDao<Authentication> getGenericMapper() { public GenericDao<Authentication> getGenericMapper() {
return authenticationMapper; return authenticationMapper;
} }
} }
\ No newline at end of file
...@@ -105,9 +105,6 @@ public class AuthenticationController { ...@@ -105,9 +105,6 @@ public class AuthenticationController {
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("del_flag", Constants.DEL_FLAG_0); conds.equal("del_flag", Constants.DEL_FLAG_0);
conds.equal("accounts_id", accountsId); conds.equal("accounts_id", accountsId);
if (!StringUtils.isEmpty(authentication.getName())) {
conds.like("name", authentication.getName());
}
Sort sort = new Sort("create_time", OrderType.DESC); Sort sort = new Sort("create_time", OrderType.DESC);
List<Authentication> list = authenticationService.fetchSearchByPage(conds, sort, iDisplayStart, iDisplayLength); List<Authentication> list = authenticationService.fetchSearchByPage(conds, sort, iDisplayStart, iDisplayLength);
...@@ -141,9 +138,6 @@ public class AuthenticationController { ...@@ -141,9 +138,6 @@ public class AuthenticationController {
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("del_flag", Constants.DEL_FLAG_0); conds.equal("del_flag", Constants.DEL_FLAG_0);
conds.equal("accounts_id", accountId); conds.equal("accounts_id", accountId);
if (!StringUtils.isEmpty(authentication.getName())) {
conds.like("name", authentication.getName());
}
Sort sort = new Sort("create_time", OrderType.DESC); Sort sort = new Sort("create_time", OrderType.DESC);
List<Authentication> list = authenticationService.fetchSearchByPage(conds, sort, 0, 0); List<Authentication> list = authenticationService.fetchSearchByPage(conds, sort, 0, 0);
list.forEach(item -> { list.forEach(item -> {
...@@ -193,23 +187,15 @@ public class AuthenticationController { ...@@ -193,23 +187,15 @@ public class AuthenticationController {
ExcelKit.$Import().setEmptyCellValue("").readExcel(storeFile, rowData -> { ExcelKit.$Import().setEmptyCellValue("").readExcel(storeFile, rowData -> {
Authentication authentication = new Authentication(); Authentication authentication = new Authentication();
authentication.setAccountsId(accountId); authentication.setAccountsId(accountId);
if (!StringUtils.isEmpty(rowData.get(0))) {
authentication.setName(rowData.get(0));
}
if (!StringUtils.isEmpty(rowData.get(1))) {
if (rowData.get(1).length() == 15 || rowData.get(1).length() == 18){
authentication.setIdCard(rowData.get(1));
}
}
if (!StringUtils.isEmpty(rowData.get(2))) { if (!StringUtils.isEmpty(rowData.get(2))) {
authentication.setStatus(rowData.get(2)); authentication.setStatus(rowData.get(2));
} }
if (!StringUtils.isEmpty(rowData.get(3))) { if (!StringUtils.isEmpty(rowData.get(3))) {
authentication.setDescription(rowData.get(3)); authentication.setDescription(rowData.get(3));
} }
if (!StringUtils.isEmpty(authentication.getIdCard())) {
authenticationService.save(authentication);
}
}); });
} catch (IOException e) { } catch (IOException e) {
retJson.put("errorNo", "1"); retJson.put("errorNo", "1");
......
...@@ -77,12 +77,12 @@ ...@@ -77,12 +77,12 @@
<section class="content-header"> <section class="content-header">
<h1> <h1>
咨询单报表管理 处方单报表管理
<small>咨询单报表</small> <small>处方单报表</small>
</h1> </h1>
<ol class="breadcrumb"> <ol class="breadcrumb">
<li><a><i class="fa fa-dashboard"></i>首页</a></li> <li><a><i class="fa fa-dashboard"></i>首页</a></li>
<li><a class="active">咨询单报表管理列表</a></li> <li><a class="active">处方单报表管理列表</a></li>
</ol> </ol>
</section> </section>
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/consultSheet/exportExcel')" method="get"> <form id="seachTableForm" action="#springUrl('/a/consultSheet/exportFromExcel')" method="get">
<div class="col-xs-2"> <div class="col-xs-2">
<input type="text" class="form-control" <input type="text" class="form-control"
...@@ -107,8 +107,7 @@ ...@@ -107,8 +107,7 @@
<div class="col-xs-2"> <div class="col-xs-2">
<select id="isThree" name="isThree" class="form-control required"> <select id="isThree" name="isThree" class="form-control required">
<option value="">请选择患者类型</option> <option value="">请选择患者类型</option>
<option value="3">三期患者</option> <option value="1">三期患者</option>
<option value="4">四期患者</option>
</select> </select>
</div> </div>
...@@ -436,15 +435,12 @@ ...@@ -436,15 +435,12 @@
"aTargets": [6], "aTargets": [6],
"mData": "isThree", "mData": "isThree",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a == '0') { if (a == '1') {
return '三期'; return '三期';
} else if (a == '1') {
return '四期';
} else { } else {
return ''; return '';
} }
} }
}, },
{ {
"width": "50px", "width": "50px",
...@@ -623,22 +619,6 @@ ...@@ -623,22 +619,6 @@
}); });
} }
function importExcel() {
var templateExcelUrl = "#springUrl('/a/consultSheet/templateExcel')";
var importExcelUrl = "#springUrl('/a/consultSheet/importExcel')";
Cfapp.importExcel({
title: '咨询单导入',
importurl: importExcelUrl,
templateurl: templateExcelUrl,
cancel: function () {
},
success: function () {
}
});
}
function clearSearch() { function clearSearch() {
$("#seachTableForm input").each(function () { $("#seachTableForm input").each(function () {
$(this).val(''); $(this).val('');
...@@ -677,7 +657,6 @@ ...@@ -677,7 +657,6 @@
$('#divimg img').css("margin-left", val + "%"); $('#divimg img').css("margin-left", val + "%");
$('#divimg img').css("margin-top", "5%"); $('#divimg img').css("margin-top", "5%");
$('#divimg').fadeIn(200); $('#divimg').fadeIn(200);
} }
function hide() { function hide() {
......
...@@ -214,45 +214,59 @@ ...@@ -214,45 +214,59 @@
<div class="form-group form-md-line-input col-xs-3"> <div class="form-group form-md-line-input col-xs-3">
<label>处方医院</label> <label>处方医院</label>
#if ($!{isView} == 'true')
<input type="text"
class="form-control" value="$!{data.hospital}" <input type="text" name="allergy" id="allergy" value="$!{data.allergy}"
readonly="readonly" class="form-control" placeholder="请输入处方医院" #if ($!{isView} == 'true') readonly="readonly" #end>
maxlength="50" placeholder="处方医院"/>
#else <!-- <input type="text" id="hospital" name="hospital"-->
<div class="input-group"> <!-- value="$!{data.hospital}" class="form-control selHospital" readonly>-->
<input type="text" name="allergy" id="allergy" value="$!{data.allergy}" <!-- <span class="input-group-btn">-->
class="form-control" style="display: none"> <!-- <button type="button" name="selHospital" id="selHospital"-->
<input type="text" id="hospital" name="hospital" <!-- class="btn btn-info btn-flat selHospital">选择</button>-->
value="$!{data.hospital}" class="form-control selHospital" readonly> <!-- </span>-->
<span class="input-group-btn">
<button type="button" name="selHospital" id="selHospital"
class="btn btn-info btn-flat selHospital">选择</button>
</span>
</div>
#end
</div> </div>
<div class="form-group form-md-line-input col-xs-3"> <div class="form-group form-md-line-input col-xs-3">
<label>处方医生</label> <label>处方医生</label>
#if ($!{isView} == 'true')
<input type="text"
class="form-control" value="$!{data.pharmacist}"
readonly="readonly"
maxlength="50" placeholder="处方医生"/>
#else
<div class="input-group">
<input type="text" name="pastRecords" id="pastRecords" <input type="text" name="pastRecords" id="pastRecords"
value="$!{data.pastRecords}" class="form-control" value="$!{data.pastRecords}" class="form-control" placeholder="请输入处方医生" #if ($!{isView} == 'true') readonly="readonly" #end>
style="display: none"> <!-- <input type="text" id="pharmacist" name="pharmacist"-->
<input type="text" id="pharmacist" name="pharmacist" <!-- value="$!{data.pharmacist}" class="form-control selDoctor" readonly>-->
value="$!{data.pharmacist}" class="form-control selDoctor" readonly> <!-- <span class="input-group-btn">-->
<span class="input-group-btn"> <!-- <button type="button" name="selDoctor" id="selDoctor"-->
<button type="button" name="selDoctor" id="selDoctor" <!-- class="btn btn-info btn-flat selDoctor">选择</button>-->
class="btn btn-info btn-flat selDoctor">选择</button> <!-- </span>-->
</span> </div>
<div class="form-group form-md-line-input col-xs-3">
<label>随机号</label>
<input type="text" name="randomNo" id="randomNo"
#if ($!{data.isThree} == '1') value="$!{data.randomNo}" #end class="form-control" placeholder="随机号" readonly="readonly">
</div>
<div class="form-group form-md-line-input col-xs-3">
<label>入组医院</label>
<input type="text" name="firstHospital" id="firstHospital"
#if ($!{data.isThree} == '1') value="$!{data.firstHospital}" #end class="form-control" placeholder="入组医院" readonly="readonly">
</div>
<div class="form-group form-md-line-input col-xs-3">
<label>处方单<font style="color: red"></font></label>
<br/>
<div class="form-group " id="imageurl"
style="width: 120px; height: 120px; margin-left: 5px; padding: 10px; background-color: #f4f4f4; border: 1px solid #CCCCCC">
<img id="prescription"
style="cursor:zoom-in; width: 100%; height: 100% "
src="$!{data.prescription}" onclick="imgcli(this)">
</div> </div>
#end </div>
<div class="form-group form-md-line-input col-xs-3">
<label>随访医院</label>
<input type="text" name="followupHospital" id="followupHospital"
#if ($!{data.isThree} == '1') value="$!{data.followupHospital}" #end class="form-control" placeholder="随访医院" readonly="readonly">
</div> </div>
<div class="form-group form-md-line-input col-xs-6"> <div class="form-group form-md-line-input col-xs-6">
...@@ -280,16 +294,7 @@ ...@@ -280,16 +294,7 @@
<!-- </div>--> <!-- </div>-->
<!-- </div>--> <!-- </div>-->
<div class="form-group form-md-line-input col-xs-3">
<label>处方单<font style="color: red"></font></label>
<br/>
<div class="form-group " id="imageurl"
style="width: 120px; height: 120px; margin-left: 5px; padding: 10px; background-color: #f4f4f4; border: 1px solid #CCCCCC">
<img id="prescription"
style="cursor:zoom-in; width: 100%; height: 100% "
src="$!{data.prescription}" onclick="imgcli(this)">
</div>
</div>
</div> </div>
......
...@@ -90,8 +90,7 @@ ...@@ -90,8 +90,7 @@
<div class="col-xs-2"> <div class="col-xs-2">
<select id="isThree" name="isThree" class="form-control required"> <select id="isThree" name="isThree" class="form-control required">
<option value="">请选择患者类型</option> <option value="">请选择患者类型</option>
<option value="3">三期患者</option> <option value="1">三期患者</option>
<option value="4">四期患者</option>
</select> </select>
</div> </div>
...@@ -124,18 +123,6 @@ ...@@ -124,18 +123,6 @@
</div> </div>
</div> </div>
<!-- <div class="col-xs-2">-->
<!-- <div class="input-group date">-->
<!-- <div class="input-group-addon">-->
<!-- <i class="fa fa-calendar"></i>-->
<!-- </div>-->
<!-- <input type="text"-->
<!-- class="form-control pull-right datepicker"-->
<!-- name="endCreateTime" placeholder="提交结束时间"-->
<!-- readonly="readonly">-->
<!-- </div>-->
<!-- </div>-->
<div class="col-xs-4"> <div class="col-xs-4">
<div class="input-group date"> <div class="input-group date">
<div class="input-group-addon"> <div class="input-group-addon">
...@@ -147,18 +134,6 @@ ...@@ -147,18 +134,6 @@
</div> </div>
</div> </div>
<!-- <div class="col-xs-2">-->
<!-- <div class="input-group date">-->
<!-- <div class="input-group-addon">-->
<!-- <i class="fa fa-calendar"></i>-->
<!-- </div>-->
<!-- <input type="text"-->
<!-- class="form-control pull-right datepicker"-->
<!-- name="endAuditTime" placeholder="审核结束时间"-->
<!-- readonly="readonly">-->
<!-- </div>-->
<!-- </div>-->
<div class="col-xs-4"> <div class="col-xs-4">
<a href="javascript:void(0)" class="btn btn-primary search">搜索</a> <a href="javascript:void(0)" class="btn btn-primary search">搜索</a>
<button type="button" class="btn btn-info" onclick="clearSearch()">重置</button> <button type="button" class="btn btn-info" onclick="clearSearch()">重置</button>
...@@ -182,6 +157,8 @@ ...@@ -182,6 +157,8 @@
<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>
...@@ -317,6 +294,12 @@ ...@@ -317,6 +294,12 @@
{ {
"mData": "customerName" "mData": "customerName"
}, },
{
"mData": "randomNo"
},
{
"mData": "firstHospital"
},
{ {
"mData": "followupHospital" "mData": "followupHospital"
}, },
...@@ -442,11 +425,35 @@ ...@@ -442,11 +425,35 @@
} }
}, },
{ {
"width": "80px", "width": "50px",
"aTargets": [9], "aTargets": [9],
"mData": "randomNo",
"mRender": function (a, b, c, d) {
if (c.isThree == '1') {
return a;
} else {
return null;
}
}
},
{
"width": "80px",
"aTargets": [10],
"mData": "firstHospital",
"mRender": function (a, b, c, d) {
if (c.isThree == '1') {
return a;
} else {
return null;
}
}
},
{
"width": "80px",
"aTargets": [11],
"mData": "followupHospital", "mData": "followupHospital",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a) { if (c.isThree == '1') {
return a; return a;
} else { } else {
return null; return null;
...@@ -455,7 +462,7 @@ ...@@ -455,7 +462,7 @@
}, },
{ {
"width": "60px", "width": "60px",
"aTargets": [10], "aTargets": [12],
"mData": "status", "mData": "status",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a == 0) { if (a == 0) {
...@@ -469,7 +476,7 @@ ...@@ -469,7 +476,7 @@
}, },
{ {
"width": "120px", "width": "120px",
"aTargets": [11], "aTargets": [13],
"mData": "description", "mData": "description",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a) { if (a) {
...@@ -481,7 +488,7 @@ ...@@ -481,7 +488,7 @@
}, },
{ {
"width": "120px", "width": "120px",
"aTargets": [12], "aTargets": [14],
"mData": "createTime", "mData": "createTime",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a) { if (a) {
...@@ -494,7 +501,7 @@ ...@@ -494,7 +501,7 @@
}, },
{ {
"width": "120px", "width": "120px",
"aTargets": [13], "aTargets": [15],
"mData": "auditTime", "mData": "auditTime",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a) { if (a) {
...@@ -506,7 +513,7 @@ ...@@ -506,7 +513,7 @@
}, },
{ {
"width": "80px", "width": "80px",
"aTargets": [14], "aTargets": [16],
"mData": "id", "mData": "id",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
let html = ''; let html = '';
......
...@@ -184,13 +184,18 @@ ...@@ -184,13 +184,18 @@
<select id="fetchById" parameterType="java.lang.Long" resultType="com.cftech.consultsheet.model.ConsultSheet"> <select id="fetchById" parameterType="java.lang.Long" resultType="com.cftech.consultsheet.model.ConsultSheet">
SELECT SELECT
<include refid="sqlColumns"/>, d.name pharmacist, e.org_name hospital, f.store fansAlias, f.nickname nickName <include refid="sqlColumns"/>, d.name pharmacist, e.org_name hospital, f.store fansAlias, f.nickname nickName,
m.status isThree,
m.invitcode randomNo,
ou.org_name firstHospital
FROM t_aidea_consult_sheet a FROM t_aidea_consult_sheet a
LEFT JOIN t_qyuser b ON b.id = a.doctor_id LEFT JOIN t_qyuser b ON b.id = a.doctor_id
LEFT JOIN t_qyuser c ON c.id = a.service_id LEFT JOIN t_qyuser c ON c.id = a.service_id
LEFT JOIN t_qyuser d ON d.id = a.past_records LEFT JOIN t_qyuser d ON d.id = a.past_records
LEFT JOIN t_orgunit e ON e.id = a.allergy LEFT JOIN t_orgunit e ON e.id = a.allergy
LEFT JOIN wx_mp_fanss f ON f.openid = a.open_id AND f.delflag = 0 LEFT JOIN wx_mp_fanss f ON f.openid = a.open_id AND f.delflag = 0
LEFT JOIN wx_mp_member m ON m.open_id = a.open_id AND m.del_flag = '0'
LEFT JOIN t_orgunit ou ON m.storeid = ou.id AND ou.del_flag = 0
WHERE a.id = #{id} WHERE a.id = #{id}
GROUP BY id GROUP BY id
</select> </select>
...@@ -209,7 +214,6 @@ ...@@ -209,7 +214,6 @@
LEFT JOIN t_qyuser b ON b.id = a.doctor_id AND b.del_flag = '0' 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 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 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' LEFT JOIN wx_mp_fanss f ON f.openid = a.open_id AND f.delflag = '0'
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
<if test="userid!=null">and (a.doctor_id = ${userid} or a.service_id =${userid})</if> <if test="userid!=null">and (a.doctor_id = ${userid} or a.service_id =${userid})</if>
...@@ -219,17 +223,20 @@ ...@@ -219,17 +223,20 @@
SELECT SELECT
<include refid="sqlColumns"/>, <include refid="sqlColumns"/>,
o.number orderCode, o.number orderCode,
m.status isThree,
(SELECT status FROM t_order sales WHERE sales.del_flag = '0' AND sales.status = '4' AND sales.openid = a.open_id LIMIT 1) isSales, (SELECT status FROM t_order sales WHERE sales.del_flag = '0' AND sales.status = '4' AND sales.openid = a.open_id LIMIT 1) isSales,
f.store fansAlias, f.store fansAlias,
o.status orderStatus, o.status orderStatus,
(SELECT SUM(od.drugs_num) FROM t_order_details od WHERE od.order_id = o.id AND od.del_flag = '0') drugNum, (SELECT SUM(od.drugs_num) FROM t_order_details od WHERE od.order_id = o.id AND od.del_flag = '0') drugNum,
GROUP_CONCAT(g.name SEPARATOR ',') tabNames GROUP_CONCAT(g.name SEPARATOR ',') tabNames,
m.status isThree,
m.invitcode randomNo,
ou.org_name firstHospital
FROM t_aidea_consult_sheet a FROM t_aidea_consult_sheet a
LEFT JOIN t_order o ON a.order_id = o.id 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 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 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 wx_mp_member m ON m.open_id = a.open_id AND m.del_flag = '0'
LEFT JOIN t_orgunit ou ON m.storeid = ou.id AND ou.del_flag = 0
LEFT JOIN t_aidea_member_group g ON FIND_IN_SET(g.id, m.member_id) != 0 AND g.del_flag = '0' LEFT JOIN t_aidea_member_group g ON FIND_IN_SET(g.id, m.member_id) != 0 AND g.del_flag = '0'
LEFT JOIN wx_mp_fanss f ON f.openid = a.open_id AND f.delflag = '0' LEFT JOIN wx_mp_fanss f ON f.openid = a.open_id AND f.delflag = '0'
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
...@@ -346,7 +353,7 @@ ...@@ -346,7 +353,7 @@
</if> </if>
<if test="followupHospital != null"> <if test="followupHospital != null">
followup_hospital = #{followupHospital, jdbcType=VARCHAR}, followup_hospital = #{followupHospital, jdbcType=VARCHAR},
</if> l </if>
</set> </set>
where id=#{id,jdbcType=BIGINT} where id=#{id,jdbcType=BIGINT}
</update> </update>
......
...@@ -34,9 +34,9 @@ public class ConsultSheet extends UserSheet implements Serializable { ...@@ -34,9 +34,9 @@ public class ConsultSheet extends UserSheet implements Serializable {
/* 处方医院组织长字段 */ /* 处方医院组织长字段 */
private String illness; private String illness;
/* 处方医院 */ /* 处方医院 */
private Long allergy; private String allergy;
/* 处方医生 */ /* 处方医生 */
private Long pastRecords; private String pastRecords;
/* 处方单 */ /* 处方单 */
private String prescription; private String prescription;
/* 药师id */ /* 药师id */
...@@ -100,6 +100,8 @@ public class ConsultSheet extends UserSheet implements Serializable { ...@@ -100,6 +100,8 @@ public class ConsultSheet extends UserSheet implements Serializable {
private String orderStatus;//订单状态 private String orderStatus;//订单状态
private String drugNum;//购买数量 private String drugNum;//购买数量
private String tabNames;//患者类型 private String tabNames;//患者类型
private String randomNo;//随机号
private String firstHospital;//入组医院
public ConsultSheet() { public ConsultSheet() {
this.delFlag = false; this.delFlag = false;
......
package com.cftech.consultsheet.model;
import com.cftech.core.poi.ExportConfig;
import lombok.Data;
@Data
public class ConsultSheetReportVo {
@ExportConfig(value = "咨询单编码", width = 100, showLevel = 1)
private String consultId;
@ExportConfig(value = "订单编号" , width = 100, showLevel = 1)
private String orderCode;
@ExportConfig(value = "用药人姓名", width = 100, showLevel = 1)
private String userName;
@ExportConfig(value = "别名", width = 100, showLevel = 1)
private String alias;
@ExportConfig(value = "新用户", width = 100, showLevel = 1)
private String isNew;
@ExportConfig(value = "患者类型", width = 100, showLevel = 1)
private String isThree;
@ExportConfig(value = "药师姓名", width = 100, showLevel = 1)
private String pharmaName;
@ExportConfig(value = "客服姓名", width = 100, showLevel = 1)
private String customerName;
@ExportConfig(value = "随机号", width = 100, showLevel = 1)
private String randomNo;
@ExportConfig(value = "入组医院", width = 100, showLevel = 1)
private String firstHospital;
@ExportConfig(value = "随访医院", width = 100, showLevel = 1)
private String randomHospital;
@ExportConfig(value = "审核状态", width = 100, showLevel = 1)
private String status;
@ExportConfig(value = "购买数量" , width = 100 , showLevel = 1)
private String number;
@ExportConfig(value = "提交时间" , width = 100, showLevel = 1)
private String createTime;
@ExportConfig(value = "审核时间" , width = 100, showLevel = 1)
private String auditTime;
}
...@@ -12,49 +12,48 @@ import java.util.Date; ...@@ -12,49 +12,48 @@ import java.util.Date;
*/ */
@Data @Data
public class ConsultSheetVO { public class ConsultSheetVO {
/* 咨询单编码 */
@ExportConfig(value = "咨询单编码", width = 100, showLevel = 1) @ExportConfig(value = "咨询单编码", width = 100, showLevel = 1)
private String consultId; private String consultId;
@ExportConfig(value = "订单编号" , width = 100, showLevel = 1) @ExportConfig(value = "订单编号" , width = 100, showLevel = 1)
private String orderCode; private String orderCode;
/* 用药人name */
@ExportConfig(value = "用药人姓名", width = 100, showLevel = 1) @ExportConfig(value = "用药人姓名", width = 100, showLevel = 1)
private String userName; private String userName;
/* 性别 */ @ExportConfig(value = "别名", width = 100, showLevel = 1)
private String alias;
@ExportConfig(value = "性别", width = 100, showLevel = 1) @ExportConfig(value = "性别", width = 100, showLevel = 1)
private String sex; private String sex;
/* 手机号 */
@ExportConfig(value = "联系电话", width = 100, showLevel = 1) @ExportConfig(value = "联系电话", width = 100, showLevel = 1)
private String phone; private String phone;
/* 疾病史 */ @ExportConfig(value = "新用户", width = 100, showLevel = 1)
private String isNew;
@ExportConfig(value = "患者类型", width = 100, showLevel = 1) @ExportConfig(value = "患者类型", width = 100, showLevel = 1)
private String isThree; private String isThree;
// /* 病情描述 */
// @ExportConfig(value = "是否服用过该药且无禁忌症", width = 100, showLevel = 1)
// private String illness;
//
// /* 过敏史 */
// @ExportConfig(value = "有无过敏反应", width = 100, showLevel = 1)
// private String allergy;
/* 状态 */
@ExportConfig(value = "是否审核", width = 100, showLevel = 1)
private String status;
/* 药师姓名*/
@ExportConfig(value = "药师姓名", width = 100, showLevel = 1) @ExportConfig(value = "药师姓名", width = 100, showLevel = 1)
private String pharmaName; private String pharmaName;
/* 客服姓名*/
@ExportConfig(value = "客服姓名", width = 100, showLevel = 1) @ExportConfig(value = "客服姓名", width = 100, showLevel = 1)
private String customerName; private String customerName;
@ExportConfig(value = "随机号", width = 100, showLevel = 1)
private String randomNo;
@ExportConfig(value = "入组医院", width = 100, showLevel = 1)
private String firstHospital;
@ExportConfig(value = "随访医院", width = 100, showLevel = 1)
private String randomHospital;
@ExportConfig(value = "审核状态", width = 100, showLevel = 1)
private String status;
@ExportConfig(value = "拒绝原因" , width = 100 , showLevel = 1) @ExportConfig(value = "拒绝原因" , width = 100 , showLevel = 1)
private String description; private String description;
......
...@@ -135,15 +135,6 @@ ...@@ -135,15 +135,6 @@
</select> </select>
<select id="fetchMemberByYearGoodsNum" parameterType="java.util.Map" resultType="java.lang.Integer"> <select id="fetchMemberByYearGoodsNum" parameterType="java.util.Map" resultType="java.lang.Integer">
<!-- SELECT-->
<!-- IFNULL(SUM(d.drugs_num), 0)-->
<!-- FROM t_order_details d-->
<!-- LEFT JOIN t_order o ON o.id = d.order_id-->
<!-- <include refid="sqlWhere"/>-->
<!-- AND o.create_time >=-->
<!-- (SELECT a.create_time FROM wx_mp_fanss f-->
<!-- INNER JOIN wx_mp_member m ON f.openid = m.open_id AND f.delflag = '0' AND m.del_flag = '0'-->
<!-- INNER JOIN t_aidea_authentication a ON m.cardid = id_card AND a.del_flag = '0' WHERE f.openid = o.openid)-->
SELECT SELECT
IFNULL(SUM(t.remind_type), 0) IFNULL(SUM(t.remind_type), 0)
FROM t_order t FROM t_order t
......
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
<div class="form-group form-md-line-input col-xs-6"> <div class="form-group form-md-line-input col-xs-6">
#if($!{pageType} != 'true') #if($!{pageType} != 'true')
<div> <div>
<button class="btn btn-primary" onclick="orderSplit()">订单拆分</button> <button id="firstBnt" class="btn btn-primary" onclick="orderSplit()">订单拆分</button>
</div> </div>
#end #end
</div> </div>
...@@ -449,6 +449,9 @@ ...@@ -449,6 +449,9 @@
initSplitHtml(); initSplitHtml();
} else { } else {
orderSplit(); orderSplit();
setTimeout(function() {
$("#firstBnt").trigger("click");
}, 500);
} }
}); });
......
...@@ -7,6 +7,7 @@ import com.cftech.core.generic.GenericDao; ...@@ -7,6 +7,7 @@ import com.cftech.core.generic.GenericDao;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -96,4 +97,11 @@ public interface OrderMapper extends GenericDao<Order> { ...@@ -96,4 +97,11 @@ public interface OrderMapper extends GenericDao<Order> {
* @return * @return
*/ */
List<Map<String, String>> findWaitRemindOrders(Long number); List<Map<String, String>> findWaitRemindOrders(Long number);
/**
* 获取所有免费瓶数
* @param openid
* @return
*/
BigDecimal findUserDrugsPatientsSum(String openid);
} }
\ No newline at end of file
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
<result column="address_des" property="addressDes"/> <result column="address_des" property="addressDes"/>
<result column="order_time" property="orderTime"/> <result column="order_time" property="orderTime"/>
<result column="remind_type" property="remindType"/> <result column="remind_type" property="remindType"/>
<result column="pay_type" property="payType"/>
</resultMap> </resultMap>
<sql id="sqlWhere"> <sql id="sqlWhere">
...@@ -92,7 +93,8 @@ ...@@ -92,7 +93,8 @@
t.id as productId, t.id as productId,
m.`name` memberName, m.`name` memberName,
CONVERT ( AES_DECRYPT( m.phone, 'aideakey' ) USING UTF8 ) memberPhone, CONVERT ( AES_DECRYPT( m.phone, 'aideakey' ) USING UTF8 ) memberPhone,
a.address a.address,
a.pay_type
</sql> </sql>
<sql id="Column"> <sql id="Column">
...@@ -144,7 +146,8 @@ ...@@ -144,7 +146,8 @@
address_des, address_des,
order_time, order_time,
cancel_time, cancel_time,
remind_type remind_type,
pay_type
) )
values values
( (
...@@ -178,7 +181,8 @@ ...@@ -178,7 +181,8 @@
#{addressDes, jdbcType=VARCHAR}, #{addressDes, jdbcType=VARCHAR},
#{orderTime, jdbcType=TIMESTAMP}, #{orderTime, jdbcType=TIMESTAMP},
#{cancelTime, jdbcType=TIMESTAMP}, #{cancelTime, jdbcType=TIMESTAMP},
#{remindType, jdbcType=VARCHAR} #{remindType, jdbcType=VARCHAR},
#{payType, jdbcType=VARCHAR}
) )
</insert> </insert>
<update id="deleteAll" > <update id="deleteAll" >
...@@ -243,7 +247,7 @@ ...@@ -243,7 +247,7 @@
<select id="count" parameterType="java.util.Map" resultType="java.lang.Integer"> <select id="count" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT COUNT(1) SELECT COUNT(1)
FROM ( FROM (
SELECT COUNT(1) col SELECT COUNT(1) col, SUM(d.drugs_num) drugsNum
FROM t_order o FROM t_order o
LEFT JOIN t_aidea_consult_sheet cs ON o.consult_id = cs.id LEFT JOIN t_aidea_consult_sheet cs ON o.consult_id = cs.id
LEFT JOIN t_shipping_address s ON o.address_id = s.id LEFT JOIN t_shipping_address s ON o.address_id = s.id
...@@ -251,28 +255,34 @@ ...@@ -251,28 +255,34 @@
LEFT JOIN t_aidea_product t ON d.drugs_id = t.id LEFT JOIN t_aidea_product t ON d.drugs_id = t.id
LEFT JOIN wx_mp_fanss f ON f.openid = o.openid and f.delflag = '0' LEFT JOIN wx_mp_fanss f ON f.openid = o.openid and f.delflag = '0'
LEFT JOIN wx_mp_member m on m.open_id = o.openid LEFT JOIN wx_mp_member m on m.open_id = o.openid
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.del_flag = '0'
LEFT JOIN t_shipping_address a on a.id = o.address_id LEFT JOIN t_shipping_address a on a.id = o.address_id
LEFT JOIN t_aidea_waybill aw ON o.id = aw.order_id LEFT JOIN t_aidea_waybill aw ON o.id = aw.order_id
LEFT JOIN t_qyuser u ON o.service_id = u.id
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
<if test="userid != null"> AND (o.service_id = ${userid} or o.doctor_id =${userid} or o.clerk_id = ${userid}) </if> <if test="userid != null"> AND (o.service_id = ${userid} or o.doctor_id =${userid} or o.clerk_id = ${userid}) </if>
GROUP BY o.id GROUP BY o.id
<if test="orderAmount != null or payAmount != null"> <if test="orderAmount != null or payAmount != null">
HAVING 1=1 HAVING 1=1
<choose> <if test="orderAmount != null">
<when test="orderAmount == 6"> <choose>
AND drugsNum >= ${orderAmount} <when test="orderAmount == 6">
</when> AND drugsNum >= #{orderAmount}
<when test="payAmount == 6"> </when>
AND drugsNum >= ${payAmount} <otherwise>
</when> AND drugsNum = #{orderAmount}
<when test="orderAmount != 6"> </otherwise>
AND drugsNum = ${orderAmount} </choose>
</when> </if>
<when test="payAmount != 6"> <if test="payAmount != null">
AND drugsNum = ${payAmount} <choose>
</when> <when test="payAmount == 6">
</choose> AND drugsNum >= #{payAmount}
</when>
<otherwise>
AND drugsNum = #{payAmount}
</otherwise>
</choose>
</if>
</if> </if>
) duals ) duals
</select> </select>
...@@ -318,8 +328,9 @@ ...@@ -318,8 +328,9 @@
m.`name` memberName, m.`name` memberName,
CONVERT ( AES_DECRYPT( m.phone, 'aideakey' ) USING UTF8 ) memberPhone, CONVERT ( AES_DECRYPT( m.phone, 'aideakey' ) USING UTF8 ) memberPhone,
s.address, s.address,
au.status isThree, m.status isThree,
SUM(d.drugs_num) drugsNum, SUM(d.drugs_num) drugsNum,
u.name serviceName,
(SELECT status FROM t_order sales WHERE sales.del_flag = '0' AND sales.status = '4' AND sales.openid = o.openid LIMIT 1) isSales (SELECT status FROM t_order sales WHERE sales.del_flag = '0' AND sales.status = '4' AND sales.openid = o.openid LIMIT 1) isSales
FROM t_order o FROM t_order o
LEFT JOIN t_aidea_consult_sheet cs ON o.consult_id = cs.id LEFT JOIN t_aidea_consult_sheet cs ON o.consult_id = cs.id
...@@ -328,27 +339,33 @@ ...@@ -328,27 +339,33 @@
LEFT JOIN t_aidea_product t ON d.drugs_id = t.id LEFT JOIN t_aidea_product t ON d.drugs_id = t.id
LEFT JOIN wx_mp_fanss f ON f.openid = o.openid and f.delflag = '0' LEFT JOIN wx_mp_fanss f ON f.openid = o.openid and f.delflag = '0'
LEFT JOIN wx_mp_member m on m.open_id = o.openid LEFT JOIN wx_mp_member m on m.open_id = o.openid
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.del_flag = '0'
LEFT JOIN t_aidea_waybill aw ON o.id = aw.order_id LEFT JOIN t_aidea_waybill aw ON o.id = aw.order_id
LEFT JOIN t_qyuser u ON o.service_id = u.id
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
<if test="userid != null"> AND (o.service_id = ${userid} or o.doctor_id =${userid} or o.clerk_id = ${userid}) </if> <if test="userid != null"> AND (o.service_id = ${userid} or o.doctor_id =${userid} or o.clerk_id = ${userid}) </if>
GROUP BY o.id GROUP BY o.id
<if test="orderAmount != null or payAmount != null"> <if test="orderAmount != null or payAmount != null">
HAVING 1=1 HAVING 1=1
<choose> <if test="orderAmount != null">
<when test="orderAmount == 6"> <choose>
AND drugsNum >= ${orderAmount} <when test="orderAmount == 6">
</when> AND drugsNum >= #{orderAmount}
<when test="payAmount == 6"> </when>
AND drugsNum >= ${payAmount} <otherwise>
</when> AND drugsNum = #{orderAmount}
<when test="orderAmount != 6"> </otherwise>
AND drugsNum = ${orderAmount} </choose>
</when> </if>
<when test="payAmount != 6"> <if test="payAmount != null">
AND drugsNum = ${payAmount} <choose>
</when> <when test="payAmount == 6">
</choose> AND drugsNum >= #{payAmount}
</when>
<otherwise>
AND drugsNum = #{payAmount}
</otherwise>
</choose>
</if>
</if> </if>
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if> <if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
<if test="limit>0">limit #{offset},#{limit}</if> <if test="limit>0">limit #{offset},#{limit}</if>
...@@ -418,9 +435,6 @@ ...@@ -418,9 +435,6 @@
<if test="status != null"> <if test="status != null">
status = #{status, jdbcType=VARCHAR}, status = #{status, jdbcType=VARCHAR},
</if> </if>
<!--<if test="createTime != null">-->
<!--create_time = #{createTime, jdbcType=TIMESTAMP},-->
<!--</if>-->
<if test="description != null"> <if test="description != null">
description = #{description, jdbcType=VARCHAR}, description = #{description, jdbcType=VARCHAR},
</if> </if>
...@@ -458,7 +472,10 @@ ...@@ -458,7 +472,10 @@
cancel_time = #{cancelTime, jdbcType=TIMESTAMP}, cancel_time = #{cancelTime, jdbcType=TIMESTAMP},
</if> </if>
<if test="remindType != null"> <if test="remindType != null">
remind_type = #{remindType, jdbcType=VARCHAR} remind_type = #{remindType, jdbcType=VARCHAR},
</if>
<if test="payType != null">
pay_type = #{payType, jdbcType=VARCHAR},
</if> </if>
</set> </set>
where id=#{id,jdbcType=BIGINT} where id=#{id,jdbcType=BIGINT}
...@@ -710,4 +727,12 @@ ...@@ -710,4 +727,12 @@
AND Date( date_add( w.accept_express_date, INTERVAL ( p.take_frequency * d.drugs_num - #{number} ) DAY ) ) = CURRENT_DATE () AND Date( date_add( w.accept_express_date, INTERVAL ( p.take_frequency * d.drugs_num - #{number} ) DAY ) ) = CURRENT_DATE ()
GROUP BY o.id HAVING max(rate) GROUP BY o.id HAVING max(rate)
</select> </select>
<select id="findUserDrugsPatientsSum" parameterType="java.lang.String" resultType="java.math.BigDecimal">
SELECT
IFNULL(SUM(t.remind_type), 0)
FROM
t_order t
WHERE t.del_flag = 0 AND t.openid = #{openid}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -113,6 +113,11 @@ public class Order extends OrderDetail implements Serializable { ...@@ -113,6 +113,11 @@ public class Order extends OrderDetail implements Serializable {
private Date cancelTime; private Date cancelTime;
/**
* 付款类型 0:普通订单 1:三期患者免单 2:pc后台改价
*/
private String payType;
/** /**
* 规格 * 规格
*/ */
...@@ -144,8 +149,6 @@ public class Order extends OrderDetail implements Serializable { ...@@ -144,8 +149,6 @@ public class Order extends OrderDetail implements Serializable {
private boolean isFirst; private boolean isFirst;
/** /**
* 搜索字段 * 搜索字段
*/ */
...@@ -168,6 +171,7 @@ public class Order extends OrderDetail implements Serializable { ...@@ -168,6 +171,7 @@ public class Order extends OrderDetail implements Serializable {
private String payUrl;//支付链接 private String payUrl;//支付链接
private String commonName;//产品全名称 private String commonName;//产品全名称
private String isSales;//是否购买 private String isSales;//是否购买
private String serviceName;//客服名称
public Order() { public Order() {
......
...@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSON; ...@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson.serializer.SerializerFeature;
import com.cftech.authentication.model.Authentication;
import com.cftech.authentication.service.AuthenticationService;
import com.cftech.base.codingrule.utils.CodingruleUtils; import com.cftech.base.codingrule.utils.CodingruleUtils;
import com.cftech.core.util.SystemConfig; import com.cftech.core.util.SystemConfig;
import com.cftech.couponrecord.service.CouponrecordService; import com.cftech.couponrecord.service.CouponrecordService;
...@@ -71,6 +73,7 @@ public class OrderController { ...@@ -71,6 +73,7 @@ public class OrderController {
public static final String ORDER_VIEW = "qy:order:view"; public static final String ORDER_VIEW = "qy:order:view";
public static final String ORDER_EDIT = "qy:order:edit"; public static final String ORDER_EDIT = "qy:order:edit";
public static final String ORDER_PAY = "qy:order:pay";
public static final DoubleJSONFilter DOUBLE_JSON_FILTER = new DoubleJSONFilter(); public static final DoubleJSONFilter DOUBLE_JSON_FILTER = new DoubleJSONFilter();
@Autowired @Autowired
...@@ -109,6 +112,9 @@ public class OrderController { ...@@ -109,6 +112,9 @@ public class OrderController {
@Autowired @Autowired
private OrderDetailsService orderDetailsService; private OrderDetailsService orderDetailsService;
@Autowired
private AuthenticationService authenticationService;
//列表页面 //列表页面
@RequiresPermissions(value = ORDER_VIEW) @RequiresPermissions(value = ORDER_VIEW)
@RequestMapping("/list") @RequestMapping("/list")
...@@ -246,16 +252,12 @@ public class OrderController { ...@@ -246,16 +252,12 @@ public class OrderController {
Long accountsId = UserUtils.getmpaccounts(request); Long accountsId = UserUtils.getmpaccounts(request);
MpAccountsEntity mpAccountsEntity = accountsService.getDetail(accountsId); MpAccountsEntity mpAccountsEntity = accountsService.getDetail(accountsId);
boolean leader = roleService.selectRoleEntityByUserId(userid, Constants.SYSTEM_LEADER); boolean leader = roleService.selectRoleEntityByUserId(user.getId(), Constants.SYSTEM_LEADER);//药房主管
if (leader) { boolean manager = roleService.selectRoleEntityByUserId(user.getId(), Constants.SYSTEM_STORAGEMANAGER);//订单员
if (leader || manager) {
userid = 1L;//药店主管 userid = 1L;//药店主管
} }
boolean manager = roleService.selectRoleEntityByUserId(userid, Constants.SYSTEM_STORAGEMANAGER);
if (manager) {
userid = 1L;//仓管员
}
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("o.del_flag", Constants.DEL_FLAG_0); conds.equal("o.del_flag", Constants.DEL_FLAG_0);
conds.equal("o.accounts_id", accountsId); conds.equal("o.accounts_id", accountsId);
...@@ -289,8 +291,6 @@ public class OrderController { ...@@ -289,8 +291,6 @@ public class OrderController {
//三期患者 //三期患者
if (StringUtils.equals("3", order.getIsThree())) { if (StringUtils.equals("3", order.getIsThree())) {
conds.equal("au.status", "0");
} else if (StringUtils.equals("4", order.getIsThree())) {
conds.equal("au.status", "1"); conds.equal("au.status", "1");
} }
...@@ -413,6 +413,39 @@ public class OrderController { ...@@ -413,6 +413,39 @@ public class OrderController {
return rtnJosn; return rtnJosn;
} }
//删除数据
@RequiresPermissions(value = ORDER_PAY)
@RequestMapping("/changeOrderPay")
@ResponseBody
public JSONObject changeOrderPay(Long orderId, BigDecimal payment) {
JSONObject rtnJosn = new JSONObject();
OrderFromVO orderVo = orderService.fetchId(orderId);
if (orderVo == null) {
rtnJosn.put("errorNo", 1);
return rtnJosn;
}
Double oldAmount = orderVo.getOrderAmount() == null ? 0:Double.parseDouble(orderVo.getOrderAmount());
Double amount = payment.doubleValue();
try {
Order order = new Order();
order.setStatus(null);
order.setId(orderVo.getId());
order.setOrderAmount(payment.doubleValue());
if (orderService.update(order)) {//增加修改记录
Authentication authentication = new Authentication();
authentication.setOrderId(orderId);
authentication.setUserId(UserUtils.getUser().getUserid());
authentication.setAmount(amount);
authentication.setOldAmount(oldAmount);
authenticationService.save(authentication);
}
rtnJosn.put("errorNo", 0);
} catch (Exception e) {
rtnJosn.put("errorNo", 1);
}
return rtnJosn;
}
@RequestMapping("/exportExcel") @RequestMapping("/exportExcel")
@RequiresPermissions(value = ORDER_VIEW) @RequiresPermissions(value = ORDER_VIEW)
public void exportExcel(HttpServletRequest request, HttpServletResponse response, Order order) { public void exportExcel(HttpServletRequest request, HttpServletResponse response, Order order) {
......
...@@ -257,6 +257,14 @@ ...@@ -257,6 +257,14 @@
</select> </select>
</div> </div>
<div class="form-group form-md-line-input col-md-12">
<label>三期临床偏移天数</label>
<input type="text" class="form-control pull-right"
value="$!{data.deviation}" maxlength="200" required
name="deviation" placeholder="三期临床偏移天数"
>
</div>
<div class="form-group form-md-line-input col-md-12"> <div class="form-group form-md-line-input col-md-12">
<label>产品税收编码</label> <label>产品税收编码</label>
<input type="text" class="form-control pull-right" <input type="text" class="form-control pull-right"
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
<result column="isreading" property="isreading"/> <result column="isreading" property="isreading"/>
<result column="unit" property="unit"/> <result column="unit" property="unit"/>
<result column="invoice_code" property="invoiceCode"/> <result column="invoice_code" property="invoiceCode"/>
<result column="deviation" property="deviation"/>
</resultMap> </resultMap>
<sql id="sqlWhere"> <sql id="sqlWhere">
...@@ -65,66 +66,68 @@ ...@@ -65,66 +66,68 @@
</sql> </sql>
<sql id="sqlColumns"> <sql id="sqlColumns">
id, id,
classify_id, classify_id,
product_name, product_name,
common_name, common_name,
dosaga_from, dosaga_from,
format, format,
approve_number, approve_number,
manufacturer, manufacturer,
recommend_measure, recommend_measure,
tips, tips,
take_type, take_type,
take_frequency, take_frequency,
take_amount, take_amount,
stock, stock,
price, price,
product_img, product_img,
accounts_id, accounts_id,
del_flag, del_flag,
status, status,
create_time, create_time,
update_time, update_time,
description, description,
create_by, create_by,
update_by, update_by,
product_number, product_number,
product_img_detail, product_img_detail,
is_rs, is_rs,
reading, reading,
size, size,
isreading, isreading,
unit, unit,
invoice_code invoice_code,
</sql> deviation
</sql>
<sql id="productList"> <sql id="productList">
t.id AS ID, t.id AS ID,
t.product_name AS productName, t.product_name AS productName,
t.classify_id AS classifyId, t.classify_id AS classifyId,
t.product_img AS productImg, t.product_img AS productImg,
t.recommend_measure AS recommendMeasure, t.recommend_measure AS recommendMeasure,
t.dosaga_from AS dosagaFrom, t.dosaga_from AS dosagaFrom,
t.common_name AS commonName, t.common_name AS commonName,
t.format, t.format,
t.approve_number AS approveNumber, t.approve_number AS approveNumber,
t.manufacturer, t.manufacturer,
t.description, t.description,
t.tips, t.tips,
t.take_type AS takeType, t.take_type AS takeType,
t.take_frequency AS takeFrequency, t.take_frequency AS takeFrequency,
t.take_amount AS takeAmount, t.take_amount AS takeAmount,
t.stock, t.stock,
t.price, t.price,
t.is_rs AS isRs, t.is_rs AS isRs,
t.product_number AS productNumber, t.product_number AS productNumber,
t.accounts_id AS accountsId, t.accounts_id AS accountsId,
c.classify_name AS classifyName, c.classify_name AS classifyName,
t.product_img_detail AS productImgDetail, t.product_img_detail AS productImgDetail,
t.reading, t.reading,
t.isreading, t.isreading,
t.invoice_code invoiceCode t.invoice_code invoiceCode,
t.deviation
</sql> </sql>
<insert id="save" parameterType="com.cftech.product.model.Product" useGeneratedKeys="true" <insert id="save" parameterType="com.cftech.product.model.Product" useGeneratedKeys="true"
...@@ -166,7 +169,8 @@ ...@@ -166,7 +169,8 @@
#{size, jdbcType=BIGINT}, #{size, jdbcType=BIGINT},
#{isreading, jdbcType=BIGINT}, #{isreading, jdbcType=BIGINT},
#{unit,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR},
#{invoiceCode,jdbcType=VARCHAR} #{invoiceCode,jdbcType=VARCHAR},
#{deviation, jdbcType=BIGINT}
) )
</insert> </insert>
...@@ -215,7 +219,8 @@ ...@@ -215,7 +219,8 @@
a.product_number productNumber, a.product_number productNumber,
a.is_rs isRs, a.is_rs isRs,
a.reading reading, a.reading reading,
a.invoice_code a.invoice_code,
a.deviation
FROM FROM
t_aidea_product a t_aidea_product a
LEFT JOIN t_aidea_product_classify b ON a.classify_id = b.id LEFT JOIN t_aidea_product_classify b ON a.classify_id = b.id
...@@ -366,7 +371,10 @@ ...@@ -366,7 +371,10 @@
isreading = #{isreading , jdbcType=BIGINT}, isreading = #{isreading , jdbcType=BIGINT},
</if> </if>
<if test="invoiceCode != null"> <if test="invoiceCode != null">
invoice_code = #{invoiceCode , jdbcType=VARCHAR} invoice_code = #{invoiceCode , jdbcType=VARCHAR},
</if>
<if test="deviation != null">
deviation = #{deviation, jdbcType=BIGINT}
</if> </if>
</set> </set>
where id=#{id,jdbcType=BIGINT} where id=#{id,jdbcType=BIGINT}
......
...@@ -162,6 +162,8 @@ public class Product implements Serializable { ...@@ -162,6 +162,8 @@ public class Product implements Serializable {
private Long createBy; private Long createBy;
/* 更新人 */ /* 更新人 */
private Long updateBy; private Long updateBy;
/* 偏移量 */
private Long deviation;
public Product() { public Product() {
this.delFlag = false; this.delFlag = false;
......
...@@ -300,8 +300,8 @@ ...@@ -300,8 +300,8 @@
consult.consult_id consultNumber, consult.consult_id consultNumber,
CONVERT ( AES_DECRYPT( consult.user_name, 'aideakey' ) USING UTF8 ) userName, CONVERT ( AES_DECRYPT( consult.user_name, 'aideakey' ) USING UTF8 ) userName,
CONVERT ( AES_DECRYPT( consult.phone, 'aideakey' ) USING UTF8 ) phone, CONVERT ( AES_DECRYPT( consult.phone, 'aideakey' ) USING UTF8 ) phone,
qyuser.`name` cfDoctor, consult.past_records cfDoctor,
org1.org_name cfHospital, consult.allergy cfHospital,
ord.pay_time fkTime, ord.pay_time fkTime,
waybill.send_express_date fhTime, waybill.send_express_date fhTime,
waybill.accept_express_date sjTime, waybill.accept_express_date sjTime,
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<div id="printContent" style="display:none;"> <div id="printContent" style="display:none;">
<div class="invoice"> <div class="invoice">
<div class="header"> <div class="header">
<div class="storename">诺康大药房咨询平台</div> <div class="storename">诺康大药房</div>
<div class="describe">***一切为了百姓***</div> <div class="describe">***一切为了百姓***</div>
<div class="orderNumber">订单号 <span>$!{printData.orderCode}</span></div> <div class="orderNumber">订单号 <span>$!{printData.orderCode}</span></div>
<div class="deliverydate">发货日期 <span>$!date.format('yyyy-MM-dd HH:mm:ss',$!printData.printDate)</span></div> <div class="deliverydate">发货日期 <span>$!date.format('yyyy-MM-dd HH:mm:ss',$!printData.printDate)</span></div>
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
<div class="splitline"></div> <div class="splitline"></div>
<div class="footer"> <div class="footer">
<div class="think">***谢谢惠顾***</div> <div class="think">***谢谢惠顾***</div>
<div class="think">[如非质量问题,概不退换]</div> <div class="think">[非质量问题/物流破损,概不退换]</div>
<div>门店电话:400-828-4688</div> <div>门店电话:400-828-4688</div>
<div>门店地址:扬州市运河西路233号</div> <div>门店地址:扬州市运河西路233号</div>
</div> </div>
...@@ -228,13 +228,13 @@ ...@@ -228,13 +228,13 @@
<div class="panel-heading">联系人信息</div> <div class="panel-heading">联系人信息</div>
<div class="panel-body"> <div class="panel-body">
<div class="form-group form-md-line-input col-xs-5"> <!-- <div class="form-group form-md-line-input col-xs-5">-->
<label>粉丝名称</label> <!-- <label>粉丝名称</label>-->
<input type="text" <!-- <input type="text"-->
class="form-control" id="nickName" name="nickName" <!-- class="form-control" id="nickName" name="nickName"-->
maxlength="500" placeholder="粉丝名称" <!-- maxlength="500" placeholder="粉丝名称"-->
value="$!{data.nickName}" readonly> <!-- value="$!{data.nickName}" readonly>-->
</div> <!-- </div>-->
<div class="form-group form-md-line-input col-xs-5"> <div class="form-group form-md-line-input col-xs-5">
<label>联系人</label> <label>联系人</label>
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<div id="printContent" style="display:none;"> <div id="printContent" style="display:none;">
<div class="invoice"> <div class="invoice">
<div class="header"> <div class="header">
<div style="font-size: 16px; margin-left: 48px;">诺康大药房咨询平台</div> <div style="font-size: 16px;text-align: center;">诺康大药房</div>
<div class="describe">&nbsp;&nbsp;&nbsp;</div> <div class="describe">&nbsp;&nbsp;&nbsp;</div>
<div class="orderNumber">订单号 <span>$!{printData.orderCode}</span></div> <div class="orderNumber">订单号 <span>$!{printData.orderCode}</span></div>
<div class="deliverydate">发货日期 <span>$!date.format('yyyy-MM-dd HH:mm:ss', $!printData.printDate)</span></div> <div class="deliverydate">发货日期 <span>$!date.format('yyyy-MM-dd HH:mm:ss', $!printData.printDate)</span></div>
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<div class="splitline"></div> <div class="splitline"></div>
<div class="footer"> <div class="footer">
<div class="think">***谢谢惠顾***</div> <div class="think">***谢谢惠顾***</div>
<div class="think">[如非质量/物流破损,概不退换]</div> <div class="think">[非质量问题/物流破损,概不退换]</div>
<div>门店电话:400-828-4688</div> <div>门店电话:400-828-4688</div>
<div>门店地址:扬州市邗江区科技园路18号</div> <div>门店地址:扬州市邗江区科技园路18号</div>
</div> </div>
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
<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>
...@@ -335,10 +335,10 @@ ...@@ -335,10 +335,10 @@
} }
} }
}, },
{ // {
"width": "100px", // "width": "100px",
"mData": "nickName" // "mData": "nickName"
}, // },
{ {
"width": "100px", "width": "100px",
"mData": "contact", "mData": "contact",
...@@ -390,14 +390,14 @@ ...@@ -390,14 +390,14 @@
'targets': [0] 'targets': [0]
}, },
{ {
"aTargets": [11], "aTargets": [10],
"mData": "id", "mData": "id",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
var html = ''; var html = '';
html += '<a href="#springUrl("/a/waybill/form?id=' + a + '")" class="btn green">查看</a>'; html += '<a href="#springUrl("/a/waybill/form?id=' + a + '")" class="btn green">查看</a>';
html += '#if($shiro.hasPermission("qy:waybill:edit"))'; html += '#if($shiro.hasPermission("qy:waybill:edit"))';
html += '<a onclick="printerSfSdk(' + c.orderId + ')" class="btn green">打印物流单</a>';
html += '<a onclick="printSheets(' + c.orderId + ')" class="btn green">打印随行单</a>'; html += '<a onclick="printSheets(' + c.orderId + ')" class="btn green">打印随行单</a>';
html += '<a onclick="printerSfSdk(' + c.orderId + ')" class="btn green">打印物流单</a>';
html += '#end'; html += '#end';
return html; return html;
} }
......
...@@ -237,6 +237,7 @@ ...@@ -237,6 +237,7 @@
LEFT JOIN user u ON u.id = t.storage_manage LEFT JOIN user u ON u.id = t.storage_manage
LEFT JOIN t_qyuser qyu ON qyu.id = u.userid LEFT JOIN t_qyuser qyu ON qyu.id = u.userid
WHERE t.id = #{id} WHERE t.id = #{id}
GROUP BY t.id
</select> </select>
<select id="fetchByWayBillId" parameterType="java.lang.Long" resultType="com.cftech.waybill.model.Waybill"> <select id="fetchByWayBillId" parameterType="java.lang.Long" resultType="com.cftech.waybill.model.Waybill">
...@@ -291,10 +292,13 @@ ...@@ -291,10 +292,13 @@
LEFT JOIN user u ON u.id = t.storage_manage LEFT JOIN user u ON u.id = t.storage_manage
LEFT JOIN t_qyuser qyu ON qyu.id = u.userid LEFT JOIN t_qyuser qyu ON qyu.id = u.userid
WHERE t.id = #{id} WHERE t.id = #{id}
GROUP BY t.id
</select> </select>
<select id="count" parameterType="java.util.Map" resultType="java.lang.Integer"> <select id="count" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT COUNT(1) FROM t_aidea_waybill t SELECT IFNULL(sum(cot), 0) FROM
(SELECT COUNT(1) cot
FROM t_aidea_waybill t
LEFT JOIN t_aidea_consult_sheet cs ON cs.id = t.consult_id LEFT JOIN t_aidea_consult_sheet cs ON cs.id = t.consult_id
LEFT JOIN t_order o ON t.order_id = o.id LEFT JOIN t_order o ON t.order_id = o.id
LEFT JOIN t_order_details od ON o.id = od.order_id LEFT JOIN t_order_details od ON o.id = od.order_id
...@@ -302,6 +306,7 @@ ...@@ -302,6 +306,7 @@
LEFT JOIN user u ON u.id = t.storage_manage LEFT JOIN user u ON u.id = t.storage_manage
LEFT JOIN t_qyuser qyu ON qyu.id = u.userid LEFT JOIN t_qyuser qyu ON qyu.id = u.userid
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
GROUP BY t.id ) duals
</select> </select>
<select id="fetchSearchByPage" parameterType="java.util.Map" resultType="com.cftech.waybill.model.Waybill"> <select id="fetchSearchByPage" parameterType="java.util.Map" resultType="com.cftech.waybill.model.Waybill">
...@@ -356,6 +361,7 @@ ...@@ -356,6 +361,7 @@
LEFT JOIN user u ON u.id = t.storage_manage LEFT JOIN user u ON u.id = t.storage_manage
LEFT JOIN t_qyuser qyu ON qyu.id = u.userid LEFT JOIN t_qyuser qyu ON qyu.id = u.userid
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
GROUP BY t.id
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if> <if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
<if test="limit>0">limit #{offset},#{limit}</if> <if test="limit>0">limit #{offset},#{limit}</if>
</select> </select>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task-3.1.xsd http://www.springframework.org/schema/task/spring-task-3.1.xsd
http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo
http://www.springframework.org/schema/data/mongo/spring-mongo.xsd"> http://www.springframework.org/schema/data/mongo/spring-mongo.xsd">
<!--<bean id="springContextHolder" class="com.cftech.core.util.SpringContextHolder" />--> <!--<bean id="springContextHolder" class="com.cftech.core.util.SpringContextHolder" />-->
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<bean id="convertPwdPropertyConfigurer" class="com.cftech.core.util.ConvertPwdPropertyConfigurer"> <bean id="convertPwdPropertyConfigurer" class="com.cftech.core.util.ConvertPwdPropertyConfigurer">
<property name="locations"> <property name="locations">
<list> <list>
<value>classpath*:application-test.properties</value> <value>classpath*:application.properties</value>
</list> </list>
</property> </property>
</bean> </bean>
......
...@@ -15,6 +15,10 @@ CONSULT_SHEET_AUDIT_FAILED_TEMPLATE_MSG=77tLdRPQx1m8Gg0-t9HCGVOlka0G4ocFPdq8D5Uk ...@@ -15,6 +15,10 @@ CONSULT_SHEET_AUDIT_FAILED_TEMPLATE_MSG=77tLdRPQx1m8Gg0-t9HCGVOlka0G4ocFPdq8D5Uk
CHECK_RESULT_TEMPLATE_MSG=5Fy77DKlvulE4L2vxsQfhOsJuRqQzIoI-LSmDYWCJt0 CHECK_RESULT_TEMPLATE_MSG=5Fy77DKlvulE4L2vxsQfhOsJuRqQzIoI-LSmDYWCJt0
#\u75C5\u8F7D\u68C0\u6D4B\u5238\u751F\u6548\u63D0\u9192 #\u75C5\u8F7D\u68C0\u6D4B\u5238\u751F\u6548\u63D0\u9192
CHECK_COUPON_TAKE_EFFECT_REMIND_TEMPLATE_MSG=NQj8PWw12eA5v-IgN-L2e35FS5NGG4kE7AlvX1vHDfY CHECK_COUPON_TAKE_EFFECT_REMIND_TEMPLATE_MSG=NQj8PWw12eA5v-IgN-L2e35FS5NGG4kE7AlvX1vHDfY
#\u4E2A\u4EBA\u4E2D\u5FC3\u4E09\u671F\u5BA1\u6279\u901A\u8FC7
LEVEL_3_AUDIT_PASS_TEMPLATE_MSG=l6jMcA_4nQrxX0PsGOuXh6zO1Yt9XavYC7QMeejpeD4
#\u4E2A\u4EBA\u4E2D\u5FC3\u4E09\u671F\u5BA1\u6279\u4E0D\u901A\u8FC7
LEVEL_3_AUDIT_NOT_PASS_TEMPLATE_MSG=sk6ZQobwIlA7ohN0yslRIx0yF03AxusZfE7t9Y37Dg8
#\u4F01\u4E1A\u53F7\u914D\u7F6E\u4FE1\u606F #\u4F01\u4E1A\u53F7\u914D\u7F6E\u4FE1\u606F
ROOT_ORG_NAME=\u6C5F\u82CF\u827E\u8FEA\u836F\u4E1A ROOT_ORG_NAME=\u6C5F\u82CF\u827E\u8FEA\u836F\u4E1A
......
...@@ -15,6 +15,10 @@ CONSULT_SHEET_AUDIT_FAILED_TEMPLATE_MSG=77tLdRPQx1m8Gg0-t9HCGVOlka0G4ocFPdq8D5Uk ...@@ -15,6 +15,10 @@ CONSULT_SHEET_AUDIT_FAILED_TEMPLATE_MSG=77tLdRPQx1m8Gg0-t9HCGVOlka0G4ocFPdq8D5Uk
CHECK_RESULT_TEMPLATE_MSG=EFXXW0EuaryPpK0jYPhZxYQIA8BaHfGtY1MoVz_n6T0 CHECK_RESULT_TEMPLATE_MSG=EFXXW0EuaryPpK0jYPhZxYQIA8BaHfGtY1MoVz_n6T0
#\u75C5\u8F7D\u68C0\u6D4B\u5238\u751F\u6548\u63D0\u9192 #\u75C5\u8F7D\u68C0\u6D4B\u5238\u751F\u6548\u63D0\u9192
CHECK_COUPON_TAKE_EFFECT_REMIND_TEMPLATE_MSG=ptIoaIzt8_8zWRLXsWsuwizO-HckVOcCW2EqnExlhdc CHECK_COUPON_TAKE_EFFECT_REMIND_TEMPLATE_MSG=ptIoaIzt8_8zWRLXsWsuwizO-HckVOcCW2EqnExlhdc
#\u4E2A\u4EBA\u4E2D\u5FC3\u4E09\u671F\u5BA1\u6279\u901A\u8FC7
LEVEL_3_AUDIT_PASS_TEMPLATE_MSG=l6jMcA_4nQrxX0PsGOuXh6zO1Yt9XavYC7QMeejpeD4
#\u4E2A\u4EBA\u4E2D\u5FC3\u4E09\u671F\u5BA1\u6279\u4E0D\u901A\u8FC7
LEVEL_3_AUDIT_NOT_PASS_TEMPLATE_MSG=sk6ZQobwIlA7ohN0yslRIx0yF03AxusZfE7t9Y37Dg8
#\u4F01\u4E1A\u53F7\u914D\u7F6E\u4FE1\u606F #\u4F01\u4E1A\u53F7\u914D\u7F6E\u4FE1\u606F
ROOT_ORG_NAME=\u6C5F\u82CF\u827E\u8FEA\u836F\u4E1A ROOT_ORG_NAME=\u6C5F\u82CF\u827E\u8FEA\u836F\u4E1A
......
...@@ -137,6 +137,32 @@ ...@@ -137,6 +137,32 @@
var url = $(this).attr("data"); var url = $(this).attr("data");
$(".content").attr("src", url); $(".content").attr("src", url);
}); });
// window.onbeforeunload = onbeforeunload_handler;
// function onbeforeunload_handler(){
//
// $.ajax({
// "type": "GET",
// "url": sSource,
// "dataType": "json",
// "success": function() {
//
// }
// });
// }
//清除cookie
// function clearCookie(name) {
// setCookie(name, "", -1);
// }
//
// function setCookie(cname, cvalue, exdays) {
// var d = new Date();
// d.setTime(d.getTime() + (exdays*24*60*60*1000));
// var expires = "expires="+d.toUTCString();
// document.cookie = cname + "=" + cvalue + "; " + expires;
// }
</script> </script>
</body> </body>
......
...@@ -5,6 +5,7 @@ import com.cftech.core.sql.Conds; ...@@ -5,6 +5,7 @@ import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort; import com.cftech.core.sql.Sort;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
...@@ -14,10 +14,10 @@ public class SystemConfig { ...@@ -14,10 +14,10 @@ public class SystemConfig {
try { try {
// inputStream = SystemConfig.class.newInstance().getClass() // inputStream = SystemConfig.class.newInstance().getClass()
// .getClassLoader().getResourceAsStream(""); // .getClassLoader().getResourceAsStream("");
p.load(new InputStreamReader(SystemConfig.class.getClassLoader().getResourceAsStream("/common-test.properties"), "utf-8")); p.load(new InputStreamReader(SystemConfig.class.getClassLoader().getResourceAsStream("/common.properties"), "utf-8"));
inputStreamRedis = SystemConfig.class.newInstance().getClass() inputStreamRedis = SystemConfig.class.newInstance().getClass()
.getClassLoader().getResourceAsStream("/redis-config-test.properties"); .getClassLoader().getResourceAsStream("/redis-config.properties");
r.load(inputStreamRedis); r.load(inputStreamRedis);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
...@@ -906,7 +906,7 @@ ...@@ -906,7 +906,7 @@
function onArticle(e) { function onArticle(e) {
if (e.target.value == 1) { if (e.target.value == 1) {
Cfapp.confirm({ Cfapp.confirm({
message: "是否确认取消推荐文章", message: "是否确认发布文章",
btntext: "确定", btntext: "确定",
btncanceltext: "取消", btncanceltext: "取消",
success: function () { success: function () {
...@@ -923,7 +923,7 @@ ...@@ -923,7 +923,7 @@
}); });
} else if (e.target.value == 0){ } else if (e.target.value == 0){
Cfapp.confirm({ Cfapp.confirm({
message: "是否确认推荐文章", message: "是否确认发布文章",
btntext: "确定", btntext: "确定",
btncanceltext: "取消", btncanceltext: "取消",
success: function () { success: function () {
...@@ -942,12 +942,11 @@ ...@@ -942,12 +942,11 @@
} }
function onBanner(e) { function onBanner(e) {
console.log(e.target.value);
if (e.target.value == 1) { if (e.target.value == 1) {
Cfapp.confirm({ Cfapp.confirm({
message: "是否确认取消推荐", message: "是否取消推荐banner图",
btntext: "确定", btntext: "确定",
btncanceltext: "取消", btncanceltext: "取消",
success: function () { success: function () {
...@@ -958,12 +957,17 @@ ...@@ -958,12 +957,17 @@
} }
}); });
} else { } else {
if (e.target.value == '0') { Cfapp.confirm({
e.target.value = '1' message: "是否推荐banner图",
} else if (e.target.value == '1') { btntext: "确定",
e.target.value = '0' btncanceltext: "取消",
} success: function () {
save() select(e)
},
cancel: function () {
location.href = "#springUrl('/a/cfarticle/list')";
}
});
} }
} }
......
...@@ -356,26 +356,27 @@ ...@@ -356,26 +356,27 @@
<select id="recommended" resultType="com.cftech.cms.cfarticle.model.CfarticleVO" > <select id="recommended" resultType="com.cftech.cms.cfarticle.model.CfarticleVO" >
select select
a.id, a.id,
a.title, a.title,
a.author, a.author,
a.bigimg, a.bigimg,
a.smallimg, a.smallimg,
a.content, a.content,
a.desc, a.desc,
a.create_time AS createTime, a.create_time AS createTime,
a.reading, a.reading,
b.name, b.name,
a.recommended, a.recommended,
a.whether_banner AS whetherBanner, a.whether_banner AS whetherBanner,
a.size a.size,
FROM wx_cms_cfarticle a a.article
LEFT JOIN wx_cms_column b FROM wx_cms_cfarticle a
ON b.id = a.`column` LEFT JOIN wx_cms_column b
WHERE a.del_flag = 0 ON b.id = a.`column`
<if test="id!=null"> WHERE a.del_flag = 0
and a.id = #{id} <if test="id!=null">
</if> and a.id = #{id}
</if>
ORDER BY ORDER BY
a.create_time a.create_time
</select> </select>
...@@ -453,27 +454,28 @@ SELECT count(*) FROM wx_cms_cfarticle WHERE whether_banner= 1 and del_flag=0 ...@@ -453,27 +454,28 @@ SELECT count(*) FROM wx_cms_cfarticle WHERE whether_banner= 1 and del_flag=0
</select> </select>
<select id="columnDetails" resultType="com.cftech.cms.cfarticle.model.CfarticleVO" > <select id="columnDetails" resultType="com.cftech.cms.cfarticle.model.CfarticleVO" >
select select
id, id,
title, title,
author, author,
bigimg, bigimg,
smallimg, smallimg,
content, content,
create_time AS createTime, create_time AS createTime,
update_time AS updatetime, update_time AS updatetime,
reading, reading,
recommended, recommended,
whether_banner AS whetherBanner, whether_banner AS whetherBanner,
size size,
FROM wx_cms_cfarticle article
WHERE del_flag=0 FROM wx_cms_cfarticle
<if test="id!=null"> WHERE del_flag=0
AND `column`= #{id} <if test="id!=null">
</if> AND `column`= #{id}
<if test="title!=null and title!=''"> </if>
AND CONCAT(IFNULL(`title`,''),IFNULL(`author`,'')) LIKE '%${title}%' <if test="title!=null and title!=''">
</if> AND CONCAT(IFNULL(`title`,''),IFNULL(`author`,'')) LIKE '%${title}%'
</if>
ORDER BY ORDER BY
create_time create_time
DESC DESC
......
...@@ -38,9 +38,10 @@ public class CfarticleVO { ...@@ -38,9 +38,10 @@ public class CfarticleVO {
private Long reading; private Long reading;
/*是否置顶文章*/ /*是否置顶文章*/
private Long recommended; private Long recommended;
/*是否置顶banner*/ /*是否置顶banner*/
private Long whetherBanner; private Long whetherBanner;
/* 是否发布文章 */
private Long article;
private Long size; private Long size;
} }
...@@ -112,12 +112,8 @@ public class CfarticleServiceImpl extends GenericServiceImpl<Cfarticle> implemen ...@@ -112,12 +112,8 @@ public class CfarticleServiceImpl extends GenericServiceImpl<Cfarticle> implemen
List<CfarticleVO> recommended = cfarticleMapper.recommended(id); List<CfarticleVO> recommended = cfarticleMapper.recommended(id);
if (recommended.size()>0) { if (recommended.size()>0) {
for (CfarticleVO cfarticleVO : recommended) { for (CfarticleVO cfarticleVO : recommended) {
String contents = ESAPI.encoder().decodeForHTML(cfarticleVO.getContent()); String contents = ESAPI.encoder().decodeForHTML(cfarticleVO.getContent());
String unCond = HtmlUtils.htmlUnescape(contents); String unCond = HtmlUtils.htmlUnescape(contents);
//String value = HtmlUtils.htmlEscape(unCond,"UTF-8");
// String content = cfarticleVO.getContent();
// String s1 = StringEscapeUtils.unescapeHtml(content);
// String all = s1.replaceAll("&quot;", "\"");
cfarticleVO.setContent(unCond); cfarticleVO.setContent(unCond);
} }
rtnJson.put("errorNo", "0"); rtnJson.put("errorNo", "0");
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title" style="font-weight: 700;">设置患者类型</h4> <h4 class="modal-title" style="font-weight: 700;">设置用户类型</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<form> <form>
<input id="tabNumberId" name="tabNumberId" style="display: none;"> <input id="tabNumberId" name="tabNumberId" style="display: none;">
<div class="form-group"> <div class="form-group">
<!-- <label for="message-text" class="col-form-label">请选择患者类型:</label>--> <!-- <label for="message-text" class="col-form-label">请选择用户类型:</label>-->
<select class="form-control select2" style="width: 100%" multiple="multiple" data-placeholder="请选择类型"> <select class="form-control select2" style="width: 100%" multiple="multiple" data-placeholder="请选择类型">
#foreach($group in $groups) #foreach($group in $groups)
<option value="${group.id}" data-attr="${role.roleSign}">${group.name} <option value="${group.id}" data-attr="${role.roleSign}">${group.name}
...@@ -142,18 +142,12 @@ ...@@ -142,18 +142,12 @@
<td hidden="true">Id</td> <td hidden="true">Id</td>
<th>头像</th> <th>头像</th>
<th>性别</th> <th>性别</th>
<!-- <th>姓</th>-->
<!-- <th>名</th>-->
<th>微信OPENID</th> <th>微信OPENID</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>操作</th> <th>操作</th>
</tr> </tr>
...@@ -261,9 +255,6 @@ ...@@ -261,9 +255,6 @@
{ {
"mData": "phone" "mData": "phone"
}, },
{
"mData": "cardid"
},
{ {
"mData": "source" "mData": "source"
}, },
...@@ -289,7 +280,7 @@ ...@@ -289,7 +280,7 @@
"aTargets": [1], "aTargets": [1],
"mData": "imageurl", "mData": "imageurl",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
return '<img src="' + a + '" style="width:80px;height:80px;">'; return '<img src="' + a + '" style="width:45px;height:45px;">';
} }
}, { }, {
...@@ -330,7 +321,7 @@ ...@@ -330,7 +321,7 @@
return a.slice(0, 3) + '****' + a.slice(7); return a.slice(0, 3) + '****' + a.slice(7);
} }
}, { }, {
"aTargets": [7], "aTargets": [6],
"mData": "source", "mData": "source",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a == 1) { if (a == 1) {
...@@ -349,7 +340,7 @@ ...@@ -349,7 +340,7 @@
} }
}, },
{ {
"aTargets": [8], "aTargets": [7],
"mData": "status", "mData": "status",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a == 1) { if (a == 1) {
...@@ -359,14 +350,14 @@ ...@@ -359,14 +350,14 @@
} }
}, },
{ {
"aTargets": [10], "aTargets": [9],
"mData": "createTime", "mData": "createTime",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
return formatDates(a, "yyyy-MM-dd HH:mm:ss"); return formatDates(a, "yyyy-MM-dd HH:mm:ss");
} }
}, },
{ {
"aTargets": [11], "aTargets": [10],
"mData": "id", "mData": "id",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
var html = ''; var html = '';
...@@ -513,7 +504,7 @@ ...@@ -513,7 +504,7 @@
$("#tabsDiv").modal('hide'); $("#tabsDiv").modal('hide');
let vals = $('.select2').select2('val'); let vals = $('.select2').select2('val');
if (vals.length == 0) { if (vals.length == 0) {
Cfapp.alert({ message: "请先选择患者类型", btntext: "确定", success: function () {} }); Cfapp.alert({ message: "请先选择用户类型", btntext: "确定", success: function () {} });
return; return;
} }
......
...@@ -336,10 +336,14 @@ ...@@ -336,10 +336,14 @@
m.status, m.status,
m.invitcode, m.invitcode,
q.name serviceName, q.name serviceName,
GROUP_CONCAT(g.name SEPARATOR ',') tabNames GROUP_CONCAT(g.name SEPARATOR ',') tabNames,
m.description,
o.org_name orgName,
m.audit_time auditTime
FROM wx_mp_member m FROM wx_mp_member m
LEFT JOIN t_qyuser q ON m.service_id = q.id LEFT JOIN t_qyuser q ON m.service_id = q.id
LEFT JOIN t_aidea_member_group g ON FIND_IN_SET(g.id, m.member_id) != 0 AND g.del_flag = '0' LEFT JOIN t_aidea_member_group g ON FIND_IN_SET(g.id, m.member_id) != 0 AND g.del_flag = 0
LEFT JOIN t_orgunit o ON m.storeid = o.id AND o.del_flag = 0
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
GROUP BY m.id GROUP BY m.id
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if> <if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
...@@ -372,7 +376,8 @@ ...@@ -372,7 +376,8 @@
t.open_id openid, t.open_id openid,
t.service_id serviceId, t.service_id serviceId,
u.name serviceName, u.name serviceName,
t.compan t.compan,
t.description
FROM wx_mp_member t FROM wx_mp_member t
LEFT JOIN t_orgunit o ON t.storeid = o.id LEFT JOIN t_orgunit o ON t.storeid = o.id
LEFT JOIN t_qyuser u ON t.service_id = u.id LEFT JOIN t_qyuser u ON t.service_id = u.id
......
...@@ -13,29 +13,40 @@ import java.util.Date; ...@@ -13,29 +13,40 @@ import java.util.Date;
public class MemberDto { public class MemberDto {
private Long id; private Long id;
@ExportConfig(value = "会员头像",width = 100) @ExportConfig(value = "用户头像",width = 100)
private String imageurl; private String imageurl;
@ExportConfig(value = "会员性别",width = 100) @ExportConfig(value = "用户性别",width = 100)
private String sex; private String sex;
@ExportConfig(value = "微信OPENID",width = 100) //@ExportConfig(value = "微信OPENID",width = 100)
private String openId; private String openId;
@ExportConfig(value = "会员名",width = 100) @ExportConfig(value = "用户名",width = 120)
private String name; private String name;
@ExportConfig(value = "会员手机",width = 100) @ExportConfig(value = "用户手机",width = 100)
private String phone; private String phone;
/** /**
* 随机码 * 随机码
*/ */
@ExportConfig(value = "随机码", width = 120) @ExportConfig(value = "随机码", width = 100)
private String invitcode; private String invitcode;
@ExportConfig(value = "身份证",width = 100) /**
* 入组医院
*/
@ExportConfig(value = "入组医院", width = 160)
private String orgName;
private String cardid; private String cardid;
@ExportConfig(value = "审核状态",width = 100) @ExportConfig(value = "审核状态",width = 100)
private String status; private String status;
@ExportConfig(value = "粉丝来源",width = 100) //@ExportConfig(value = "粉丝来源",width = 100)
private String source; private String source;
@ExportConfig(value = "创建时间",width = 100) @ExportConfig(value = "审核时间",width = 120, dateFormat = "yyyy-MM-dd HH:mm")
private String createTime; private Date auditTime;
@ExportConfig(value = "创建时间",width = 120, dateFormat = "yyyy-MM-dd HH:mm")
private Date createTime;
/**
* 审核不通过原因
*/
@ExportConfig(value = "审核不通过原由",width = 160)
private String description;
/** /**
* 审批人名称 * 审批人名称
...@@ -49,4 +60,9 @@ public class MemberDto { ...@@ -49,4 +60,9 @@ public class MemberDto {
} }
...@@ -77,4 +77,6 @@ public class MemberVO { ...@@ -77,4 +77,6 @@ public class MemberVO {
*/ */
private String serviceName; private String serviceName;
private String description;
} }
...@@ -14,6 +14,7 @@ import com.cftech.core.scope.OrderType; ...@@ -14,6 +14,7 @@ import com.cftech.core.scope.OrderType;
import com.cftech.core.sql.Cond; import com.cftech.core.sql.Cond;
import com.cftech.core.sql.Conds; import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort; import com.cftech.core.sql.Sort;
import com.cftech.core.util.Constants;
import com.cftech.core.util.DateFormatUtils; import com.cftech.core.util.DateFormatUtils;
import com.cftech.core.util.IdcardUtils; import com.cftech.core.util.IdcardUtils;
import com.cftech.core.util.StringUtils; import com.cftech.core.util.StringUtils;
...@@ -35,6 +36,7 @@ import org.springframework.beans.factory.annotation.Qualifier; ...@@ -35,6 +36,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import sun.plugin2.main.client.MessagePassingOneWayJSObject; import sun.plugin2.main.client.MessagePassingOneWayJSObject;
import java.lang.invoke.ConstantCallSite;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
...@@ -161,6 +163,8 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem ...@@ -161,6 +163,8 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem
if (member == null) { if (member == null) {
//验证随机号是否被使用 //验证随机号是否被使用
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("del_flag", Constants.DEL_FLAG_0);
conds.in("status", new String[]{"0", "1"});
conds.equal("invitcode", memberVO.getInvitcode()); conds.equal("invitcode", memberVO.getInvitcode());
List<Member> list = this.fetchSearchByPage(conds, null, 0, 0); List<Member> list = this.fetchSearchByPage(conds, null, 0, 0);
if (list != null && list.size() != 0) { if (list != null && list.size() != 0) {
...@@ -177,9 +181,9 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem ...@@ -177,9 +181,9 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem
member.setCardid(memberVO.getCardid()); member.setCardid(memberVO.getCardid());
member.setPhone(memberVO.getPhone()); member.setPhone(memberVO.getPhone());
member.setImageurl(memberVO.getImageUrl()); member.setImageurl(memberVO.getImageUrl());
member.setCompan(memberVO.getCompan());
//三期用户 //三期用户
if (StringUtils.equals(memberVO.getCompan(), "1")) { if (StringUtils.equals(memberVO.getCompan(), "1")) {
member.setCompan(memberVO.getCompan());
member.setStatus("0"); member.setStatus("0");
member.setStoreid(memberVO.getStoreid()); member.setStoreid(memberVO.getStoreid());
member.setInvitcode(memberVO.getInvitcode()); member.setInvitcode(memberVO.getInvitcode());
...@@ -192,6 +196,7 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem ...@@ -192,6 +196,7 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem
//验证随机号是否被使用 //验证随机号是否被使用
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("invitcode", memberVO.getInvitcode()); conds.equal("invitcode", memberVO.getInvitcode());
conds.in("status", new String[]{"0", "1"});
conds.notEqual("id", member.getId()); conds.notEqual("id", member.getId());
List<Member> list = this.fetchSearchByPage(conds, null, 0, 0); List<Member> list = this.fetchSearchByPage(conds, null, 0, 0);
if (list != null && list.size() != 0) { if (list != null && list.size() != 0) {
...@@ -203,12 +208,20 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem ...@@ -203,12 +208,20 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem
member.setName(memberVO.getMemberName()); member.setName(memberVO.getMemberName());
member.setSex(Long.parseLong(memberVO.getSex())); member.setSex(Long.parseLong(memberVO.getSex()));
member.setPhone(memberVO.getPhone()); member.setPhone(memberVO.getPhone());
member.setCompan(memberVO.getCompan());
//三期患者且审核拒绝 //三期患者且审核拒绝
if (StringUtils.equals(memberVO.getCompan(), "1") && StringUtils.equals(member.getStatus(), "2")) { if (StringUtils.equals(memberVO.getCompan(), "1") && !StringUtils.equals(member.getStatus(), "1")) {
member.setStatus("0"); member.setStatus("0");
member.setCompan(memberVO.getCompan());
member.setStoreid(memberVO.getStoreid()); member.setStoreid(memberVO.getStoreid());
member.setInvitcode(memberVO.getInvitcode()); member.setInvitcode(memberVO.getInvitcode());
} else if (StringUtils.equals(memberVO.getCompan(), "0")) {
//非三期患者
member.setCompan(memberVO.getCompan());
member.setStatus("");
member.setStoreid("");
member.setServiceId("");
member.setInvitcode("");
member.setDescription("");
} }
memberMapper.update(member); memberMapper.update(member);
rtnJson.put("errorNo", "0"); rtnJson.put("errorNo", "0");
......
...@@ -2,6 +2,7 @@ package com.cftech.member.web; ...@@ -2,6 +2,7 @@ package com.cftech.member.web;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.cftech.accounts.service.MpAccountsService;
import com.cftech.base.codingrule.utils.CodingruleUtils; import com.cftech.base.codingrule.utils.CodingruleUtils;
import com.cftech.base.org.model.OrgUnit; import com.cftech.base.org.model.OrgUnit;
import com.cftech.base.org.service.OrgUnitService; import com.cftech.base.org.service.OrgUnitService;
...@@ -12,6 +13,9 @@ import com.cftech.core.scope.OrderType; ...@@ -12,6 +13,9 @@ import com.cftech.core.scope.OrderType;
import com.cftech.core.sql.Conds; import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort; import com.cftech.core.sql.Sort;
import com.cftech.core.util.Constants; import com.cftech.core.util.Constants;
import com.cftech.core.util.DateFormatUtils;
import com.cftech.core.util.MpTokenUtil;
import com.cftech.core.util.SystemConfig;
import com.cftech.member.group.model.MemberGroup; import com.cftech.member.group.model.MemberGroup;
import com.cftech.member.group.service.MemberGroupService; import com.cftech.member.group.service.MemberGroupService;
import com.cftech.member.model.Member; import com.cftech.member.model.Member;
...@@ -28,9 +32,13 @@ import com.cftech.sys.service.RoleService; ...@@ -28,9 +32,13 @@ import com.cftech.sys.service.RoleService;
import com.cftech.workshop.workshop.model.Workshop; import com.cftech.workshop.workshop.model.Workshop;
import com.cftech.workshop.workshop.service.WorkshopService; import com.cftech.workshop.workshop.service.WorkshopService;
import com.ctc.wstx.util.StringUtil; import com.ctc.wstx.util.StringUtil;
import com.google.gson.Gson;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.json.HTTP; import org.json.HTTP;
import org.mp.api.core.req.model.message.IndustryTemplateMessageSend;
import org.mp.api.core.req.model.message.TemplateData;
import org.mp.api.wxsendmsg.JwTemplateMessageAPI;
import org.owasp.esapi.ESAPI; import org.owasp.esapi.ESAPI;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.web.csrf.CsrfToken; import org.springframework.security.web.csrf.CsrfToken;
...@@ -87,6 +95,9 @@ public class MemberController { ...@@ -87,6 +95,9 @@ public class MemberController {
@Autowired @Autowired
private MpFanssService fanssService; private MpFanssService fanssService;
@Autowired
private MpAccountsService mpAccountsService;
@Autowired @Autowired
private RoleService roleService; private RoleService roleService;
...@@ -96,6 +107,9 @@ public class MemberController { ...@@ -96,6 +107,9 @@ public class MemberController {
@Autowired @Autowired
private MemberGroupService memberGroupService; private MemberGroupService memberGroupService;
@Autowired
private MpTokenUtil mpTokenUtil;
//列表页面 //列表页面
@RequiresPermissions(value = MEMBER_VIEW) @RequiresPermissions(value = MEMBER_VIEW)
@RequestMapping("/listpl") @RequestMapping("/listpl")
...@@ -230,6 +244,9 @@ public class MemberController { ...@@ -230,6 +244,9 @@ public class MemberController {
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("m.del_flag", Constants.DEL_FLAG_0); conds.equal("m.del_flag", Constants.DEL_FLAG_0);
//三期患者
conds.notNull("m.invitcode");
conds.notNull("m.storeid");
//权限控制 //权限控制
if (user.getId() != 1 && !leader) { if (user.getId() != 1 && !leader) {
...@@ -264,7 +281,15 @@ public class MemberController { ...@@ -264,7 +281,15 @@ public class MemberController {
return rtnJson; return rtnJson;
} }
//删除数据 /**
* CRC患者审核
* @param id
* @param status
* @param remarks
* @param request
* @param response
* @return
*/
@RequiresPermissions(value = MEMBER_AUDIT) @RequiresPermissions(value = MEMBER_AUDIT)
@RequestMapping(value = "/audit", method = {RequestMethod.POST}) @RequestMapping(value = "/audit", method = {RequestMethod.POST})
@ResponseBody @ResponseBody
...@@ -281,20 +306,46 @@ public class MemberController { ...@@ -281,20 +306,46 @@ public class MemberController {
member.setAuditTime(new Date()); member.setAuditTime(new Date());
member.setServiceId(UserUtils.getUser().getId().toString()); member.setServiceId(UserUtils.getUser().getId().toString());
MpFanssEntity fanssEntity = new MpFanssEntity(); // MpFanssEntity fanssEntity = new MpFanssEntity();
fanssEntity.setOpenid(member.getOpenId()); // fanssEntity.setOpenid(member.getOpenId());
if (org.apache.commons.lang.StringUtils.equals(status, "1")) { if (org.apache.commons.lang.StringUtils.equals(status, "1")) {
member.setCompan("1"); member.setCompan("1");
fanssEntity.setUnionid("1");//三期患者
} else if (org.apache.commons.lang.StringUtils.equals(status, "2")) { } else if (org.apache.commons.lang.StringUtils.equals(status, "2")) {
member.setCompan("0"); member.setCompan("0");
fanssEntity.setUnionid("0");//普通人员
} }
if (org.apache.commons.lang.StringUtils.isNotBlank(remarks)) { if (org.apache.commons.lang.StringUtils.isNotBlank(remarks)) {
member.setDescription(remarks); member.setDescription(remarks);
} }
memberService.update(member); if (memberService.update(member)) {
fanssService.updateByOpenId(fanssEntity); if (org.apache.commons.lang3.StringUtils.equals("1", member.getStatus())) {
//审核通过
String appid = SystemConfig.p.getProperty("WX_MP_SERVER_APPID");
String refuseTmpId = SystemConfig.p.getProperty("LEVEL_3_AUDIT_PASS_TEMPLATE_MSG");
String token = mpTokenUtil.getToken(mpAccountsService.getMpAccountsAppid(appid));
String first = "您好!您的身份认证已审核通过。";
String remark = "请至个人中心查询。";
String [] keywords = {member.getName(), member.getInvitcode(),
DateFormatUtils.getDateFormat(member.getCreateTime(), "yyyy.MM.dd")};
String url = SystemConfig.p.getProperty("MOBILE_MP_DOMAIN_NAME") + "/myinfo?appid=" + appid + "&tokenId=1";
sendMessage(refuseTmpId, token, member.getOpenId(),first, remark, keywords, url);
} else if (org.apache.commons.lang3.StringUtils.equals("2", member.getStatus())) {
//审核拒绝
String appid = SystemConfig.p.getProperty("WX_MP_SERVER_APPID");
String refuseTmpId = SystemConfig.p.getProperty("LEVEL_3_AUDIT_NOT_PASS_TEMPLATE_MSG");
String token = mpTokenUtil.getToken(mpAccountsService.getMpAccountsAppid(appid));
String first = "您好,您的身份认证未审核通过。";
String remark = "点击查看审核未通过原由,并至个人中心修改重新提交。";
String [] keywords = {member.getName(), member.getInvitcode(),
DateFormatUtils.getDateFormat(member.getCreateTime(), "yyyy.MM.dd")};
String url = SystemConfig.p.getProperty("MOBILE_MP_DOMAIN_NAME") + "/myinfo?appid=" + appid + "&tokenId=1";
sendMessage(refuseTmpId, token, member.getOpenId(),first, remark, keywords, url);
}
}
//fanssService.updateByOpenId(fanssEntity);
rtnJosn.put("errorNo", 0); rtnJosn.put("errorNo", 0);
} catch (Exception e) { } catch (Exception e) {
rtnJosn.put("errorNo", 1); rtnJosn.put("errorNo", 1);
...@@ -363,11 +414,35 @@ public class MemberController { ...@@ -363,11 +414,35 @@ public class MemberController {
@RequestMapping("/exportExcel") @RequestMapping("/exportExcel")
@RequiresPermissions(value = MEMBER_VIEW) @RequiresPermissions(value = MEMBER_VIEW)
public void exportExcel(HttpServletRequest request, HttpServletResponse response, Member member) throws ParseException { public void exportExcel(HttpServletRequest request, HttpServletResponse response, Member member, String type) throws ParseException {
Long accountsId = UserUtils.getmpaccounts(request); Long accountsId = UserUtils.getmpaccounts(request);
User user = UserUtils.getUser();
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("m.del_flag", Constants.DEL_FLAG_0); conds.equal("m.del_flag", Constants.DEL_FLAG_0);
//是否拥有药店主管角色 sys:leaders
boolean leader = roleService.selectRoleEntityByUserId(user.getId(), Constants.SYSTEM_LEADER);
//权限控制
if (user.getId() != 1 && !leader) {
//获取当前人对应的审核部门
Conds orgConds = new Conds();
orgConds.equal("t.del_flag", Constants.DEL_FLAG_0);
orgConds.equal("t.three_phase_auditor", user.getUserid());
List<OrgUnit> list = orgUnitService.fetchSearchByPage(orgConds, null, 0, 0);
Long[] ids = new Long[list.size()];
for(int i=0; i<list.size(); i++) {
ids[i] = list.get(i).getId();
}
if (ids.length == 0) { ids[0] = 0L; }
conds.in("m.storeid", ids);
}
if (org.apache.commons.lang3.StringUtils.equals(type, "1")) {
conds.notNull("m.invitcode");
conds.notNull("m.storeid");
}
if (!StringUtils.isEmpty(member.getName())) { if (!StringUtils.isEmpty(member.getName())) {
conds.like("m.name", member.getName()); conds.like("m.name", member.getName());
} }
...@@ -401,11 +476,55 @@ public class MemberController { ...@@ -401,11 +476,55 @@ public class MemberController {
} else { } else {
memberDto.setSource("用户注册"); memberDto.setSource("用户注册");
} }
Date parse = simpleDateFormat.parse(memberDto.getCreateTime()); if ("0".equals(memberDto.getStatus())) {
memberDto.setCreateTime(simpleDateFormat.format(parse)); memberDto.setStatus("待认证");
} else if ("1".equals(memberDto.getStatus())) {
memberDto.setStatus("已认证");
} else if ("2".equals(memberDto.getStatus())) {
memberDto.setStatus("认证未通过");
}
} }
} }
// 生成Excel并使用浏览器下载 // 生成Excel并使用浏览器下载
ExcelKit.$Export(MemberDto.class, response).toExcel(list, "会员信息"); ExcelKit.$Export(MemberDto.class, response).toExcel(list, "CRC用户信息");
}
private void sendMessage(String templateId, String token, String openId, String first, String remark, String [] keywords, String url){
IndustryTemplateMessageSend mc = new IndustryTemplateMessageSend();
mc.setTemplate_id(templateId);
mc.setTouser(openId);
mc.setAccess_token(token);
mc.setUrl(url);
StringBuffer json = new StringBuffer();
Gson gson = new Gson();
String objJson = gson.toJson(mc);
json.append(objJson);
json.setLength(json.length()-1);
json.append(",");
json.append("\"data\":{");
TemplateData template = new TemplateData();
template.setValue(first);
//template.setColor("#ffAADD");
objJson = gson.toJson(template);
json.append(" \"first\":");
json.append(objJson);
json.append(",");
if(keywords!=null && keywords.length>0){
for(int i=0;i<keywords.length;i++){
template.setValue(keywords[i]);
objJson = gson.toJson(template);
json.append(" \"keyword"+(i+1)+"\":");
json.append(objJson);
json.append(",");
}
}
template.setValue(remark);
objJson = gson.toJson(template);
json.append(" \"remark\":");
json.append(objJson);
json.append("}}");
JwTemplateMessageAPI.sendTemplateMsgJson(json.toString(),token);
} }
} }
...@@ -208,8 +208,9 @@ ...@@ -208,8 +208,9 @@
<select id="fetchSearchByPage" parameterType="java.util.Map" resultType="com.cftech.addresst.model.Address"> <select id="fetchSearchByPage" parameterType="java.util.Map" resultType="com.cftech.addresst.model.Address">
SELECT SELECT
<include refid="sqlColumns"/>, concat( a.areaname ,b.areaname, c.areaname, t.address ) name <include refid="sqlColumns"/>, concat( a.areaname ,b.areaname, c.areaname, t.address ) name, f.nickname nickName
FROM t_shipping_address t FROM t_shipping_address t
LEFT JOIN wx_mp_fanss f ON t.open_id = f.openid AND f.delflag = '0'
INNER JOIN area a ON t.province_id = a.areaid INNER JOIN area a ON t.province_id = a.areaid
INNER JOIN area b ON t.city_id = b.areaid INNER JOIN area b ON t.city_id = b.areaid
INNER JOIN area c ON t.area_id = c.areaid INNER JOIN area c ON t.area_id = c.areaid
......
...@@ -69,6 +69,12 @@ public class Address extends Area implements Serializable { ...@@ -69,6 +69,12 @@ public class Address extends Area implements Serializable {
private String nickName; private String nickName;
private String provinceName;
private String cityName;
private String areaName;
public Address() { public Address() {
this.delFlag = false; this.delFlag = false;
this.status = "0"; this.status = "0";
......
...@@ -9,9 +9,9 @@ import com.cftech.core.scope.OrderType; ...@@ -9,9 +9,9 @@ import com.cftech.core.scope.OrderType;
import com.cftech.core.sql.Conds; import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort; import com.cftech.core.sql.Sort;
import com.cftech.core.util.Constants; import com.cftech.core.util.Constants;
import com.cftech.core.util.StringUtils;
import com.cftech.sys.security.UserUtils; import com.cftech.sys.security.UserUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
...@@ -62,8 +62,22 @@ public class AddressController { ...@@ -62,8 +62,22 @@ public class AddressController {
@RequestMapping("/form") @RequestMapping("/form")
public String form(HttpServletRequest request, String id, Model model, String pageType) { public String form(HttpServletRequest request, String id, Model model, String pageType) {
if (!StringUtils.isEmpty(id)) { if (!StringUtils.isEmpty(id)) {
Address address = addressService.fetchById(id); Conds conds = new Conds();
model.addAttribute("data", address); conds.equal("t.del_flag", Constants.DEL_FLAG_0);
conds.equal("t.id", id);
Address address = addressService.fetchSearchByConds(conds);
if (address != null) {
if (StringUtils.isNotBlank(address.getAddressName()) && address.getAddressName().length() >= 2) {
address.setAddressName(address.getAddressName().substring(0, 1) + "*" + address.getAddressName().substring(2, address.getAddressName().length()));
}
if (StringUtils.isNotBlank(address.getPhone()) && address.getPhone().length() == 11) {
address.setPhone(address.getPhone().substring(0, 3) + "****" + address.getPhone().substring(7, address.getPhone().length()));
}
if (StringUtils.isNotBlank(address.getAddress()) && address.getAddress().length() >= 5) {
address.setAddress("****" + address.getAddress().substring(4, address.getAddress().length()));
}
model.addAttribute("data", address);
}
} }
model.addAttribute("isView", StringUtils.equals(pageType, "View") ? true : false); model.addAttribute("isView", StringUtils.equals(pageType, "View") ? true : false);
return "address/addressform"; return "address/addressform";
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<section class="content-header"> <section class="content-header">
<h1> <h1>
收货地址管理管理 收货地址管理
<small>收货地址管理</small> <small>收货地址管理</small>
</h1> </h1>
<ol class="breadcrumb"> <ol class="breadcrumb">
...@@ -121,43 +121,59 @@ ...@@ -121,43 +121,59 @@
<div class="form-group form-md-line-input col-md-12"> <div class="form-group form-md-line-input col-md-12">
<label>省份<font style="color: red"></font></label><br> <label>省份<font style="color: red"></font></label><br>
<!-- <input class="form-control" id="province" name="provinceName"--> #if ($!{isView} == 'true')
<!-- type="text" readonly="readonly"--> <input type="text"
<!-- maxlength="50" placeholder="省份"--> class="form-control" name="provinceName"
<!-- value="$!{data.provinceName}"--> id="provinceName"
<!-- >--> maxlength="50" placeholder="省份"
value="$!{data.provinceName}"
readonly="readonly"
>
#else
<select id="province" name="provinceId" onchange="getCityList(this.value)" <select id="province" name="provinceId" onchange="getCityList(this.value)"
#if($!{isView}=='true') disabled #end #if($!{isView}=='true') disabled #end
class="form-control required"> class="form-control required">
<option value="">请选择省份</option> <option value="">请选择省份</option>
</select> </select>
#end
</div> </div>
<div class="form-group form-md-line-input col-md-12"> <div class="form-group form-md-line-input col-md-12">
<label>城市<font style="color: #ff0000"></font></label><br> <label>城市<font style="color: #ff0000"></font></label><br>
<!-- <input class="form-control" id="city" name="cityName"--> #if ($!{isView} == 'true')
<!-- type="text" readonly="readonly"--> <input type="text"
<!-- maxlength="50" placeholder="城市"--> class="form-control" name="cityName"
<!-- value="$!{data.cityName}"--> id="cityName"
<!-- >--> maxlength="50" placeholder="城市"
value="$!{data.cityName}"
readonly="readonly"
>
#else
<select id="city" name="cityId" onchange="getReginList(this.value);" <select id="city" name="cityId" onchange="getReginList(this.value);"
#if($!{isView}=='true') disabled #end #if($!{isView}=='true') disabled #end
class="form-control required"> class="form-control required">
<option value="">请选择城市</option> <option value="">请选择城市</option>
</select> </select>
#end
</div> </div>
<div class="form-group form-md-line-input col-md-12"> <div class="form-group form-md-line-input col-md-12">
<label>区/县<font style="color: red"></font></label><br> <label>区/县<font style="color: red"></font></label><br>
<!-- <input class="form-control" id="county" name="countyName"--> #if ($!{isView} == 'true')
<!-- type="text" readonly="readonly"--> <input type="text"
<!-- maxlength="50" placeholder="城市"--> class="form-control" name="countyName"
<!-- value="$!{data.countyName}"--> id="countyName"
<!-- >--> maxlength="50" placeholder="城市"
value="$!{data.countyName}"
readonly="readonly"
>
#else
<select id="county" name="areaId" class="form-control required" #if($!{isView}=='true') disabled #end> <select id="county" name="areaId" class="form-control required" #if($!{isView}=='true') disabled #end>
<option value="">请选择区/县</option> <option value="">请选择区/县</option>
</select> </select>
#end
</div> </div>
<div class="form-group form-md-line-input col-md-12"> <div class="form-group form-md-line-input col-md-12">
<label>详细地址<font style="color: red"></font></label> <label>详细地址<font style="color: red"></font></label>
<input type="text" <input type="text"
...@@ -226,31 +242,6 @@ ...@@ -226,31 +242,6 @@
let listCity = null let listCity = null
let listRegin = null let listRegin = null
// function tijiao() {
// var url = "#springUrl('/a/address/formData')"
// var provinceId = $("#province").val();
// var cityId = $("#city").val();
// var areaId = $("#county").val();
// var address = $("#address").val();
// var id = $("#id").val();
// $.ajax({
// type: "POST", //提交的方法
// url: url, //提交的地址
// data: {"_csrf_header": csrfheader.value, "_csrf": csrftoken.value, id, provinceId, cityId, areaId, address},// 序列化表单值
// async: false,
// success: function (data) { //成功
//
// if (data) {
//
// location.href = "#springUrl('/a/address/list')";
// } else {
// alert("修改失败")
// }
//
// }
// });
// }
jQuery(document).ready(function () { jQuery(document).ready(function () {
var url = "#springUrl('/a/address/listArea')" var url = "#springUrl('/a/address/listArea')"
$.ajax({ $.ajax({
...@@ -314,7 +305,6 @@ ...@@ -314,7 +305,6 @@
if (province==""){ if (province==""){
$("#city").append(`<option value = "">请选择城市</option>`); $("#city").append(`<option value = "">请选择城市</option>`);
$("#county").append(`<option value = "">请选择区/县</option>`); $("#county").append(`<option value = "">请选择区/县</option>`);
} }
} }
......
...@@ -318,6 +318,9 @@ ...@@ -318,6 +318,9 @@
"aTargets": [8], "aTargets": [8],
"mData": "address", "mData": "address",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a != null && a != '' && a.length >= 4) {
return '****' + a.slice(4, a.length);
}
return a; return a;
} }
}, },
......
...@@ -167,9 +167,9 @@ public class CoreService { ...@@ -167,9 +167,9 @@ public class CoreService {
//@李士伟 客服消息转发前还是要有自动回复,而且希望根据时间回复不同内容。8:30-16:30回复“您好, //@李士伟 客服消息转发前还是要有自动回复,而且希望根据时间回复不同内容。8:30-16:30回复“您好,
// 很高兴为您服务!”,其他时间段回复“非常抱歉哦~我们客服服务时间段是08:30-16:30哦~有需要请08:30之后在线咨询哦~或者是拨打全国服务热线4008288988/95105910咨询哦 // 很高兴为您服务!”,其他时间段回复“非常抱歉哦~我们客服服务时间段是08:30-16:30哦~有需要请08:30之后在线咨询哦~或者是拨打全国服务热线4008288988/95105910咨询哦
if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_TEXT)) {//文字消息进行关键字回复 if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_TEXT)) {//文字消息进行关键字回复
// String content = requestMap.get("Content"); String content = requestMap.get("Content");
// return replyMessage(fromUserName, toUserName, content, "keyword"); return replyMessage(fromUserName, toUserName, content, "keyword");
return ""; //return "";
} }
// 图片消息 // 图片消息
else if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_IMAGE)) { else if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_IMAGE)) {
...@@ -257,19 +257,17 @@ public class CoreService { ...@@ -257,19 +257,17 @@ public class CoreService {
} }
} }
} else if (replyType.equals("keyword")) { } else if (replyType.equals("keyword")) {
// List<Reply> replyList = replyService.fetchkeywordByPage(content, mpAccountEntity.getId(), "keyword"); List<Reply> replyList = replyService.fetchkeywordByPage(content, mpAccountEntity.getId(), "keyword");
// if (replyList != null && replyList.size() > 0) { if (replyList != null && replyList.size() > 0) {
// Reply reply = replyList.get(0); Reply reply = replyList.get(0);
// if (reply.getReplyType().equals("text")) {//回复文本 if (reply.getReplyType().equals("text")) {//回复文本
// return MessageUtil.textMessageToXml(text(fromUserName, toUserName, reply.getContentSource())); return MessageUtil.textMessageToXml(text(fromUserName, toUserName, reply.getContentSource()));
// } else if (reply.getReplyType().equals("news")) {//回复微信图文 } else if (reply.getReplyType().equals("news")) {//回复微信图文
// return MessageUtil.newsMessageToXml(news(fromUserName, toUserName, reply.getContentSource())); return MessageUtil.newsMessageToXml(news(fromUserName, toUserName, reply.getContentSource()));
// } else if (reply.getReplyType().equals("article")) {//回复文章 } else if (reply.getReplyType().equals("article")) {//回复文章
// return MessageUtil.newsMessageToXml(localNews(fromUserName, toUserName, reply.getContentSource())); return MessageUtil.newsMessageToXml(localNews(fromUserName, toUserName, reply.getContentSource()));
// } }
// } else {//没有匹配到关键字,接入到客服 }
// return MessageUtil.customerServiceMessageToXml(resBaseMessage(fromUserName, toUserName));
// }
} else { } else {
} }
......
...@@ -142,19 +142,6 @@ ...@@ -142,19 +142,6 @@
</div> </div>
</div> </div>
<div class="form-group form-md-line-input" id="threePhase" style="display:none">
<label>入组医院</label>
<div class="radio">
<label> <input type="radio" name="isThreePhase"
id="isThreePhase_True" value="1" #if($!{data.isThreePhase}== '1') checked #end>
</label>
<label> <input
type="radio" name="isThreePhase" id="isThreePhase_False"
value="0" #if($!{data.isThreePhase} == '0' || $!{data.isThreePhase} == '') checked #end>
</label>
</div>
</div>
<div class="form-group form-md-line-input" id="hospitalTypeId" style="display:none"> <div class="form-group form-md-line-input" id="hospitalTypeId" style="display:none">
<label for="hospitalType">医院分类</label> <label for="hospitalType">医院分类</label>
<select class="form-control" name="hospitalType" id="hospitalType"> <select class="form-control" name="hospitalType" id="hospitalType">
...@@ -168,6 +155,19 @@ ...@@ -168,6 +155,19 @@
</select> </select>
</div> </div>
<div class="form-group form-md-line-input" id="threePhase" style="display:none">
<label>入组医院</label>
<div class="radio">
<label> <input type="radio" name="isThreePhase"
id="isThreePhase_True" value="1" #if($!{data.isThreePhase}== '1') checked #end>
</label>
<label> <input
type="radio" name="isThreePhase" id="isThreePhase_False"
value="0" #if($!{data.isThreePhase} == '0' || $!{data.isThreePhase} == '') checked #end>
</label>
</div>
</div>
<div class="form-group form-md-line-input" id="threePhaseAuditorId" style="display:none"> <div class="form-group form-md-line-input" id="threePhaseAuditorId" style="display:none">
<label>CRC审核专员</label> <label>CRC审核专员</label>
<div class="input-group"> <div class="input-group">
...@@ -248,9 +248,8 @@ ...@@ -248,9 +248,8 @@
if (orgtypeId == "1") { if (orgtypeId == "1") {
$('#threePhase').show(); $('#threePhase').show();
$('#salesManagerId').show(); $('#salesManagerId').show();
$('#hospitalTypeId').show();
if (isThreePhase == "1") { if (isThreePhase == "1") {
$('#hospitalTypeId').show();
$('#threePhaseAuditorId').show(); $('#threePhaseAuditorId').show();
} }
} }
...@@ -269,6 +268,7 @@ ...@@ -269,6 +268,7 @@
if ($(this).val() == '1') { if ($(this).val() == '1') {
$('#threePhase').show(); $('#threePhase').show();
$('#salesManagerId').show(); $('#salesManagerId').show();
$('#hospitalTypeId').show();
} else { } else {
$('#threePhase').hide(); $('#threePhase').hide();
$('#salesManagerId').hide(); $('#salesManagerId').hide();
...@@ -279,10 +279,10 @@ ...@@ -279,10 +279,10 @@
$('input[name="isThreePhase"]').on('click', function() { $('input[name="isThreePhase"]').on('click', function() {
if ($(this).val() == '1') { if ($(this).val() == '1') {
$('#hospitalTypeId').show(); //$('#hospitalTypeId').show();
$('#threePhaseAuditorId').show(); $('#threePhaseAuditorId').show();
} else { } else {
$('#hospitalTypeId').hide(); //$('#hospitalTypeId').hide();
$('#threePhaseAuditorId').hide(); $('#threePhaseAuditorId').hide();
} }
}) })
......
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