Commit c29b84c8 authored by 谢希宇's avatar 谢希宇

Submit by Strive

Date 2021/03/18
parent 23b8b821
...@@ -284,7 +284,7 @@ public class CheckresultController { ...@@ -284,7 +284,7 @@ public class CheckresultController {
//设置检测人员 //设置检测人员
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("t.del_flag", Constants.DEL_FLAG_0); conds.equal("t.del_flag", Constants.DEL_FLAG_0);
conds.equal("t.number", checkresult.getSendCheckNo()); conds.equal("t.number", rowData.get(0));
Couponrecord couponrecord = couponrecordService.fetchSearchByConds(conds); Couponrecord couponrecord = couponrecordService.fetchSearchByConds(conds);
if (couponrecord != null) { if (couponrecord != null) {
checkresult.setOpenid(couponrecord.getOpenid()); checkresult.setOpenid(couponrecord.getOpenid());
......
...@@ -284,7 +284,7 @@ ...@@ -284,7 +284,7 @@
<label>处方单<font style="color: red"></font></label> <label>处方单<font style="color: red"></font></label>
<br/> <br/>
<div class="form-group " id="imageurl" <div class="form-group " id="imageurl"
style="width: 130px; height: 120px; margin-left: 5px; padding: 10px; background-color: #f4f4f4; border: 1px solid #CCCCCC"> style="width: 120px; height: 120px; margin-left: 5px; padding: 10px; background-color: #f4f4f4; border: 1px solid #CCCCCC">
<img id="prescription" <img id="prescription"
style="cursor:zoom-in; width: 100%; height: 100% " style="cursor:zoom-in; width: 100%; height: 100% "
src="$!{data.prescription}" onclick="imgcli(this)"> src="$!{data.prescription}" onclick="imgcli(this)">
...@@ -339,6 +339,7 @@ ...@@ -339,6 +339,7 @@
<th>拒绝原由</th> <th>拒绝原由</th>
<th>提交时间</th> <th>提交时间</th>
<th>审核时间</th> <th>审核时间</th>
<th>处方单</th>
</tr> </tr>
</thead> </thead>
...@@ -409,6 +410,7 @@ ...@@ -409,6 +410,7 @@
<script> <script>
var isView = `$!{isView}`; var isView = `$!{isView}`;
var orgtypeId = `$!{orgtypeId}`;//医院组织类型id
var goodsList = []; var goodsList = [];
function goodList() { function goodList() {
...@@ -568,7 +570,7 @@ ...@@ -568,7 +570,7 @@
function imgcli(obj) { function imgcli(obj) {
$('#divimg img').attr('src', $(obj).attr("src")); $('#divimg img').attr('src', $(obj).attr("src"));
var img = document.getElementById("prescription"); var img = $(obj)[0];
let imgH = img.naturalHeight;//图片高度 let imgH = img.naturalHeight;//图片高度
let imgW = img.naturalWidth;//图片宽度 let imgW = img.naturalWidth;//图片宽度
...@@ -640,7 +642,7 @@ ...@@ -640,7 +642,7 @@
*/ */
$(".selHospital").click(function () { $(".selHospital").click(function () {
Cfapp.f7({ Cfapp.f7({
dataUrl: "#springUrl('/a/wxQrcode/listOrg')", dataUrl: "#springUrl('/a/wxQrcode/listOrg')?orgtypeId="+orgtypeId,
checkType: "single", // 多选为multi checkType: "single", // 多选为multi
title: '请选择医院', title: '请选择医院',
btnoktext: "确定", btnoktext: "确定",
...@@ -1043,7 +1045,6 @@ ...@@ -1043,7 +1045,6 @@
{ {
"mData": "userName" "mData": "userName"
}, },
{ {
"mData": "status" "mData": "status"
}, },
...@@ -1055,8 +1056,10 @@ ...@@ -1055,8 +1056,10 @@
}, },
{ {
"mData": "auditTime" "mData": "auditTime"
},
{
"mData": "prescription"
} }
], ],
"aoColumnDefs": [ "aoColumnDefs": [
{ // set default column settings { // set default column settings
...@@ -1072,7 +1075,6 @@ ...@@ -1072,7 +1075,6 @@
} else { } else {
return null; return null;
} }
} }
}, },
{ {
...@@ -1085,8 +1087,6 @@ ...@@ -1085,8 +1087,6 @@
} else { } else {
return ''; return '';
} }
} }
}, },
{ {
...@@ -1145,6 +1145,17 @@ ...@@ -1145,6 +1145,17 @@
return null; return null;
} }
} }
},
{
"aTargets": [8],
"mData": "prescription",
"mRender": function (a, b, c, d) {
if (a) {
return `<img src="` + a + `" style="height: 80px; width: 80px" onclick="imgcli(this)">`;
} else {
return null;
}
}
} }
] ]
}); });
......
package com.cftech.consultsheet.dao; package com.cftech.consultsheet.dao;
import com.cftech.base.org.model.Qyuser;
import com.cftech.consultsheet.model.ConsultSheet; import com.cftech.consultsheet.model.ConsultSheet;
import com.cftech.consultsheet.model.ConsultSheetDto; import com.cftech.consultsheet.model.ConsultSheetDto;
import com.cftech.core.generic.GenericDao; import com.cftech.core.generic.GenericDao;
...@@ -20,7 +21,7 @@ import java.util.Map; ...@@ -20,7 +21,7 @@ import java.util.Map;
*/ */
public interface ConsultSheetMapper extends GenericDao<ConsultSheet> { public interface ConsultSheetMapper extends GenericDao<ConsultSheet> {
Integer updateDate(@Param("consultId") Long consultId, @Param("status") String status, @Param("description") String description); Integer updateData(@Param("consultId") Long consultId, @Param("status") String status, @Param("description") String description);
Integer updateStatus(@Param("consultId") Long id, @Param("status") String status, @Param("des") String des); Integer updateStatus(@Param("consultId") Long id, @Param("status") String status, @Param("des") String des);
...@@ -29,4 +30,11 @@ public interface ConsultSheetMapper extends GenericDao<ConsultSheet> { ...@@ -29,4 +30,11 @@ public interface ConsultSheetMapper extends GenericDao<ConsultSheet> {
List<ConsultSheet> consultSheetList(ConsultSheetDto consultSheetDto); List<ConsultSheet> consultSheetList(ConsultSheetDto consultSheetDto);
Integer fetchSearchByCount(Map<String, Object> params); Integer fetchSearchByCount(Map<String, Object> params);
/**
* 通过订单/咨询单编码获取对应客服详情
* @param billCode
* @return
*/
Qyuser byBillFindCustomerService(String billCode);
} }
\ No newline at end of file
...@@ -210,7 +210,7 @@ ...@@ -210,7 +210,7 @@
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.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="id!=null">and (a.doctor_id = ${id} or a.service_id =${id} )</if> <if test="id!=null">and (a.doctor_id = ${userid} or a.service_id =${userid})</if>
</select> </select>
<select id="fetchSearchByPage" parameterType="java.util.Map" resultType="com.cftech.consultsheet.model.ConsultSheet"> <select id="fetchSearchByPage" parameterType="java.util.Map" resultType="com.cftech.consultsheet.model.ConsultSheet">
...@@ -218,7 +218,8 @@ ...@@ -218,7 +218,8 @@
<include refid="sqlColumns"/>, <include refid="sqlColumns"/>,
o.number orderCode, au.status isThree, o.number orderCode, au.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
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'
...@@ -227,7 +228,7 @@ ...@@ -227,7 +228,7 @@
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.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="id!=null">AND (a.doctor_id = ${id} or a.service_id =${id})</if> <if test="id!=null">AND (a.doctor_id = ${userid} or a.service_id =${userid})</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>
</select> </select>
...@@ -344,7 +345,7 @@ ...@@ -344,7 +345,7 @@
update t_aidea_consult_sheet set del_flag=1 where id=#{id,jdbcType=BIGINT} update t_aidea_consult_sheet set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update> </update>
<update id="updateDate"> <update id="updateData">
update t_aidea_consult_sheet update t_aidea_consult_sheet
<set> <set>
<if test="status !=null"> <if test="status !=null">
...@@ -372,4 +373,16 @@ ...@@ -372,4 +373,16 @@
where id = #{consultId} where id = #{consultId}
</update> </update>
<select id="byBillFindCustomerService" resultType="com.cftech.base.org.model.Qyuser">
SELECT
u.id,
u.qrcode,
u.store_name storeName
FROM
t_aidea_consult_sheet cs
LEFT JOIN t_order o ON cs.order_id = o.id AND o.del_flag = '0'
LEFT JOIN t_qyuser u ON cs.service_id = u.id AND u.del_flag = '0'
WHERE ( cs.consult_id = #{billCode} OR o.number = #{billCode} ) AND cs.del_flag = '0'
</select>
</mapper> </mapper>
...@@ -95,6 +95,7 @@ public class ConsultSheet extends UserSheet implements Serializable { ...@@ -95,6 +95,7 @@ public class ConsultSheet extends UserSheet implements Serializable {
private String nickName;//昵称 private String nickName;//昵称
private String isThree;//是否三期患者 private String isThree;//是否三期患者
private String isSales;//是否购买 private String isSales;//是否购买
private String orderStatus;//订单状态
public ConsultSheet() { public ConsultSheet() {
this.delFlag = false; this.delFlag = false;
......
...@@ -18,7 +18,14 @@ import java.util.List; ...@@ -18,7 +18,14 @@ import java.util.List;
*/ */
public interface ConsultSheetService extends GenericService<ConsultSheet> { public interface ConsultSheetService extends GenericService<ConsultSheet> {
Integer updateDate(Long id, String status, String description); /**
* 更新审核状态
* @param id
* @param status
* @param description
* @return
*/
Integer updateData(Long id, String status, String description);
/** /**
* 咨询单审核 * 咨询单审核
...@@ -29,7 +36,24 @@ public interface ConsultSheetService extends GenericService<ConsultSheet> { ...@@ -29,7 +36,24 @@ public interface ConsultSheetService extends GenericService<ConsultSheet> {
*/ */
Integer updateStatus(Long id, String status, String des); Integer updateStatus(Long id, String status, String des);
List<ConsultSheet> fetchSearchBy(Conds conds, Sort sort, int page, int pageSize ,Long id); /**
* 咨询单列表查询
* @param conds
* @param sort
* @param page
* @param pageSize
* @param userid
* @return
*/
List<ConsultSheet> fetchSearchBy(Conds conds, Sort sort, int page, int pageSize, Long userid);
/**
* 咨询单列表统计查询
* @param conds
* @param userid
* @return
*/
Integer fetchSearchByCount(Conds conds, Long userid);
/** /**
* 提交咨询单且轮询对应客服、医生进行处理 * 提交咨询单且轮询对应客服、医生进行处理
...@@ -46,7 +70,17 @@ public interface ConsultSheetService extends GenericService<ConsultSheet> { ...@@ -46,7 +70,17 @@ public interface ConsultSheetService extends GenericService<ConsultSheet> {
**/ **/
JSONObject consultSheetList(ConsultSheetDto consultSheetDto); JSONObject consultSheetList(ConsultSheetDto consultSheetDto);
void sendQyWechatMassage(ConsultSheet consultSheet); /**
* 咨询单消息推送
* @param consultSheet
*/
void sendQyWechatMassage(ConsultSheet consultSheet);
Integer fetchSearchByCount(Conds conds, Long id); /**
* 通过咨询单/订单编码获取对应客服信息
* @param billCode
* @return
*/
JSONObject byBillFindCustomerService(String billCode);
} }
...@@ -87,8 +87,8 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im ...@@ -87,8 +87,8 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
@Override @Override
public Integer updateDate(Long consultId, String status, String description) { public Integer updateData(Long consultId, String status, String description) {
return consultSheetMapper.updateDate(consultId, status, description); return consultSheetMapper.updateData(consultId, status, description);
} }
@Override @Override
...@@ -97,24 +97,24 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im ...@@ -97,24 +97,24 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
} }
@Override @Override
public Integer fetchSearchByCount(Conds conds, Long id) { public Integer fetchSearchByCount(Conds conds, Long userid) {
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("conds", conds); params.put("conds", conds);
if (id != null && id != 1) { if (userid != null && userid != 1) {
params.put("id", id); params.put("id", userid);
} }
return consultSheetMapper.fetchSearchByCount(params); return consultSheetMapper.fetchSearchByCount(params);
} }
@Override @Override
public List<ConsultSheet> fetchSearchBy(Conds conds, Sort sort, int page, int pageSize, Long id) { public List<ConsultSheet> fetchSearchBy(Conds conds, Sort sort, int page, int pageSize, Long userid) {
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("conds", conds); params.put("conds", conds);
params.put("offset", page > 0 ? page : 0); params.put("offset", page > 0 ? page : 0);
params.put("limit", pageSize > 0 ? pageSize : 0); params.put("limit", pageSize > 0 ? pageSize : 0);
params.put("sort", sort); params.put("sort", sort);
if (id != null && id != 1) { if (userid != null && userid != 1) {
params.put("id", id); params.put("userid", userid);
} }
return consultSheetMapper.fetchSearchByPage(params); return consultSheetMapper.fetchSearchByPage(params);
} }
...@@ -180,6 +180,23 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im ...@@ -180,6 +180,23 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
return rtnJson; return rtnJson;
} }
@Override
public JSONObject byBillFindCustomerService(String billCode) {
JSONObject retObj = new JSONObject();
try {
Qyuser qyuser = consultSheetMapper.byBillFindCustomerService(billCode);
if (qyuser != null) {
retObj.put("errorNo", 0);
retObj.put("data", qyuser);
return retObj;
}
} catch (Exception e) {
e.printStackTrace();
}
retObj.put("errorNo", 1);
return retObj;
}
/** /**
* 咨询单分配流程 * 咨询单分配流程
* 复购/首次分配 * 复购/首次分配
......
...@@ -95,13 +95,16 @@ public class ConsultSheetController { ...@@ -95,13 +95,16 @@ public class ConsultSheetController {
@Autowired @Autowired
private QyMsgUtil qyMsgUtil; private QyMsgUtil qyMsgUtil;
/**
//列表页面 * 咨询单列表
* @param request
* @param model
* @return
*/
@RequiresPermissions(value = CONSULTSHEET_VIEW) @RequiresPermissions(value = CONSULTSHEET_VIEW)
@RequestMapping("/list") @RequestMapping("/list")
public String list(HttpServletRequest request, Model model) { public String list(HttpServletRequest request, Model model) {
Long accountId = UserUtils.getmpaccounts(request); Long accountId = UserUtils.getmpaccounts(request);
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("t.del_flag", Constants.DEL_FLAG_0); conds.equal("t.del_flag", Constants.DEL_FLAG_0);
conds.equal("t.user_type", "2");//客服 conds.equal("t.user_type", "2");//客服
...@@ -111,6 +114,26 @@ public class ConsultSheetController { ...@@ -111,6 +114,26 @@ public class ConsultSheetController {
return "consultSheet/consultSheetlist"; return "consultSheet/consultSheetlist";
} }
/**
* 咨询单报表
* @param request
* @param model
* @return
*/
@RequiresPermissions(value = CONSULTSHEET_VIEW)
@RequestMapping("/report")
public String report(HttpServletRequest request, Model model) {
Long accountId = UserUtils.getmpaccounts(request);
Conds conds = new Conds();
conds.equal("t.del_flag", Constants.DEL_FLAG_0);
conds.equal("t.user_type", "2");//客服
List<Qyuser> qyuserList = qyuserService.fetchSearchByPage(conds, null, 0, 0);
model.addAttribute("cusServices", qyuserList);
model.addAttribute("accountId", accountId);
return "consultSheet/consultSheetReport";
}
//跳转订单列表 //跳转订单列表
@RequestMapping("/orderlist") @RequestMapping("/orderlist")
public String orderlist(HttpServletRequest request, Model model, String orderCode) { public String orderlist(HttpServletRequest request, Model model, String orderCode) {
...@@ -146,6 +169,7 @@ public class ConsultSheetController { ...@@ -146,6 +169,7 @@ public class ConsultSheetController {
} }
} }
JSONObject object = JSON.parseObject(JSON.toJSONString(consultSheet)); JSONObject object = JSON.parseObject(JSON.toJSONString(consultSheet));
model.addAttribute("orgtypeId", SystemConfig.p.getProperty("HOSPITAL_ORG_TYPE_ID"));
model.addAttribute("data", object); model.addAttribute("data", object);
model.addAttribute("isView", pageType.equals("View") ? true : false);//是否查看页面 model.addAttribute("isView", pageType.equals("View") ? true : false);//是否查看页面
} }
...@@ -184,7 +208,7 @@ public class ConsultSheetController { ...@@ -184,7 +208,7 @@ public class ConsultSheetController {
@RequestMapping(value = "/listData") @RequestMapping(value = "/listData")
@ResponseBody @ResponseBody
public JSONObject listData(int iDisplayStart, int iDisplayLength, ConsultSheet consultSheet, HttpServletRequest request) { public JSONObject listData(int iDisplayStart, int iDisplayLength, ConsultSheet consultSheet, HttpServletRequest request) {
Long id = UserUtils.getUser().getUserid(); Long userid = UserUtils.getUser().getUserid();
Long accountsId = UserUtils.getmpaccounts(request); Long accountsId = UserUtils.getmpaccounts(request);
Conds conds = new Conds(); Conds conds = new Conds();
...@@ -204,29 +228,27 @@ public class ConsultSheetController { ...@@ -204,29 +228,27 @@ public class ConsultSheetController {
if (StringUtils.isNoneBlank(consultSheet.getStatus())) { if (StringUtils.isNoneBlank(consultSheet.getStatus())) {
conds.equal("a.status", consultSheet.getStatus()); conds.equal("a.status", consultSheet.getStatus());
} }
if (StringUtils.isNoneBlank(consultSheet.getOrderStatus())) {
conds.equal("o.status", consultSheet.getOrderStatus());
}
if (consultSheet.getServiceId() != null) { if (consultSheet.getServiceId() != null) {
conds.equal("a.service_id", consultSheet.getServiceId()); conds.equal("a.service_id", consultSheet.getServiceId());
} }
if (StringUtils.isNoneBlank(consultSheet.getStartCreateTime())) { if (StringUtils.isNoneBlank(consultSheet.getStartCreateTime())) {
conds.greatEqual("DATE_FORMAT(a.create_time, '%Y-%m-%d')", consultSheet.getStartCreateTime()); String[] dateArr = consultSheet.getStartCreateTime().split(" - ");
} conds.greatEqual("DATE_FORMAT(a.create_time, '%Y/%m/%d %H:%i')", dateArr[0]);
if (StringUtils.isNoneBlank(consultSheet.getEndCreateTime())) { conds.lessEqual("DATE_FORMAT(a.create_time, '%Y/%m/%d %H:%i')", dateArr[1]);
conds.lessEqual("DATE_FORMAT(a.create_time, '%Y-%m-%d')", consultSheet.getEndCreateTime());
} }
if (StringUtils.isNoneBlank(consultSheet.getStartAuditTime())) { if (StringUtils.isNoneBlank(consultSheet.getStartAuditTime())) {
conds.greatEqual("DATE_FORMAT(a.audit_time, '%Y-%m-%d')", consultSheet.getStartAuditTime()); String[] dateArr = consultSheet.getStartAuditTime().split(" - ");
} conds.greatEqual("DATE_FORMAT(a.audit_time, '%Y/%m/%d %H:%i')", dateArr[0]);
if (StringUtils.isNoneBlank(consultSheet.getEndAuditTime())) { conds.lessEqual("DATE_FORMAT(a.audit_time, '%Y/%m/%d %H:%i')", dateArr[1]);
conds.lessEqual("DATE_FORMAT(a.audit_time, '%Y-%m-%d')", consultSheet.getEndAuditTime());
}
if (StringUtils.isNoneBlank(consultSheet.getOpenId())) {
conds.equal("a.open_id", consultSheet.getOpenId());
} }
Sort sort = new Sort("a.create_time", OrderType.DESC); Sort sort = new Sort("a.create_time", OrderType.DESC);
List<ConsultSheet> list = consultSheetService.fetchSearchBy(conds, sort, iDisplayStart, iDisplayLength, id); List<ConsultSheet> list = consultSheetService.fetchSearchBy(conds, sort, iDisplayStart, iDisplayLength, userid);
Integer counts = consultSheetService.fetchSearchByCount(conds, id); Integer counts = consultSheetService.fetchSearchByCount(conds, userid);
JSONObject rtnJson = new JSONObject(); JSONObject rtnJson = new JSONObject();
rtnJson.put("iTotalRecords", counts); rtnJson.put("iTotalRecords", counts);
rtnJson.put("iTotalDisplayRecords", counts); rtnJson.put("iTotalDisplayRecords", counts);
...@@ -268,6 +290,9 @@ public class ConsultSheetController { ...@@ -268,6 +290,9 @@ public class ConsultSheetController {
} else if (StringUtils.equals(consultSheet.getIsThree(), "4")) { } else if (StringUtils.equals(consultSheet.getIsThree(), "4")) {
conds.equal("au.status", "1"); conds.equal("au.status", "1");
} }
if (StringUtils.isNoneBlank(consultSheet.getOrderStatus())) {
conds.equal("o.status", consultSheet.getOrderStatus());
}
if (StringUtils.isNoneBlank(consultSheet.getStatus())) { if (StringUtils.isNoneBlank(consultSheet.getStatus())) {
conds.equal("a.status", consultSheet.getStatus()); conds.equal("a.status", consultSheet.getStatus());
} }
...@@ -275,16 +300,14 @@ public class ConsultSheetController { ...@@ -275,16 +300,14 @@ public class ConsultSheetController {
conds.equal("a.service_id", consultSheet.getServiceId()); conds.equal("a.service_id", consultSheet.getServiceId());
} }
if (StringUtils.isNoneBlank(consultSheet.getStartCreateTime())) { if (StringUtils.isNoneBlank(consultSheet.getStartCreateTime())) {
conds.greatEqual("DATE_FORMAT(a.create_time, '%Y-%m-%d')", consultSheet.getStartCreateTime()); String[] dateArr = consultSheet.getStartCreateTime().split(" - ");
} conds.greatEqual("DATE_FORMAT(a.create_time, '%Y/%m/%d %H:%i')", dateArr[0]);
if (StringUtils.isNoneBlank(consultSheet.getEndCreateTime())) { conds.lessEqual("DATE_FORMAT(a.create_time, '%Y/%m/%d %H:%i')", dateArr[1]);
conds.lessEqual("DATE_FORMAT(a.create_time, '%Y-%m-%d')", consultSheet.getEndCreateTime());
} }
if (StringUtils.isNoneBlank(consultSheet.getStartAuditTime())) { if (StringUtils.isNoneBlank(consultSheet.getStartAuditTime())) {
conds.greatEqual("DATE_FORMAT(a.audit_time, '%Y-%m-%d')", consultSheet.getStartAuditTime()); String[] dateArr = consultSheet.getStartAuditTime().split(" - ");
} conds.greatEqual("DATE_FORMAT(a.audit_time, '%Y/%m/%d %H:%i')", dateArr[0]);
if (StringUtils.isNoneBlank(consultSheet.getEndAuditTime())) { conds.lessEqual("DATE_FORMAT(a.audit_time, '%Y/%m/%d %H:%i')", dateArr[1]);
conds.lessEqual("DATE_FORMAT(a.audit_time, '%Y-%m-%d')", consultSheet.getEndAuditTime());
} }
if (StringUtils.isNoneBlank(consultSheet.getOpenId())) { if (StringUtils.isNoneBlank(consultSheet.getOpenId())) {
conds.equal("a.open_id", consultSheet.getOpenId()); conds.equal("a.open_id", consultSheet.getOpenId());
...@@ -368,7 +391,7 @@ public class ConsultSheetController { ...@@ -368,7 +391,7 @@ public class ConsultSheetController {
consultSheet.setDescription(description); consultSheet.setDescription(description);
try { try {
if (consultId != null && StringUtils.isNoneBlank(status) && StringUtils.isNoneBlank(description)) { if (consultId != null && StringUtils.isNoneBlank(status) && StringUtils.isNoneBlank(description)) {
Integer integer = consultSheetService.updateDate(consultId, status, description); Integer integer = consultSheetService.updateData(consultId, status, description);
if (integer>0) { if (integer>0) {
//发送审核通过模板消息 //发送审核通过模板消息
String appid = SystemConfig.p.getProperty("WX_MP_SERVER_APPID"); String appid = SystemConfig.p.getProperty("WX_MP_SERVER_APPID");
......
...@@ -44,6 +44,18 @@ public class MobileConsultSheetController { ...@@ -44,6 +44,18 @@ public class MobileConsultSheetController {
return consultSheetService.consultSheetList(consultSheetDto); return consultSheetService.consultSheetList(consultSheetDto);
} }
/**
* 通过咨询单或订单编码获取客服二维码以及客服别名
* @param billCode
* @return
*/
@RequestMapping(value = "/byBillCodeFindCustomerService",
method = {RequestMethod.GET, RequestMethod.POST},
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject byBillFindCustomerService(@RequestParam String billCode) {
return consultSheetService.byBillFindCustomerService(billCode);
}
@RequestMapping(value = "/test", @RequestMapping(value = "/test",
method = {RequestMethod.POST}, method = {RequestMethod.POST},
produces = MediaType.APPLICATION_JSON_UTF8_VALUE) produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
......
...@@ -67,7 +67,7 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im ...@@ -67,7 +67,7 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
number = buyingMedicineNumber(openid, null);//获取购买数量 number = buyingMedicineNumber(openid, null);//获取购买数量
if (number >= 3) {//赠送第一张 if (number >= 3) {//赠送第一张
String no = codingruleUtils.getNumber(accountId, Couponrecord.class.getName()); String no = codingruleUtils.getPrimaryKey(CodingruleUtils.COUPON_KEY);
Couponrecord couponrecord = new Couponrecord(); Couponrecord couponrecord = new Couponrecord();
couponrecord.setNumber(no); couponrecord.setNumber(no);
...@@ -86,7 +86,7 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im ...@@ -86,7 +86,7 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
couponrecordMapper.save(couponrecord); couponrecordMapper.save(couponrecord);
} }
if (number >= 6) {//赠送第二张 if (number >= 6) {//赠送第二张
String no = codingruleUtils.getNumber(accountId, Couponrecord.class.getName()); String no = codingruleUtils.getPrimaryKey(CodingruleUtils.COUPON_KEY);
//获取张券 //获取张券
Couponrecord firstCouponrecord = findCouponrecordBySort("1", openid).get(0); Couponrecord firstCouponrecord = findCouponrecordBySort("1", openid).get(0);
...@@ -113,7 +113,7 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im ...@@ -113,7 +113,7 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
number = buyingMedicineNumber(openid, lastCouponrecord.getExpireDate()); number = buyingMedicineNumber(openid, lastCouponrecord.getExpireDate());
if (number >= 3) {//赠送第一张 if (number >= 3) {//赠送第一张
String no = codingruleUtils.getNumber(accountId, Couponrecord.class.getName()); String no = codingruleUtils.getPrimaryKey(CodingruleUtils.COUPON_KEY);
Couponrecord couponrecord = new Couponrecord(); Couponrecord couponrecord = new Couponrecord();
couponrecord.setNumber(no); couponrecord.setNumber(no);
couponrecord.setTakeEffectYear((Integer.parseInt(lastCouponrecord.getTakeEffectYear()) + 1) + ""); couponrecord.setTakeEffectYear((Integer.parseInt(lastCouponrecord.getTakeEffectYear()) + 1) + "");
...@@ -133,7 +133,7 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im ...@@ -133,7 +133,7 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
if (number >= 6) {//赠送第二张 if (number >= 6) {//赠送第二张
//获取第一张券 //获取第一张券
Couponrecord firstCouponrecord = findCouponrecordBySort("1", openid).get(0); Couponrecord firstCouponrecord = findCouponrecordBySort("1", openid).get(0);
String no = codingruleUtils.getNumber(accountId, Couponrecord.class.getName()); String no = codingruleUtils.getPrimaryKey(CodingruleUtils.COUPON_KEY);
Couponrecord couponrecord = new Couponrecord(); Couponrecord couponrecord = new Couponrecord();
couponrecord.setNumber(no); couponrecord.setNumber(no);
...@@ -160,7 +160,7 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im ...@@ -160,7 +160,7 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
//获取第一张券 //获取第一张券
Couponrecord firstCouponrecord = findCouponrecordBySort("1", openid).get(0); Couponrecord firstCouponrecord = findCouponrecordBySort("1", openid).get(0);
String no = codingruleUtils.getNumber(accountId, Couponrecord.class.getName()); String no = codingruleUtils.getPrimaryKey(CodingruleUtils.COUPON_KEY);
Couponrecord couponrecord = new Couponrecord(); Couponrecord couponrecord = new Couponrecord();
couponrecord.setNumber(no); couponrecord.setNumber(no);
......
...@@ -78,12 +78,12 @@ ...@@ -78,12 +78,12 @@
<div class="box-header"> <div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/invoice/exportExcel')" method="get"> <form id="seachTableForm" action="#springUrl('/a/invoice/exportExcel')" method="get">
<div class="col-xs-1"> <div class="col-xs-2">
<input type="text" class="form-control " <input type="text" class="form-control "
name="orderId" placeholder="订单编码"> name="orderId" placeholder="订单编码">
</div> </div>
<div class="col-xs-1"> <div class="col-xs-2">
<input type="text" class="form-control " <input type="text" class="form-control "
name="invoiceTitle" placeholder="发票抬头"> name="invoiceTitle" placeholder="发票抬头">
</div> </div>
...@@ -92,9 +92,7 @@ ...@@ -92,9 +92,7 @@
<div class="col-xs-2"> <div class="col-xs-2">
<button type="button" class="search btn btn-primary">搜索</button> <button type="button" class="search btn btn-primary">搜索</button>
#if($shiro.hasPermission("qy:invoice:edit")) #if($shiro.hasPermission("qy:invoice:edit"))
<!-- <a href="#springUrl('/a/invoice/form')" class="btn btn-primary">新增</a>-->
<button type="submit" class="btn btn-primary">导出</button> <button type="submit" class="btn btn-primary">导出</button>
<!-- <a onclick="importExcel();" class="btn btn-primary">导入</a>-->
#end #end
</div> </div>
</form> </form>
...@@ -372,15 +370,15 @@ ...@@ -372,15 +370,15 @@
"mData": "id", "mData": "id",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
var html = '#if($shiro.hasPermission("qy:invoice:edit"))'; var html = '#if($shiro.hasPermission("qy:invoice:edit"))';
html += '<div class="btn-group" style="min-width: 100px;">\n' + // html += '<div class="btn-group" style="min-width: 100px;">\n' +
//'<button type="button" class="btn btn-success btn-flat">操作</button>\n' + // //'<button type="button" class="btn btn-success btn-flat">操作</button>\n' +
'<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">\n' + // '<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">\n' +
' <span class="caret"></span>\n' + // ' <span class="caret"></span>\n' +
' <span class="sr-only">Toggle Dropdown</span>\n' + // ' <span class="sr-only">Toggle Dropdown</span>\n' +
'</button>\n' + // '</button>\n' +
'<ul class="dropdown-menu" role="menu" style="min-width: 100px;">\n'; // '<ul class="dropdown-menu" role="menu" style="min-width: 100px;">\n';
html += '<li><a href="#springUrl("/a/invoice/form?id=' + a + '")">查看</a></li>'; html += '<a href="#springUrl("/a/invoice/form?id=' + a + '")" class="btn green">查看</a>';
html += '</ul>'; // html += '</ul>';
html += '#end'; html += '#end';
return html; return html;
} }
......
...@@ -242,15 +242,15 @@ ...@@ -242,15 +242,15 @@
"mData": "id", "mData": "id",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
var html = '#if($shiro.hasPermission("qy:logistics:view"))'; var html = '#if($shiro.hasPermission("qy:logistics:view"))';
html += '<div class="btn-group" style="min-width: 100px;">\n' + // html += '<div class="btn-group" style="min-width: 100px;">\n' +
//'<button type="button" class="btn btn-success btn-flat">操作</button>\n' + // //'<button type="button" class="btn btn-success btn-flat">操作</button>\n' +
'<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">\n' + // '<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">\n' +
' <span class="caret"></span>\n' + // ' <span class="caret"></span>\n' +
' <span class="sr-only">Toggle Dropdown</span>\n' + // ' <span class="sr-only">Toggle Dropdown</span>\n' +
'</button>\n' + // '</button>\n' +
'<ul class="dropdown-menu" role="menu" style="min-width: 100px;">\n'; // '<ul class="dropdown-menu" role="menu" style="min-width: 100px;">\n';
html += '<li><a href="#springUrl("/a/logistics/form?id=' + a + '")">查看</a></li>'; html += '<a href="#springUrl("/a/logistics/form?id=' + a + '")" class="btn green">查看</a>';
html += '</ul>'; // html += '</ul>';
html += '#end'; html += '#end';
return html; return html;
} }
......
...@@ -318,14 +318,14 @@ ...@@ -318,14 +318,14 @@
"mData": "id", "mData": "id",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
var html = '#if($shiro.hasPermission("qy:orderDetails:edit"))'; var html = '#if($shiro.hasPermission("qy:orderDetails:edit"))';
html += '<div class="btn-group">\n' + // html += '<div class="btn-group">\n' +
'<button type="button" class="btn btn-success btn-flat">操作</button>\n' + // '<button type="button" class="btn btn-success btn-flat">操作</button>\n' +
'<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">\n' + // '<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">\n' +
' <span class="caret"></span>\n' + // ' <span class="caret"></span>\n' +
' <span class="sr-only">Toggle Dropdown</span>\n' + // ' <span class="sr-only">Toggle Dropdown</span>\n' +
'</button>\n' + // '</button>\n' +
'<ul class="dropdown-menu" role="menu">\n'; // '<ul class="dropdown-menu" role="menu">\n';
html += '<li><a href="#springUrl("/a/orderDetails/form?id=' + a + '")">查看</a></li>'; html += '<a href="#springUrl("/a/orderDetails/form?id=' + a + '")" class="btn green">查看</a>';
html += '</ul>'; html += '</ul>';
html += '#end'; html += '#end';
return html; return html;
......
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
</div> </div>
<div class="col-xs-2"> <div class="col-xs-2">
<select id="status" name="status" class="form-control required"> <select id="status" name="status" class="form-control required">
<option value="-1">请选择订单状态</option> <option value="">请选择订单状态</option>
<option value="all">全部</option> <option value="all">全部</option>
<option value="0">待确认</option> <option value="0">待确认</option>
<option value="1">待付款</option> <option value="1">待付款</option>
...@@ -224,29 +224,29 @@ ...@@ -224,29 +224,29 @@
<option value="6">6盒</option> <option value="6">6盒</option>
</select> </select>
</div> </div>
<div class="col-xs-2"> <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">
<i class="fa fa-calendar"></i> <i class="fa fa-calendar"></i>
</div> </div>
<input type="text" class="form-control pull-right datepicker" <input type="text" class="form-control pull-right datepicker"
name="orderStartTime" placeholder="订单开始时间" name="orderStartTime" placeholder="请选择订单时间"
readonly="readonly">
</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="orderEndTime" placeholder="订单结束时间"
readonly="readonly"> readonly="readonly">
</div> </div>
</div> </div>
<!-- <div class="col-xs-2">-->
<div class="col-xs-3"> <!-- <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="orderEndTime" placeholder="订单结束时间"-->
<!-- readonly="readonly">-->
<!-- </div>-->
<!-- </div>-->
<div class="col-xs-4">
<button type="button" class="search btn btn-primary">搜索</button> <button type="button" class="search btn btn-primary">搜索</button>
<button type="button" class="btn btn-info" onclick="clearSearch()">重置</button> <button type="button" class="btn btn-info" onclick="clearSearch()">重置</button>
#if($shiro.hasPermission("qy:order:edit")) #if($shiro.hasPermission("qy:order:edit"))
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
<!--<th>支付交易号</th>--> <!--<th>支付交易号</th>-->
<th style="width: 60px">是否开票</th> <th style="width: 60px">是否开票</th>
<th style="width: 60px">患者类型</th> <th style="width: 60px">患者类型</th>
<th style="width: 60px">是否购药</th> <th style="width: 60px">新用户</th>
<th style="width: 120px">创建时间</th> <th style="width: 120px">创建时间</th>
<!-- <th>确认时间</th>--> <!-- <th>确认时间</th>-->
<!-- <th>付款时间</th>--> <!-- <th>付款时间</th>-->
...@@ -321,8 +321,9 @@ ...@@ -321,8 +321,9 @@
<script src="plugins/bootstrap-fileinput/zh2.js"></script> <script src="plugins/bootstrap-fileinput/zh2.js"></script>
<!-- AdminLTE App --> <!-- AdminLTE App -->
<script src="dist/js/app.min.js"></script> <script src="dist/js/app.min.js"></script>
<script type="text/javascript" <script type="text/javascript" src="plugins/jquery-validation/js/jquery.validate.min.js"></script>
src="plugins/jquery-validation/js/jquery.validate.min.js"></script> <script src="js/moment.min.js"></script>
<script type="text/javascript" src="plugins/daterangepicker/daterangepicker.js"></script>
<!-- AdminLTE for demo purposes --> <!-- AdminLTE for demo purposes -->
<script> <script>
var csrfheader = {name: '_csrf_header', value: '${_csrf.headerName}'}; var csrfheader = {name: '_csrf_header', value: '${_csrf.headerName}'};
...@@ -372,15 +373,6 @@ ...@@ -372,15 +373,6 @@
aoData.push(params); aoData.push(params);
}); });
// if (defaultStatus) {
// aoData.push({
// name: "isFirst",
// value: defaultStatus
// });
// defaultStatus = false;
// }
$.ajax({ $.ajax({
"type": "GET", "type": "GET",
"url": sSource, "url": sSource,
...@@ -404,7 +396,7 @@ ...@@ -404,7 +396,7 @@
"autoWidth": true, "autoWidth": true,
"scrollX": true, "scrollX": true,
"sScrollY": false, "sScrollY": false,
//"rowCallback": RowCallBack, "rowCallback": RowCallBack,
"aoColumns": [ "aoColumns": [
{ {
"mData": "id" "mData": "id"
...@@ -514,7 +506,6 @@ ...@@ -514,7 +506,6 @@
} }
} }
}, },
{ {
"aTargets": [1], "aTargets": [1],
...@@ -530,7 +521,6 @@ ...@@ -530,7 +521,6 @@
return a; return a;
} }
}, },
{ {
"aTargets": [3], "aTargets": [3],
"mData": "productName", "mData": "productName",
...@@ -648,9 +638,9 @@ ...@@ -648,9 +638,9 @@
"mData": "isThree", "mData": "isThree",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a == '0') { if (a == '0') {
return '<span style="color:RGB(249,203,132)">三期</span>'; return '三期';
} else if (a == '1') { } else if (a == '1') {
return '<span style="color:RGB(249,203,132)">四期</span>'; return '四期';
} else { } else {
return ''; return '';
} }
...@@ -661,11 +651,10 @@ ...@@ -661,11 +651,10 @@
"aTargets": [12], "aTargets": [12],
"mData": "isSales", "mData": "isSales",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
console.log(a);
if (a == '4') { if (a == '4') {
return '是';
} else {
return '否'; return '否';
} else {
return '是';
} }
} }
} }
...@@ -738,7 +727,6 @@ ...@@ -738,7 +727,6 @@
"aTargets": [14], "aTargets": [14],
"mData": "id", "mData": "id",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
console.log(c);
var html = '#if($shiro.hasPermission("qy:order:edit"))'; var html = '#if($shiro.hasPermission("qy:order:edit"))';
html += '<div class="btn-group" style="min-width: 100px;">\n' + html += '<div class="btn-group" style="min-width: 100px;">\n' +
// '<button type="button" class="btn btn-success btn-flat">操作</button>\n' + // '<button type="button" class="btn btn-success btn-flat">操作</button>\n' +
...@@ -771,7 +759,7 @@ ...@@ -771,7 +759,7 @@
] ]
}); });
} }
//123456789
function changeAllChecked(){ function changeAllChecked(){
var flag = true; var flag = true;
$('#table tbody tr').each(function(){ $('#table tbody tr').each(function(){
...@@ -789,6 +777,29 @@ ...@@ -789,6 +777,29 @@
}; };
jQuery(document).ready(function () { jQuery(document).ready(function () {
//创建时间
$("input[name='orderStartTime']").daterangepicker({
format: "YYYY/MM/DD HH:mm",
timePicker: true,
timePickerIncrement: 5,
timePicker12Hour: false,
locale: {
applyLabel: '确定',
cancelLabel: '清除',
fromLabel: '起始时间',
toLabel: '结束时间',
customRangeLabel: '手动选择',
daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],
monthNames: ['一月', '二月', '三月', '四月', '五月', '六月',
'七月', '八月', '九月', '十月', '十一月', '十二月'
],
firstDay: 1
}
});
$("input[name='orderStartTime']").on('cancel.daterangepicker', function (ev, picker) {
$("input[name='orderStartTime']").val('');
});
$('.col-xs-12').on('click', '.paginate_button', function() { $('.col-xs-12').on('click', '.paginate_button', function() {
setTimeout(function () { setTimeout(function () {
var flag = true; var flag = true;
...@@ -811,15 +822,7 @@ ...@@ -811,15 +822,7 @@
}); });
seachTable(); seachTable();
$('.datepicker').datepicker({
show: true,
format: 'yyyy-mm-dd',
autoclose: true,
language: 'zh-CN',
todayBtn: 'linked',
clearBtn: 'linked'
});
$('.search').click(function () { $('.search').click(function () {
$("#table").dataTable().fnClearTable(); $("#table").dataTable().fnClearTable();
}); });
...@@ -978,7 +981,6 @@ ...@@ -978,7 +981,6 @@
updateStatu(id, 5, reason); updateStatu(id, 5, reason);
} }
//开发票 //开发票
function exportInvoice(data) { function exportInvoice(data) {
var email = $("[name='email']").val(); var email = $("[name='email']").val();
...@@ -1229,14 +1231,8 @@ ...@@ -1229,14 +1231,8 @@
* 动态展示背景颜色 * 动态展示背景颜色
*/ */
function RowCallBack(row, data, index) { function RowCallBack(row, data, index) {
if (data.status == '0') {
$(row).css('background-color', '#DBA433');
} else if (data.status == '1') {
$(row).css('background-color', 'red');
}
if (data.isThree == '0') { if (data.isThree == '0') {
$('td', row).eq(11).css('background-color', "#008d4c"); $('td', row).eq(11).css('background-color', "RGB(249,203,132)");
} }
} }
</script> </script>
......
...@@ -304,7 +304,7 @@ ...@@ -304,7 +304,7 @@
o.remarks, o.remarks,
t.id as productId, t.id as productId,
GROUP_CONCAT(t.product_number SEPARATOR ',') productNumber, GROUP_CONCAT(t.product_number SEPARATOR ',') productNumber,
GROUP_CONCAT(t.product_name SEPARATOR ',') productName, GROUP_CONCAT(t.common_name SEPARATOR ',') productName,
t.take_frequency takeFrequency, t.take_frequency takeFrequency,
cs.consult_id consultCode, cs.consult_id consultCode,
DATE_FORMAT(aw.create_time, '%Y-%m-%d %H:%i') outTime, DATE_FORMAT(aw.create_time, '%Y-%m-%d %H:%i') outTime,
......
...@@ -5,6 +5,7 @@ import com.cftech.accounts.service.JobService; ...@@ -5,6 +5,7 @@ import com.cftech.accounts.service.JobService;
import com.cftech.accounts.service.JobTask; import com.cftech.accounts.service.JobTask;
import com.cftech.accounts.service.RedisSubPubListener; import com.cftech.accounts.service.RedisSubPubListener;
import com.cftech.base.codingrule.service.CodingruleService; import com.cftech.base.codingrule.service.CodingruleService;
import com.cftech.base.codingrule.utils.CodingruleUtils;
import com.cftech.core.sql.Conds; import com.cftech.core.sql.Conds;
import com.cftech.core.util.DESUtil; import com.cftech.core.util.DESUtil;
import com.cftech.core.util.SpringContextHolder; import com.cftech.core.util.SpringContextHolder;
...@@ -44,24 +45,19 @@ public class InitAliasNumberJob implements Job { ...@@ -44,24 +45,19 @@ public class InitAliasNumberJob implements Job {
String id = jobInfo.get("uid") == null ? "" : jobInfo.getString("uid");//这个也是ID主键 String id = jobInfo.get("uid") == null ? "" : jobInfo.getString("uid");//这个也是ID主键
log.info("任务ID:" + id); log.info("任务ID:" + id);
JobService jobService = SpringContextHolder.getBean(JobService.class); CodingruleUtils codingruleUtils = SpringContextHolder.getBean(CodingruleUtils.class);
Conds conds = new Conds(); codingruleUtils.initMonthRedisKey();
conds.equal("clazz_path","com.cftech.order.job.InitAliasNumberJob");
conds.equal("del_flag",0);
SysJob job = jobService.fetchSearchByConds(conds);
job.setDescription("1");//重置别名
jobService.update(job);
//执行更新操作 //执行更新操作
if (context.getNextFireTime() != null) { if (context.getNextFireTime() != null) {
log.info("初始化别名key任务:下次执行时间=====" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(context.getNextFireTime()) + "=============="); log.info("初始化粉丝别名、卡券编码每月key值:下次执行时间=====" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(context.getNextFireTime()) + "==============");
} else { } else {
JobService jobService = SpringContextHolder.getBean(JobService.class);
SysJob sysJob = new SysJob(); SysJob sysJob = new SysJob();
sysJob.setJobuid(id); sysJob.setJobuid(id);
sysJob.setStatus("0"); sysJob.setStatus("0");
jobService.updateStatus(sysJob); jobService.updateStatus(sysJob);
log.info("初始化别名key任务,已执行完成!"); log.info("初始化粉丝别名、卡券编码每月key值,已执行完成!");
} }
} }
} }
...@@ -39,6 +39,11 @@ public class OrderExpiredRemindJob implements Job { ...@@ -39,6 +39,11 @@ public class OrderExpiredRemindJob implements Job {
return; return;
} }
//获得明细数据
JobDataMap jobInfo = context.getJobDetail().getJobDataMap();
String id = jobInfo.get("uid") == null ? "" : jobInfo.getString("uid");//这个也是ID主键
log.info("任务ID:" + id);
Conds orderConds = new Conds(); Conds orderConds = new Conds();
orderConds.equal("o.del_flag", Constants.DEL_FLAG_0); orderConds.equal("o.del_flag", Constants.DEL_FLAG_0);
orderConds.equal("o.status", "1");//待付款订单 orderConds.equal("o.status", "1");//待付款订单
...@@ -59,11 +64,6 @@ public class OrderExpiredRemindJob implements Job { ...@@ -59,11 +64,6 @@ public class OrderExpiredRemindJob implements Job {
} }
} }
//获得明细数据
JobDataMap jobInfo = context.getJobDetail().getJobDataMap();
String id = jobInfo.get("uid") == null ? "" : jobInfo.getString("uid");//这个也是ID主键
log.info("任务ID:" + id);
//执行更新操作 //执行更新操作
if (context.getNextFireTime() != null) { if (context.getNextFireTime() != null) {
log.info("订单半小时未付款过期任务:下次执行时间=====" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(context.getNextFireTime()) + "=============="); log.info("订单半小时未付款过期任务:下次执行时间=====" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(context.getNextFireTime()) + "==============");
......
...@@ -234,6 +234,7 @@ public class OrderController { ...@@ -234,6 +234,7 @@ public class OrderController {
@RequestMapping(value = "/listData") @RequestMapping(value = "/listData")
@ResponseBody @ResponseBody
public JSONObject listData(int iDisplayStart, int iDisplayLength, Order order, HttpServletRequest request) throws ParseException { public JSONObject listData(int iDisplayStart, int iDisplayLength, Order order, HttpServletRequest request) throws ParseException {
JSONObject rtnJson = new JSONObject();
User user = UserUtils.getUser(); User user = UserUtils.getUser();
Long userid = user.getUserid(); Long userid = user.getUserid();
Long accountsId = UserUtils.getmpaccounts(request); Long accountsId = UserUtils.getmpaccounts(request);
...@@ -266,12 +267,12 @@ public class OrderController { ...@@ -266,12 +267,12 @@ public class OrderController {
conds.like("o.courier_number", order.getCourierNumber()); conds.like("o.courier_number", order.getCourierNumber());
} }
//别ing //别
if (StringUtils.isNoneBlank(order.getFansAlias())) { if (StringUtils.isNoneBlank(order.getFansAlias())) {
conds.like("f.store", order.getFansAlias()); conds.like("f.store", order.getFansAlias());
} }
if (StringUtils.equals("-1", order.getStatus())) { if (StringUtils.equals("", order.getStatus())) {
conds.in("o.status", new String[]{"0", "1"}); conds.in("o.status", new String[]{"0", "1"});
} else if (StringUtils.isNoneBlank(order.getStatus()) && !StringUtils.equals(order.getStatus(), "all")) { } else if (StringUtils.isNoneBlank(order.getStatus()) && !StringUtils.equals(order.getStatus(), "all")) {
conds.equal("o.status", order.getStatus()); conds.equal("o.status", order.getStatus());
...@@ -290,18 +291,18 @@ public class OrderController { ...@@ -290,18 +291,18 @@ public class OrderController {
} else if (StringUtils.isNoneBlank(order.getIsBill()) && StringUtils.equals(order.getIsBill(), "0")) {//已开票 } else if (StringUtils.isNoneBlank(order.getIsBill()) && StringUtils.equals(order.getIsBill(), "0")) {//已开票
conds.notNull("o.confirm"); conds.notNull("o.confirm");
} }
//订单开始时间
//订单时间
if (StringUtils.isNoneBlank(order.getOrderStartTime())) { if (StringUtils.isNoneBlank(order.getOrderStartTime())) {
conds.greatEqual("DATE_FORMAT(o.create_time, '%Y-%m-%d')", order.getOrderStartTime()); String[] dateArr = order.getOrderStartTime().split(" - ");
} conds.greatEqual("DATE_FORMAT(o.create_time, '%Y/%m/%d %H:%i')", dateArr[0]);
//订单结束时间 conds.lessEqual("DATE_FORMAT(o.create_time, '%Y/%m/%d %H:%i')", dateArr[1]);
if (StringUtils.isNoneBlank(order.getOrderEndTime())) {
conds.lessEqual("DATE_FORMAT(o.create_time, '%Y-%m-%d')", order.getOrderEndTime());
} }
Sort sort = new Sort("o.create_time", OrderType.DESC); Sort sort = new Sort("o.create_time", OrderType.DESC);
List<Order> list = orderService.fetchSearchBy(conds, sort, iDisplayStart, iDisplayLength, userid, order.getStartOrderAmount(), order.getStartPayAmount()); List<Order> list = orderService.fetchSearchBy(conds, sort, iDisplayStart, iDisplayLength, userid, order.getStartOrderAmount(), order.getStartPayAmount());
//设置是否可以开票 Integer counts = orderService.count(conds, userid, order.getStartOrderAmount(), order.getStartPayAmount());
//设置是否可以开票,拼接付款链接
Date today = new Date(); Date today = new Date();
int longNum = 0; int longNum = 0;
for (Order obj : list) { for (Order obj : list) {
...@@ -318,8 +319,7 @@ public class OrderController { ...@@ -318,8 +319,7 @@ public class OrderController {
obj.setPayUrl(payUrl); obj.setPayUrl(payUrl);
} }
} }
Integer counts = orderService.count(conds, userid, order.getStartOrderAmount(), order.getStartPayAmount());
JSONObject rtnJson = new JSONObject();
rtnJson.put("iTotalRecords", counts); rtnJson.put("iTotalRecords", counts);
rtnJson.put("iTotalDisplayRecords", counts); rtnJson.put("iTotalDisplayRecords", counts);
rtnJson.put("aaData", list); rtnJson.put("aaData", list);
......
...@@ -250,6 +250,7 @@ ...@@ -250,6 +250,7 @@
limit #{page},#{pageSize} limit #{page},#{pageSize}
</if> </if>
</select> </select>
<!--商品分类菜单数据回填!--> <!--商品分类菜单数据回填!-->
<select id="productMenu" resultType="com.cftech.productclassify.model.ProductMenuVO"> <select id="productMenu" resultType="com.cftech.productclassify.model.ProductMenuVO">
SELECT SELECT
...@@ -259,10 +260,12 @@ ...@@ -259,10 +260,12 @@
a.dosaga_from AS dosagaFrom a.dosaga_from AS dosagaFrom
FROM t_aidea_product_classify t LEFT JOIN t_aidea_product a ON find_in_set(t.id,a.classify_id) > 0 where t.del_flag = 0 GROUP BY t.id FROM t_aidea_product_classify t LEFT JOIN t_aidea_product a ON find_in_set(t.id,a.classify_id) > 0 where t.del_flag = 0 GROUP BY t.id
</select> </select>
<select id="hotproduct" resultType="com.cftech.productclassify.model.ProductVO"> <select id="hotproduct" resultType="com.cftech.productclassify.model.ProductVO">
SELECT SELECT
id, id,
product_name AS productName, product_name AS productName,
common_name AS commonName,
format, format,
product_img AS productImg product_img AS productImg
FROM t_aidea_product FROM t_aidea_product
...@@ -270,10 +273,12 @@ ...@@ -270,10 +273,12 @@
ORDER BY reading DESC ORDER BY reading DESC
LIMIT 0,4 LIMIT 0,4
</select> </select>
<select id="medicine" resultType="com.cftech.productclassify.model.ProductVO"> <select id="medicine" resultType="com.cftech.productclassify.model.ProductVO">
SELECT SELECT
id, id,
product_name AS productName, product_name AS productName,
common_name AS commonName,
format, format,
product_img AS productImg product_img AS productImg
FROM t_aidea_product FROM t_aidea_product
...@@ -281,8 +286,9 @@ ...@@ -281,8 +286,9 @@
ORDER BY create_time desc ORDER BY create_time desc
LIMIT 0,4 LIMIT 0,4
</select> </select>
<select id="productDosage" resultType="com.cftech.productclassify.model.ProductVO"> <select id="productDosage" resultType="com.cftech.productclassify.model.ProductVO">
SELECT dosaga_from dosageName FROM t_aidea_product WHERE del_flag = 0 GROUP BY dosaga_from ORDER BY create_time DESC SELECT dosaga_from dosageName FROM t_aidea_product WHERE del_flag = 0 GROUP BY dosaga_from ORDER BY create_time DESC
</select> </select>
......
...@@ -11,9 +11,9 @@ import lombok.Data; ...@@ -11,9 +11,9 @@ import lombok.Data;
public class ProductVO { public class ProductVO {
private Long id; private Long id;
private String productName; private String productName;
private String commonName;
private String format; private String format;
private String productImg; private String productImg;
private String dosageName; private String dosageName;
} }
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
<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>
<textarea type="text" required class="form-control pull-right" <textarea type="text" required class="form-control pull-right"
value="" maxlength="500" required rows="5" value="" maxlength="1000" required rows="5"
name="description" placeholder="药品简介" name="description" placeholder="药品简介"
>$!{data.description}</textarea> >$!{data.description}</textarea>
</div> </div>
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<th>数量</th> <th>数量</th>
<th>批号</th> <th>批号</th>
<th>出库时间</th> <th>出库时间</th>
<th>有效期</th> <!-- <th>有效期</th>-->
</tr> </tr>
</thead> </thead>
<tbody id="tablebody"> <tbody id="tablebody">
...@@ -228,10 +228,7 @@ ...@@ -228,10 +228,7 @@
"mData":"drugBatchNo" "mData":"drugBatchNo"
}, },
{ {
"mData":"outStoreDate" "mData": "outStoreDate"
},
{
"mData":"takeEffectDate"
}], }],
"aoColumnDefs": [ "aoColumnDefs": [
{ // set default column settings { // set default column settings
......
...@@ -69,7 +69,6 @@ ...@@ -69,7 +69,6 @@
</ol> </ol>
</section> </section>
<!-- Main content --> <!-- Main content -->
<section class="content"> <section class="content">
<div class="row"> <div class="row">
...@@ -77,8 +76,6 @@ ...@@ -77,8 +76,6 @@
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/report/exportExcel')" method="get"> <form id="seachTableForm" action="#springUrl('/a/report/exportExcel')" method="get">
<div class="col-xs-2"> <div class="col-xs-2">
<input type="text" class="form-control" <input type="text" class="form-control"
name="region" placeholder="大区"> name="region" placeholder="大区">
...@@ -151,27 +148,27 @@ ...@@ -151,27 +148,27 @@
<thead> <thead>
<tr> <tr>
<td hidden="true">Id</td> <td hidden="true">Id</td>
<th>大区</th> <th style="width: 50px">大区</th>
<th>省份</th> <th style="width: 50px">省份</th>
<th>城市</th> <th style="width: 50px">城市</th>
<th>销售代表</th> <th style="width: 60px">销售代表</th>
<th>医院</th> <th style="width: 65px">医院</th>
<th>科室</th> <th style="width: 50px">科室</th>
<th>医生姓名</th> <th style="width: 60px">医生姓名</th>
<th>医生职称</th> <th style="width: 60px">医生职称</th>
<th>性别</th> <th style="width: 50px">性别</th>
<th>医生手机号码</th> <th style="width: 80px">医生手机号</th>
<th>处方医院</th> <th style="width: 60px">处方医院</th>
<th>处方医生</th> <th style="width: 60px">处方医生</th>
<th>咨询单编码</th> <th style="width: 80px">咨询单编码</th>
<th>需求清单编码</th> <th style="width: 120px">需求清单编码</th>
<th>用户姓名</th> <th style="width: 60px">用户姓名</th>
<th>用户手机号码</th> <th style="width: 80px">用户手机号</th>
<th>产品名称</th> <th style="width: 60px">产品名称</th>
<th>购买数量</th> <th style="width: 60px">购买数量</th>
<th>付款时间</th> <th style="width: 60px">付款时间</th>
<th>发货时间</th> <th style="width: 60px">发货时间</th>
<th>收件时间</th> <th style="width: 60px">收件时间</th>
</tr> </tr>
</thead> </thead>
<tbody id="tablebody"> <tbody id="tablebody">
...@@ -271,67 +268,67 @@ ...@@ -271,67 +268,67 @@
"mData": "id" "mData": "id"
}, },
{ {
"mData":"region" "mData": "region"
}, },
{ {
"mData":"province" "mData": "province"
}, },
{ {
"mData":"city" "mData": "city"
}, },
{ {
"mData":"salesRepresent" "mData": "salesRepresent"
}, },
{ {
"mData":"hospital" "mData": "hospital"
}, },
{ {
"mData":"department" "mData": "department"
}, },
{ {
"mData":"doctorName" "mData": "doctorName"
}, },
{ {
"mData":"doctorTitle" "mData": "doctorTitle"
}, },
{ {
"mData":"sex" "mData": "sex"
}, },
{ {
"mData":"doctorPhone" "mData": "doctorPhone"
}, },
{ {
"mData":"cfHospital" "mData": "cfHospital"
}, },
{ {
"mData":"cfDoctor" "mData": "cfDoctor"
}, },
{ {
"mData":"consultNumber" "mData": "consultNumber"
}, },
{ {
"mData":"orderNumber" "mData": "orderNumber"
}, },
{ {
"mData":"userName" "mData": "userName"
}, },
{ {
"mData":"phone" "mData": "phone"
}, },
{ {
"mData":"productName" "mData": "productName"
}, },
{ {
"mData":"drugsNum" "mData": "drugsNum"
}, },
{ {
"mData":"fkTime" "mData": "fkTime"
}, },
{ {
"mData":"fhTime" "mData": "fhTime"
}, },
{ {
"mData":"sjTime" "mData": "sjTime"
}], }],
"aoColumnDefs": [ "aoColumnDefs": [
{ // set default column settings { // set default column settings
...@@ -343,9 +340,9 @@ ...@@ -343,9 +340,9 @@
"aTargets": [19], "aTargets": [19],
"mData": "fkTime", "mData": "fkTime",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if(a == '' || a == null){ if (a == '' || a == null) {
return ""; return "";
}else { } else {
return formatDates(a, "yyyy-MM-dd HH:mm:ss"); return formatDates(a, "yyyy-MM-dd HH:mm:ss");
} }
} }
...@@ -354,9 +351,9 @@ ...@@ -354,9 +351,9 @@
"aTargets": [20], "aTargets": [20],
"mData": "fhTime", "mData": "fhTime",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if(a == '' || a == null){ if (a == '' || a == null) {
return ""; return "";
}else { } else {
return formatDates(a, "yyyy-MM-dd HH:mm:ss"); return formatDates(a, "yyyy-MM-dd HH:mm:ss");
} }
} }
...@@ -365,9 +362,9 @@ ...@@ -365,9 +362,9 @@
"aTargets": [21], "aTargets": [21],
"mData": "sjTime", "mData": "sjTime",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if(a == '' || a == null){ if (a == '' || a == null) {
return ""; return "";
}else { } else {
return formatDates(a, "yyyy-MM-dd HH:mm:ss"); return formatDates(a, "yyyy-MM-dd HH:mm:ss");
} }
} }
......
...@@ -337,8 +337,8 @@ ...@@ -337,8 +337,8 @@
<div class="box-footer"> <div class="box-footer">
#if($shiro.hasPermission("qy:waybill:edit")) #if($shiro.hasPermission("qy:waybill:edit"))
<input class="btn btn-primary" id="save" value="保存" type="submit"> <!-- <input class="btn btn-primary" id="save" value="保存" type="submit">-->
<input class="btn btn-primary" value="打印随行单" id="printSheet"> <!-- <input class="btn btn-primary" value="打印随行单" id="printSheet">-->
#end #end
<a href="#springUrl('/a/waybill/list')" class="btn btn-default">取消</a> <a href="#springUrl('/a/waybill/list')" class="btn btn-default">取消</a>
</div> </div>
......
...@@ -62,6 +62,7 @@ public class WaybillController { ...@@ -62,6 +62,7 @@ public class WaybillController {
@RequestMapping("/list") @RequestMapping("/list")
public String list(HttpServletRequest request, Model model) { public String list(HttpServletRequest request, Model model) {
Long accountId = UserUtils.getmpaccounts(request); Long accountId = UserUtils.getmpaccounts(request);
model.addAttribute("accountId", accountId); model.addAttribute("accountId", accountId);
return "waybill/waybilllist"; return "waybill/waybilllist";
} }
...@@ -92,8 +93,8 @@ public class WaybillController { ...@@ -92,8 +93,8 @@ public class WaybillController {
} }
} }
//获取打印随行单 //获取打印随行单
FollowPrinter prints = waybillService.findFollowPrinterData(waybill.getOrderId()); // FollowPrinter prints = waybillService.findFollowPrinterData(waybill.getOrderId());
model.addAttribute("printData", prints); // model.addAttribute("printData", prints);
model.addAttribute("data", waybill); model.addAttribute("data", waybill);
} }
return "waybill/waybillform"; return "waybill/waybillform";
...@@ -292,4 +293,29 @@ public class WaybillController { ...@@ -292,4 +293,29 @@ public class WaybillController {
public JSONObject orderPrinterBill(HttpServletRequest request, Long orderId) { public JSONObject orderPrinterBill(HttpServletRequest request, Long orderId) {
return waybillService.orderPrinterBill(request, orderId); return waybillService.orderPrinterBill(request, orderId);
} }
/**
* 打印出货随行单
* @param request
* @param orderId
* @return
*/
@RequestMapping("/findFollowPrinterData")
@ResponseBody
public JSONObject findFollowPrinterData(HttpServletRequest request, Long orderId) {
JSONObject retObj = new JSONObject();
try {
FollowPrinter prints = waybillService.findFollowPrinterData(orderId);
if (prints != null) {
retObj.put("errorNo", 0);
retObj.put("data", prints);
return retObj;
}
} catch (Exception e) {
retObj.put("errorNo", 1);
e.printStackTrace();
}
retObj.put("errorNo", 1);
return retObj;
}
} }
...@@ -33,7 +33,7 @@ public interface WxQrcodeMapper extends GenericDao<WxQrcode> { ...@@ -33,7 +33,7 @@ public interface WxQrcodeMapper extends GenericDao<WxQrcode> {
int countUser(@Param("type") int type, @Param("name")String name, @Param("allergy")String allergy); int countUser(@Param("type") int type, @Param("name")String name, @Param("allergy")String allergy);
List<WxQrcode> fromOrg(@Param("outSide") String outSide, @Param("name")String name, @Param("page") int page, @Param("pageSize") int pageSize); List<WxQrcode> fromOrg(@Param("outSide") String outSide, @Param("name")String name, @Param("orgtypeId")String orgtypeId, @Param("page") int page, @Param("pageSize") int pageSize);
int countOrg(@Param("outSide") String outSide, @Param("name")String name); int countOrg(@Param("outSide") String outSide, @Param("name")String name, @Param("orgtypeId")String orgtypeId);
} }
\ No newline at end of file
...@@ -266,12 +266,16 @@ ...@@ -266,12 +266,16 @@
WHERE FIND_IN_SET((SELECT id FROM t_orgunit WHERE org_name = #{outSide}), parent_ids) != 0 AND del_flag = 0 WHERE FIND_IN_SET((SELECT id FROM t_orgunit WHERE org_name = #{outSide}), parent_ids) != 0 AND del_flag = 0
AND id != (SELECT id FROM t_orgunit WHERE org_name = #{outSide}) AND id != (SELECT id FROM t_orgunit WHERE org_name = #{outSide})
<if test=" name !=null and name != '' "> AND org_name LIKE '%${name}%' </if> <if test=" name !=null and name != '' "> AND org_name LIKE '%${name}%' </if>
<if test=" orgtypeId !=null and orgtypeId != '' "> AND orgtype_id = #{orgtypeId} </if>
ORDER BY LENGTH(parent_ids) ASC, create_time DESC ORDER BY LENGTH(parent_ids) ASC, create_time DESC
<if test="pageSize>0">LIMIT #{page}, #{pageSize}</if> <if test="pageSize>0">LIMIT #{page}, #{pageSize}</if>
</select> </select>
<select id="countOrg" resultType="java.lang.Integer"> <select id="countOrg" resultType="java.lang.Integer">
select count(1) from t_orgunit where FIND_IN_SET((SELECT id FROM t_orgunit WHERE org_name = #{outSide}), parent_ids) != 0 and del_flag = 0 SELECT COUNT(1) FROM t_orgunit
WHERE FIND_IN_SET((SELECT id FROM t_orgunit WHERE org_name = #{outSide}), parent_ids) != 0 and del_flag = 0
AND id != (SELECT id FROM t_orgunit WHERE org_name = #{outSide})
<if test=" name !=null and name != '' "> AND org_name like '%${name}%' </if> <if test=" name !=null and name != '' "> AND org_name like '%${name}%' </if>
<if test=" orgtypeId !=null and orgtypeId != '' "> AND orgtype_id = #{orgtypeId} </if>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -31,7 +31,7 @@ public interface WxQrcodeService extends GenericService<WxQrcode> { ...@@ -31,7 +31,7 @@ public interface WxQrcodeService extends GenericService<WxQrcode> {
int countUser(int type, String name, String allergy); int countUser(int type, String name, String allergy);
List<WxQrcode> fromOrg(String outSide, String name, int iDisplayStart, int iDisplayLength); List<WxQrcode> fromOrg(String outSide, String name, String orgtypeId, int iDisplayStart, int iDisplayLength);
int countOrg(String outSide, String name); int countOrg(String outSide, String name, String orgtypeId);
} }
...@@ -96,15 +96,15 @@ public class WxQrcodeServiceImpl extends GenericServiceImpl<WxQrcode> implements ...@@ -96,15 +96,15 @@ public class WxQrcodeServiceImpl extends GenericServiceImpl<WxQrcode> implements
} }
@Override @Override
public List<WxQrcode> fromOrg(String outSide, String name, int page, int pageSize) { public List<WxQrcode> fromOrg(String outSide, String name, String orgtypeId, int page, int pageSize) {
page = page > 0 ? page : 0; page = page > 0 ? page : 0;
pageSize = pageSize > 0 ? pageSize : 0; pageSize = pageSize > 0 ? pageSize : 0;
return wxQrcodeMapper.fromOrg(outSide, name, page, pageSize); return wxQrcodeMapper.fromOrg(outSide, name, orgtypeId, page, pageSize);
} }
@Override @Override
public int countOrg(String outSide, String name) { public int countOrg(String outSide, String name, String orgtypeId) {
return wxQrcodeMapper.countOrg(outSide, name); return wxQrcodeMapper.countOrg(outSide, name, orgtypeId);
} }
} }
\ No newline at end of file
...@@ -172,16 +172,17 @@ public class WxQrcodeController { ...@@ -172,16 +172,17 @@ public class WxQrcodeController {
} }
/** /**
* 获取组织数据展示 * 获取组织数据
* @param name * @param name 名称搜索
* @param parentName 父级名称
* @param orgtypeId 组织类型id
* @param iDisplayStart * @param iDisplayStart
* @param iDisplayLength * @param iDisplayLength
* @param parentName 父级名称
* @return * @return
*/ */
@RequestMapping(value = "/listOrg",method = {RequestMethod.GET}) @RequestMapping(value = "/listOrg",method = {RequestMethod.GET})
@ResponseBody @ResponseBody
public JSONObject fromOrg(@RequestParam(required = false)String name, int iDisplayStart, int iDisplayLength, String parentName) { public JSONObject fromOrg(@RequestParam(required = false)String name, String parentName, String orgtypeId, int iDisplayStart, int iDisplayLength) {
JSONObject rtnJson = new JSONObject(); JSONObject rtnJson = new JSONObject();
//外部组织最上级名称 //外部组织最上级名称
String outSide = null; String outSide = null;
...@@ -192,8 +193,8 @@ public class WxQrcodeController { ...@@ -192,8 +193,8 @@ public class WxQrcodeController {
outSide = SystemConfig.p.getProperty("OUTSIDE_ORG_NAME"); outSide = SystemConfig.p.getProperty("OUTSIDE_ORG_NAME");
} }
List<WxQrcode> wxQrcodes = wxQrcodeService.fromOrg(outSide, name, iDisplayStart, iDisplayLength); List<WxQrcode> wxQrcodes = wxQrcodeService.fromOrg(outSide, name, orgtypeId, iDisplayStart, iDisplayLength);
int countOrg = wxQrcodeService.countOrg(outSide, name); int countOrg = wxQrcodeService.countOrg(outSide, name, orgtypeId);
rtnJson.put("iTotalRecords", countOrg); rtnJson.put("iTotalRecords", countOrg);
rtnJson.put("iTotalDisplayRecords", countOrg); rtnJson.put("iTotalDisplayRecords", countOrg);
rtnJson.put("data", wxQrcodes); rtnJson.put("data", wxQrcodes);
......
...@@ -57,6 +57,8 @@ userfiles.qrcodedir=/mydata/fileQrcode ...@@ -57,6 +57,8 @@ userfiles.qrcodedir=/mydata/fileQrcode
THREE_DRUGS_ID=24 THREE_DRUGS_ID=24
#\u68C0\u6D4B\u7ED3\u679C\u5B9E\u9A8C\u5BA4\u7EC4\u7EC7id #\u68C0\u6D4B\u7ED3\u679C\u5B9E\u9A8C\u5BA4\u7EC4\u7EC7id
LABORATORY_ROOT_ORG_ID=48 LABORATORY_ROOT_ORG_ID=48
#\u533B\u9662\u7EC4\u7EC7id
HOSPITAL_ORG_TYPE_ID=1
#\u56FE\u7247\u8BBF\u95EE\u5730\u5740 #\u56FE\u7247\u8BBF\u95EE\u5730\u5740
IMAGEURL=/aidea/mobile/qybase/showPic?picFileName={PICFILENAME} IMAGEURL=/aidea/mobile/qybase/showPic?picFileName={PICFILENAME}
...@@ -70,13 +72,13 @@ LOG_URL=http://www.michang-tech.com.cn:6989/log/addlog ...@@ -70,13 +72,13 @@ LOG_URL=http://www.michang-tech.com.cn:6989/log/addlog
#\u6821\u9A8C\u5151\u6362\u5BC6\u7801KEY #\u6821\u9A8C\u5151\u6362\u5BC6\u7801KEY
MEMBER_PASSWORD_KEY=DONGCHANGINT9527; MEMBER_PASSWORD_KEY=DONGCHANGINT9527;
list.refreshtoken=true list.refreshtoken=true
jwt.domain=localhost jwt.domain=pd.shxrtech.com
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD #\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
jwt.duration=86400000 jwt.duration=86400000
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u03AAtrue #\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u03AAtrue
security.secure=false security.secure=false
#\u662F\u5426\u96C6\u7FA4 master\u4E3Atrue #\u662F\u5426\u96C6\u7FA4 master\u4E3Atrue
quartz.isCluster=false quartz.isCluster=true
#\u987A\u4E30\u7269\u6D41\u914D\u7F6E\u4FE1\u606F\u53C2\u6570 #\u987A\u4E30\u7269\u6D41\u914D\u7F6E\u4FE1\u606F\u53C2\u6570
#\u987A\u4E30\u5BA2\u6237\u7F16\u7801 #\u987A\u4E30\u5BA2\u6237\u7F16\u7801
......
...@@ -19,6 +19,18 @@ import java.util.Date; ...@@ -19,6 +19,18 @@ import java.util.Date;
@Component @Component
public class CodingruleUtils { public class CodingruleUtils {
private static SimpleDateFormat sdf = new SimpleDateFormat("yyMM");
/**
* 粉丝别名rediskey
*/
public final static String ALIAS_KEY = "FANS_ENTITY_ALIAS_NUMBER";
/**
* 卡券记录rediskey
*/
public final static String COUPON_KEY = "CHECK_COUPON_RECORD_NUMBER";
private final CodingruleService codingruleService; private final CodingruleService codingruleService;
private final RedisTemplate<String, String> redisTemplate; private final RedisTemplate<String, String> redisTemplate;
...@@ -70,24 +82,29 @@ public class CodingruleUtils { ...@@ -70,24 +82,29 @@ public class CodingruleUtils {
} }
/** /**
* 粉丝别名生成规则 * 粉丝别名、卡券记录生成规则
* 年份后两位+月份两位+四位数从0开始排序 * 年份后两位+月份两位+四位数从0开始递增
* @return * @return
*/ */
public String getAlias(String isDel) { public String getPrimaryKey(String key) {
String key = "FANSS_ENTITY_NUMBER";
if (StringUtils.equals(isDel, "1")) {//每月执行一次记录是否删除主键自增长
getConfig().delete(key);
}
String dateFormatStr = "yyMM";
SimpleDateFormat sdf = new SimpleDateFormat(dateFormatStr);
String today = sdf.format(new Date()); String today = sdf.format(new Date());
String tplNum = "0000"; String tplNum = "0000";
long count = getConfig().opsForValue().increment(key, 1); long count = getConfig().opsForValue().increment(key, 1);
String number = String.valueOf(count); String number = String.valueOf(count);
number = today + tplNum.substring(0, tplNum.length() - number.length()) + number; number = today + tplNum.substring(0, tplNum.length() - number.length()) + number;
return number; return number;
} }
/**
* 重置粉丝别名、卡券自增长编码
*/
public void initMonthRedisKey() {
if (getConfig().hasKey(ALIAS_KEY)) {
getConfig().delete(ALIAS_KEY);
}
if (getConfig().hasKey(COUPON_KEY)) {
getConfig().delete(COUPON_KEY);
}
}
} }
...@@ -573,15 +573,7 @@ public class CoreService { ...@@ -573,15 +573,7 @@ public class CoreService {
if (fansList != null && fansList.size() > 0 && StringUtils.isNoneBlank(fansList.get(0).getStore())) { if (fansList != null && fansList.size() > 0 && StringUtils.isNoneBlank(fansList.get(0).getStore())) {
fannsEntity.setStore(fansList.get(0).getStore()); fannsEntity.setStore(fansList.get(0).getStore());
} else { } else {
Conds conds = new Conds(); fannsEntity.setStore(codingruleUtils.getPrimaryKey(CodingruleUtils.ALIAS_KEY));
conds.equal("clazz_path","com.cftech.order.job.InitAliasNumberJob");
conds.equal("del_flag",0);
SysJob job = jobService.fetchSearchByConds(conds);
fannsEntity.setStore(codingruleUtils.getAlias(job.getDescription()));
if (job.getDescription().equals("1")) {
job.setDescription("0");
jobService.update(job);
}
} }
fannsEntity.setHeadimgurl(user.getHeadimgurl()); fannsEntity.setHeadimgurl(user.getHeadimgurl());
......
...@@ -113,6 +113,19 @@ ...@@ -113,6 +113,19 @@
maxlength="50" placeholder="组织名称" required="required" maxlength="50" placeholder="组织名称" required="required"
value="$!{data.orgName}"> value="$!{data.orgName}">
</div> </div>
<div class="form-group form-md-line-input">
<label for="orgtypeId">组织类型</label>
<select class="form-control" name="orgtypeId" id="orgtypeId">
<option value="0" #if($!{data.orgtypeId}==
'0') selected="selected" #end>内部组织</option>
<option value="1" #if($!{data.orgtypeId}==
'1') selected="selected" #end>医院</option>
<option value="2" #if($!{data.orgtypeId}==
'2') selected="selected" #end>科室</option>
<option value="3" #if($!{data.orgtypeId}==
'3') selected="selected" #end>实验室</option>
</select>
</div>
<!--<div class="form-group form-md-line-input">--> <!--<div class="form-group form-md-line-input">-->
<!--<label>组织分类</label>--> <!--<label>组织分类</label>-->
<!--<div class="input-group">--> <!--<div class="input-group">-->
......
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,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>
...@@ -316,8 +316,6 @@ ...@@ -316,8 +316,6 @@
"mData": "name" "mData": "name"
},{ },{
"mData": "mobile" "mData": "mobile"
}, {
"mData": "email"
},{ },{
"mData": "userType" "mData": "userType"
},{ },{
...@@ -347,7 +345,7 @@ ...@@ -347,7 +345,7 @@
return "<font color='red'>未绑定</font>"; return "<font color='red'>未绑定</font>";
} }
},{ },{
"aTargets": [6], "aTargets": [5],
"mData": "userType", "mData": "userType",
"mRender": function (a, b, c, d) {//a表示对应mData的值,c表示当前记录行对象 "mRender": function (a, b, c, d) {//a表示对应mData的值,c表示当前记录行对象
let postion = null; let postion = null;
...@@ -371,7 +369,7 @@ ...@@ -371,7 +369,7 @@
return "<font color='blue'>" +postion + "</font>"; return "<font color='blue'>" +postion + "</font>";
} }
},{ },{
"aTargets": [9], "aTargets": [8],
"mData": "id", "mData": "id",
"mRender": function (a, b, c, d) {//a表示id对应的值,c表示当前记录行对象 "mRender": function (a, b, c, d) {//a表示id对应的值,c表示当前记录行对象
var html = '#if($shiro.hasPermission("sys:qyuser:edit"))';// var html = '#if($shiro.hasPermission("sys:qyuser:edit"))';//
......
...@@ -33,6 +33,9 @@ public class Qyuser implements Serializable { ...@@ -33,6 +33,9 @@ public class Qyuser implements Serializable {
private String loginName; private String loginName;
/**
* 客服昵称
*/
private String storeName; private String storeName;
/** /**
......
...@@ -83,10 +83,10 @@ public class OrgUnitController { ...@@ -83,10 +83,10 @@ public class OrgUnitController {
OrgUnit parentOrgUnit = orgUnitService.fetchById(orgUnit.getParentId()); OrgUnit parentOrgUnit = orgUnitService.fetchById(orgUnit.getParentId());
parentOrgName = parentOrgUnit.getOrgName(); parentOrgName = parentOrgUnit.getOrgName();
} }
if (orgUnit.getOrgtypeId() != null) { // if (orgUnit.getOrgtypeId() != null) {
Orgtype orgtype = orgtypeService.fetchById(orgUnit.getOrgtypeId()); // Orgtype orgtype = orgtypeService.fetchById(orgUnit.getOrgtypeId());
model.addAttribute("orgtypeName", orgtype.getName()); // model.addAttribute("orgtypeName", orgtype.getName());
} // }
model.addAttribute("data", orgUnit); model.addAttribute("data", orgUnit);
model.addAttribute("parentName", parentOrgName); model.addAttribute("parentName", parentOrgName);
model.addAttribute("accountId", orgUnit.getAccountsId()); model.addAttribute("accountId", orgUnit.getAccountsId());
......
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