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

Submit by Strive

Date 2021/07/26
Project End
parent 5ff91815
...@@ -643,7 +643,7 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order ...@@ -643,7 +643,7 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
if (orderMapper.update(order) > 0) { if (orderMapper.update(order) > 0) {
//非三期用户才能发券 //非三期用户才能发券
if (isThreeUsers(order.getOpenid()) == 0) { if (isThreeUsers(order.getOpenid()) == 0) {
couponrecordService.sendCouponRecord(order.getOpenid(), order.getAccountsId()); //couponrecordService.sendCouponRecord(order.getOpenid(), order.getAccountsId());
} }
sendQyWechatMassage(order.getId(), "0"); sendQyWechatMassage(order.getId(), "0");
sendQyWechatMassage(order.getId(), "1"); sendQyWechatMassage(order.getId(), "1");
......
...@@ -622,14 +622,12 @@ public class OrderController { ...@@ -622,14 +622,12 @@ public class OrderController {
if (orderFromVO != null && StringUtils.isNoneBlank(orderFromVO.getOpenid())) { if (orderFromVO != null && StringUtils.isNoneBlank(orderFromVO.getOpenid())) {
//非三期用户才能发券 //非三期用户才能发券
if (orderService.isThreeUsers(orderFromVO.getOpenid()) == 0) { if (orderService.isThreeUsers(orderFromVO.getOpenid()) == 0) {
couponrecordService.sendCouponRecord(orderFromVO.getOpenid(), accountId); //couponrecordService.sendCouponRecord(orderFromVO.getOpenid(), accountId);
} }
} }
orderService.sendQyWechatMassage(id, "0"); orderService.sendQyWechatMassage(id, "0");
orderService.sendQyWechatMassage(id, "1"); orderService.sendQyWechatMassage(id, "1");
} catch (IOException e) { } catch (Exception e) {
e.printStackTrace();
} catch (WriterException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
......
...@@ -26,6 +26,7 @@ import org.quartz.Job; ...@@ -26,6 +26,7 @@ import org.quartz.Job;
import org.quartz.JobDataMap; import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext; import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException; import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
...@@ -35,6 +36,7 @@ import java.util.List; ...@@ -35,6 +36,7 @@ import java.util.List;
* 每天凌晨固化报表数据 * 每天凌晨固化报表数据
*/ */
@Slf4j @Slf4j
@Component
public class ReportJob implements Job { public class ReportJob implements Job {
/** /**
...@@ -60,8 +62,7 @@ public class ReportJob implements Job { ...@@ -60,8 +62,7 @@ public class ReportJob implements Job {
//获取报表用户信息 //获取报表用户信息
Conds condPeople = new Conds(); Conds condPeople = new Conds();
condPeople.equal("DATE_FORMAT(detail.create_time ,'%Y-%m-%d')", format.format(today)); //condPeople.equal("DATE_FORMAT(detail.create_time ,'%Y-%m-%d')", format.format(today));
//condPeople.equal("DATE_FORMAT(detail.create_time ,'%Y-%m-%d')", "2021-04-12");
condPeople.equal("detail.del_flag", Constants.DEL_FLAG_0); condPeople.equal("detail.del_flag", Constants.DEL_FLAG_0);
Sort sortPeople = new Sort("detail.create_time", OrderType.DESC); Sort sortPeople = new Sort("detail.create_time", OrderType.DESC);
List<ReportPeopleInfo> listPeople = reportService.selectReportPeopleInfo(condPeople, sortPeople); List<ReportPeopleInfo> listPeople = reportService.selectReportPeopleInfo(condPeople, sortPeople);
...@@ -90,35 +91,34 @@ public class ReportJob implements Job { ...@@ -90,35 +91,34 @@ public class ReportJob implements Job {
condCode.in("record.type", new String[]{"3", "4"}); condCode.in("record.type", new String[]{"3", "4"});
Sort sortCode = new Sort("record.create_time", OrderType.DESC); Sort sortCode = new Sort("record.create_time", OrderType.DESC);
List<ReportCode> listCode = reportService.selectReportCodeInfo(condCode, sortCode); List<ReportCode> listCode = reportService.selectReportCodeInfo(condCode, sortCode);
if (listCode == null || listCode.size() == 0) { if (listCode != null && listCode.size() != 0) {
continue; ReportCode reportCode = listCode.get(0);
} if (StringUtils.equals(reportCode.getType(), "3")) {
//二维码类型为医生 根据绑定的医生人员ID查医生信息
ReportCode reportCode = listCode.get(0); Conds condDoctor = new Conds();
if (StringUtils.equals(reportCode.getType(), "3")) { condDoctor.equal("qyuser.id", reportCode.getBindId());
//二维码类型为医生 根据绑定的医生人员ID查医生信息 condDoctor.equal("qyuser.del_flag", "0");
Conds condDoctor = new Conds(); ReportDoctorInfo reportDoctorInfo = reportService.selectReportDoctorInfo(condDoctor);
condDoctor.equal("qyuser.id", reportCode.getBindId()); if (reportDoctorInfo != null) {
condDoctor.equal("qyuser.del_flag", "0"); report.setDoctorTitle("医生");
ReportDoctorInfo reportDoctorInfo = reportService.selectReportDoctorInfo(condDoctor); report.setDoctorName(reportDoctorInfo.getUserName());
if (reportDoctorInfo != null) { report.setSex(reportDoctorInfo.getGender());
report.setDoctorTitle("医生"); report.setDoctorPhone(reportDoctorInfo.getUserPhone());
report.setDoctorName(reportDoctorInfo.getUserName());
report.setSex(reportDoctorInfo.getGender()); //如果医生组织id在区域组织下面 则根据大区长编码获取下面所有组织信息
report.setDoctorPhone(reportDoctorInfo.getUserPhone()); String orgParentIds = reportDoctorInfo.getOrgParentIds();
setReportOrgs(orgUnitService, qyuserService, report, orgParentIds);
//如果医生组织id在区域组织下面 则根据大区长编码获取下面所有组织信息 }
String orgParentIds = reportDoctorInfo.getOrgParentIds(); } else {
setReportOrgs(orgUnitService, qyuserService, report, orgParentIds); //二维码类型为组织 根据绑定的组织ID获取对应区域组织信息
} OrgUnit orgUnitObj = orgUnitService.fetchById(reportCode.getBindId());
} else { if (orgUnitObj != null) {
//二维码类型为组织 根据绑定的组织ID获取对应区域组织信息 String orgParentIds = orgUnitObj.getParentIds();
OrgUnit orgUnitObj = orgUnitService.fetchById(reportCode.getBindId()); setReportOrgs(orgUnitService, qyuserService, report, orgParentIds);
if (orgUnitObj != null) { }
String orgParentIds = orgUnitObj.getParentIds();
setReportOrgs(orgUnitService, qyuserService, report, orgParentIds);
} }
} }
//新增报表记录 //新增报表记录
reportService.save(report); reportService.save(report);
} }
...@@ -168,6 +168,7 @@ public class ReportJob implements Job { ...@@ -168,6 +168,7 @@ public class ReportJob implements Job {
Conds condHospital = new Conds(); Conds condHospital = new Conds();
condHospital.equal("t.del_flag", Constants.DEL_FLAG_0); condHospital.equal("t.del_flag", Constants.DEL_FLAG_0);
condHospital.equal("t.org_id", item.getId()); condHospital.equal("t.org_id", item.getId());
condHospital.equal("t.user_type", "5");//销售代表
List<Qyuser> listUser = qyuserService.fetchSearchByPage(0L, condHospital, null, 0, 0); List<Qyuser> listUser = qyuserService.fetchSearchByPage(0L, condHospital, null, 0, 0);
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
for (Qyuser qyuser : listUser) { for (Qyuser qyuser : listUser) {
......
...@@ -80,13 +80,13 @@ LOG_URL=http://www.michang-tech.com.cn:6989/log/addlog ...@@ -80,13 +80,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=pd.shxrtech.com jwt.domain=localhost
#\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=true quartz.isCluster=false
#\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
......
...@@ -87,7 +87,7 @@ jwt.duration=86400000 ...@@ -87,7 +87,7 @@ 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
......
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