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