|
@@ -93,10 +93,9 @@ public class RepairBusiness {
|
|
|
// 1:工单落入本地表 TL_SynDataFrom_tbl_assign_batch
|
|
|
@Scheduled(fixedDelay = 1 * 5 * 1000)
|
|
|
public void inputOrder() {
|
|
|
- /*if (1 == 1) {
|
|
|
+ if (1 == 1) {
|
|
|
return;
|
|
|
}
|
|
|
- */
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
List<ItfTblAssignDownload> repairRec = new ArrayList<>();
|
|
|
List<Long> pgids = new ArrayList<>();
|
|
@@ -191,11 +190,11 @@ public class RepairBusiness {
|
|
|
// 维修单明细表更新 TL_SynDataFrom_tbl_assign_mx
|
|
|
generateMxUpdate(brand, item, order, sysDictRefDLMap, sysDictRefXLMap, sysDictRefXiLieMap);
|
|
|
// 处理维修单过程反馈(只新增不修改) 放入操作日志表 TL_SynDataFrom_tbl_assign_fkmx
|
|
|
- generateFkmxUpdate(brand, item, order);
|
|
|
+ generateFkmxUpdate(item, order);
|
|
|
// 处理用户评价数据 TL_SynDataFrom_tbl_assign_satisfaction
|
|
|
- generateSstisfactionUpdate(brand, item, sysDictRefDLMap, order);
|
|
|
+ generateSstisfactionUpdate(item, sysDictRefDLMap, order);
|
|
|
// 阅读要求数据处理 TL_SynDataFrom_tbl_assign_xzyd
|
|
|
- generateXzydUpdate(brand, yds, order);
|
|
|
+ generateXzydUpdate(yds, order);
|
|
|
// 用户预约改约数据处理 TL_SynDataFrom_tbl_assign_appointment
|
|
|
generateAppointmentUpdate(item, order);
|
|
|
}
|
|
@@ -248,7 +247,7 @@ public class RepairBusiness {
|
|
|
.eq(OrderBase::getOrderType, OrderTypeEnum.ORDER_TYPE_REPAIR.getCode()).one();
|
|
|
}
|
|
|
// 网点信息更新
|
|
|
- updateWebsit(brand, sysDictRefDLMap, item, oldOrder);
|
|
|
+ updateWebsit(sysDictRefDLMap, item, oldOrder);
|
|
|
// 用户期望上门时间信息更新
|
|
|
updateYhqwsmsj(item, oldOrder);
|
|
|
// 状态信息更新
|
|
@@ -437,19 +436,19 @@ public class RepairBusiness {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void updateWebsit(Brand brand, Map<String, List<SysDictRef>> sysDictRefDLMap, ItfTblAssignDownload item, OrderBase oldOrder) {
|
|
|
+ private void updateWebsit(Map<String, List<SysDictRef>> sysDictRefDLMap, ItfTblAssignDownload item, OrderBase oldOrder) {
|
|
|
// 看网点更新的条件
|
|
|
Boolean flag = getaBoolean(sysDictRefDLMap, item, oldOrder);
|
|
|
// 更新网点信息
|
|
|
if (flag){
|
|
|
// 字段赋值
|
|
|
- getOrderBase(brand, item, oldOrder);
|
|
|
+ getOrderBase(item, oldOrder);
|
|
|
orderBaseService.updateById(oldOrder);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@NotNull
|
|
|
- private void getOrderBase(Brand brand, ItfTblAssignDownload item, OrderBase upOrder) {
|
|
|
+ private void getOrderBase(ItfTblAssignDownload item, OrderBase upOrder) {
|
|
|
if (StringUtils.isNotEmpty(item.getXxlb())){
|
|
|
upOrder.setInfoType(item.getXxlb());
|
|
|
} else {
|
|
@@ -467,11 +466,13 @@ public class RepairBusiness {
|
|
|
} else {
|
|
|
wdno = item.getWxwdno();
|
|
|
}
|
|
|
- WebsitFWS resultData = publicService.WebsitToSH(wdno, brand.getBrandId());
|
|
|
+ WebsitFWS resultData = publicService.shshwdToptshwd(wdno, upOrder.getMainId());
|
|
|
upOrder.setWebsitId(resultData.getWdId());
|
|
|
upOrder.setWebsitName(resultData.getWdmc());
|
|
|
+
|
|
|
+
|
|
|
if (StringUtils.isNotEmpty(item.getXjwdno())){
|
|
|
- WebsitFWS res = publicService.WebsitToSH(item.getXjwdno(), brand.getBrandId());
|
|
|
+ WebsitFWS res = publicService.shshwdToptshwd(item.getXjwdno(), upOrder.getMainId());
|
|
|
upOrder.setReceWebsitId(res.getWdId());
|
|
|
upOrder.setReceWebsitName(res.getWdmc());
|
|
|
} else {
|
|
@@ -560,7 +561,7 @@ public class RepairBusiness {
|
|
|
// 处理维修单明细表 TL_SynDataFrom_tbl_assign_mx
|
|
|
generateMx(brand, item, order, sysDictRefDLMap, sysDictRefXLMap, sysDictRefXiLieMap);
|
|
|
// 处理维修单过程反馈表 放入操作日志表 TL_SynDataFrom_tbl_assign_fkmx
|
|
|
- generateFkmx(brand, item, order);
|
|
|
+ generateFkmx(item, order);
|
|
|
// 处理用户评价数据 TL_SynDataFrom_tbl_assign_satisfaction
|
|
|
generateSstisfaction(brand, item, sysDictRefDLMap, order);
|
|
|
// 阅读要求数据处理 TL_SynDataFrom_tbl_assign_xzyd
|
|
@@ -631,7 +632,7 @@ public class RepairBusiness {
|
|
|
|
|
|
for (ItfTblAssignXzydDownload yd: yds){
|
|
|
// 获取阅读要求数据
|
|
|
- getAddOrderInfor(brand, order, oilist, yd);
|
|
|
+ getAddOrderInfor(order, oilist, yd);
|
|
|
|
|
|
ItfTblAssignXzydDownload up = new ItfTblAssignXzydDownload();
|
|
|
up.setSynReqId(yd.getSynReqId());
|
|
@@ -649,7 +650,7 @@ public class RepairBusiness {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void generateXzydUpdate(Brand brand, List<ItfTblAssignXzydDownload> yds, OrderBase order) {
|
|
|
+ private void generateXzydUpdate(List<ItfTblAssignXzydDownload> yds, OrderBase order) {
|
|
|
List<OrderInformation> oilist = new ArrayList<>();
|
|
|
List<OrderInformation> oilistUp = new ArrayList<>();
|
|
|
List<ItfTblAssignXzydDownload> ups = new ArrayList<>();
|
|
@@ -663,9 +664,9 @@ public class RepairBusiness {
|
|
|
for (ItfTblAssignXzydDownload yd: yds){
|
|
|
// 存在修改,不存在新增
|
|
|
if (oisMap.containsKey(yd.getXzid())){
|
|
|
- getUpOrderInfor(brand, oilistUp, yd, order);
|
|
|
+ getUpOrderInfor(oilistUp, yd, order);
|
|
|
} else {
|
|
|
- getAddOrderInfor(brand, order, oilist, yd);
|
|
|
+ getAddOrderInfor(order, oilist, yd);
|
|
|
}
|
|
|
|
|
|
ItfTblAssignXzydDownload up = new ItfTblAssignXzydDownload();
|
|
@@ -688,7 +689,7 @@ public class RepairBusiness {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void getUpOrderInfor(Brand brand, List<OrderInformation> oilistUp,
|
|
|
+ private void getUpOrderInfor(List<OrderInformation> oilistUp,
|
|
|
ItfTblAssignXzydDownload yd, OrderBase order) {
|
|
|
OrderInformation up = new OrderInformation();
|
|
|
|
|
@@ -703,13 +704,13 @@ public class RepairBusiness {
|
|
|
up.setReadStatus(yd.getYdbz());
|
|
|
up.setReadTime(yd.getYdsj());
|
|
|
up.setReadName(yd.getYdrmc());
|
|
|
- WebsitFWS websitFWS = publicService.WebsitToSH(yd.getWdno(), brand.getBrandId());
|
|
|
+ WebsitFWS websitFWS = publicService.shshwdToptshwd(yd.getWdno(), order.getMainId());
|
|
|
up.setWebsitId(websitFWS.getWdId());
|
|
|
up.setWebsitName(websitFWS.getWdmc());
|
|
|
oilistUp.add(up);
|
|
|
}
|
|
|
|
|
|
- private void getAddOrderInfor(Brand brand, OrderBase order, List<OrderInformation> oilist, ItfTblAssignXzydDownload yd) {
|
|
|
+ private void getAddOrderInfor(OrderBase order, List<OrderInformation> oilist, ItfTblAssignXzydDownload yd) {
|
|
|
OrderInformation add = new OrderInformation();
|
|
|
add.setXzid(yd.getXzid());
|
|
|
add.setAskCategoryId(yd.getXzyqlb());
|
|
@@ -722,7 +723,7 @@ public class RepairBusiness {
|
|
|
add.setReadStatus(yd.getYdbz());
|
|
|
add.setReadName(yd.getYdrmc());
|
|
|
add.setReadTime(yd.getYdsj());
|
|
|
- WebsitFWS websitFWS = publicService.WebsitToSH(yd.getWdno(), brand.getBrandId());
|
|
|
+ WebsitFWS websitFWS = publicService.shshwdToptshwd(yd.getWdno(), order.getMainId());
|
|
|
add.setWebsitId(websitFWS.getWdId());
|
|
|
add.setWebsitName(websitFWS.getWdmc());
|
|
|
oilist.add(add);
|
|
@@ -769,7 +770,7 @@ public class RepairBusiness {
|
|
|
// 只插入一条sxlx = 0的首评记录
|
|
|
if (canInsert.equals(1)){
|
|
|
// 增加评价记录
|
|
|
- WebsitFWS websitFWS = addappraise(brand, sysDictRefDLMap, s);
|
|
|
+ WebsitFWS websitFWS = addappraise(order,sysDictRefDLMap, s);
|
|
|
// 增加差评短信
|
|
|
addcpsms(order, s, websitFWS);
|
|
|
}
|
|
@@ -785,7 +786,7 @@ public class RepairBusiness {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void generateSstisfactionUpdate(Brand brand, ItfTblAssignDownload item, Map<String, List<SysDictRef>> sysDictRefDLMap, OrderBase order) {
|
|
|
+ private void generateSstisfactionUpdate(ItfTblAssignDownload item, Map<String, List<SysDictRef>> sysDictRefDLMap, OrderBase order) {
|
|
|
List<ItfTblAssignSatisfactionDownload> satis = itfTblAssignSatisfactionDownloadService.lambdaQuery()
|
|
|
.eq(ItfTblAssignSatisfactionDownload::getDownloadTaskNo, item.getDownloadTaskNo())
|
|
|
.orderByAsc(ItfTblAssignSatisfactionDownload::getHfsj)
|
|
@@ -826,7 +827,7 @@ public class RepairBusiness {
|
|
|
// 只插入一条sxlx = 0的首评记录
|
|
|
if (canInsert.equals(1)){
|
|
|
// 增加评价记录
|
|
|
- WebsitFWS websitFWS = addappraise(brand, sysDictRefDLMap, s);
|
|
|
+ WebsitFWS websitFWS = addappraise(order, sysDictRefDLMap, s);
|
|
|
// 增加差评短信
|
|
|
addcpsms(order, s, websitFWS);
|
|
|
}
|
|
@@ -862,10 +863,11 @@ public class RepairBusiness {
|
|
|
}
|
|
|
|
|
|
@NotNull
|
|
|
- private WebsitFWS addappraise(Brand brand, Map<String, List<SysDictRef>> sysDictRefDLMap, ItfTblAssignSatisfactionDownload s) {
|
|
|
+ private WebsitFWS addappraise(OrderBase order, Map<String, List<SysDictRef>> sysDictRefDLMap, ItfTblAssignSatisfactionDownload s) {
|
|
|
Boolean canAppeal = Boolean.TRUE;
|
|
|
Integer appeal = 0;
|
|
|
ReAppointment rq = new ReAppointment();
|
|
|
+ WebsitFWS websitFWS = new WebsitFWS();
|
|
|
|
|
|
if(StringUtils.isNotEmpty(s.getPjnr())){
|
|
|
if (s.getPjnr().equals("1") || s.getPjnr().equals("满意")){
|
|
@@ -888,7 +890,10 @@ public class RepairBusiness {
|
|
|
OrderAppraise add = assignSatisfactionDownloadMapper.getOrderAppraise(rq);
|
|
|
|
|
|
// rvisit_websit_id 单独处理
|
|
|
- WebsitFWS websitFWS = publicService.WebsitToSH(s.getHfwdno(), brand.getBrandId());
|
|
|
+ websitFWS = publicService.shshwdToptshwd(s.getHfwdno(), order.getMainId());
|
|
|
+ if (StringUtils.isEmpty(websitFWS.getWdId())){
|
|
|
+ websitFWS = publicService.shxswdToptxswd(s.getHfwdno(), order.getMainId());
|
|
|
+ }
|
|
|
add.setRvisitWebsitId(websitFWS.getWdId());
|
|
|
add.setRvisitWebsitName(websitFWS.getWdmc());
|
|
|
// splb 商品大类 单独处理
|
|
@@ -938,7 +943,7 @@ public class RepairBusiness {
|
|
|
itfTblAssignSatisfactionDownloadService.updateById(up);
|
|
|
}
|
|
|
|
|
|
- private void generateFkmx(Brand brand, ItfTblAssignDownload item, OrderBase order) {
|
|
|
+ private void generateFkmx(ItfTblAssignDownload item, OrderBase order) {
|
|
|
List<ItfTblAssignFkmxDownload> fkmxRec = new ArrayList<>();
|
|
|
List<OrderRepairOperatingLog> orols = new ArrayList<>();
|
|
|
List<ItfTblAssignFkmxDownload> ups = new ArrayList<>();
|
|
@@ -950,7 +955,7 @@ public class RepairBusiness {
|
|
|
.list();
|
|
|
for (ItfTblAssignFkmxDownload fkmx :fkmxRec){
|
|
|
// 获取操作明细数据
|
|
|
- getoroldata(brand, order, orols, fkmx);
|
|
|
+ getoroldata(order, orols, fkmx);
|
|
|
ItfTblAssignFkmxDownload u = new ItfTblAssignFkmxDownload();
|
|
|
u.setSynReqId(fkmx.getSynReqId());
|
|
|
u.setSynStatus(1);
|
|
@@ -965,7 +970,7 @@ public class RepairBusiness {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void generateFkmxUpdate(Brand brand, ItfTblAssignDownload item, OrderBase order) {
|
|
|
+ private void generateFkmxUpdate(ItfTblAssignDownload item, OrderBase order) {
|
|
|
List<ItfTblAssignFkmxDownload> fkmxRec = new ArrayList<>();
|
|
|
List<OrderRepairOperatingLog> orols = new ArrayList<>();
|
|
|
List<ItfTblAssignFkmxDownload> ups = new ArrayList<>();
|
|
@@ -985,7 +990,7 @@ public class RepairBusiness {
|
|
|
for (ItfTblAssignFkmxDownload fkmx :fkmxRec){
|
|
|
// 存在不做更新?过程是这样写的
|
|
|
if (!orolMap.containsKey(fkmx.getFkid())){
|
|
|
- getoroldata(brand, order, orols, fkmx);
|
|
|
+ getoroldata(order, orols, fkmx);
|
|
|
}
|
|
|
|
|
|
ItfTblAssignFkmxDownload u = new ItfTblAssignFkmxDownload();
|
|
@@ -1002,8 +1007,9 @@ public class RepairBusiness {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void getoroldata(Brand brand, OrderBase order, List<OrderRepairOperatingLog> orols, ItfTblAssignFkmxDownload fkmx) {
|
|
|
+ private void getoroldata(OrderBase order, List<OrderRepairOperatingLog> orols, ItfTblAssignFkmxDownload fkmx) {
|
|
|
OrderRepairOperatingLog add = new OrderRepairOperatingLog();
|
|
|
+ WebsitFWS websitFWS = new WebsitFWS();
|
|
|
add.setWebsitName(order.getWebsitName());
|
|
|
add.setWebsitId(order.getWebsitId());
|
|
|
add.setOrderBaseId(order.getId());
|
|
@@ -1014,7 +1020,10 @@ public class RepairBusiness {
|
|
|
add.setFeedback(fkmx.getFkjg());
|
|
|
add.setOperator(fkmx.getFkren());
|
|
|
add.setOperatorNumber(fkmx.getFkrenmc());
|
|
|
- WebsitFWS websitFWS = publicService.WebsitToSH(fkmx.getFkwdno(), brand.getBrandId());
|
|
|
+ websitFWS = publicService.shshwdToptshwd(fkmx.getFkwdno(), order.getMainId());
|
|
|
+ if (StringUtils.isEmpty(websitFWS.getWdId())){
|
|
|
+ websitFWS = publicService.shxswdToptxswd(fkmx.getFkwdno(), order.getMainId());
|
|
|
+ }
|
|
|
add.setOperateWebsit(websitFWS.getWdmc());
|
|
|
add.setWebsitPhone(websitFWS.getWdlxdh());
|
|
|
add.setWorkerOrderStatus(order.getOrderStatus());// 反馈时的工单状态
|
|
@@ -1116,7 +1125,7 @@ public class RepairBusiness {
|
|
|
op.setSaleWebsit(websitFWS.getWdId());
|
|
|
|
|
|
// 服务单位处理 service_websit
|
|
|
- websitFWS = publicService.shshwdToptshwd(op.getServiceWebsit(),order.getMainId(),order);
|
|
|
+ websitFWS = publicService.shshwdToptshwd(op.getServiceWebsit(),order.getMainId());
|
|
|
op.setServiceWebsit(websitFWS.getWdId());
|
|
|
|
|
|
// 其他部分参数赋值
|
|
@@ -1247,7 +1256,7 @@ public class RepairBusiness {
|
|
|
websitFWS = publicService.shxswdToptxswd(op.getSaleWebsit(),order.getMainId());
|
|
|
op.setSaleWebsit(websitFWS.getWdId());
|
|
|
// 服务单位处理 service_websit
|
|
|
- websitFWS = publicService.shshwdToptshwd(op.getServiceWebsit(),order.getMainId(),order);
|
|
|
+ websitFWS = publicService.shshwdToptshwd(op.getServiceWebsit(),order.getMainId());
|
|
|
op.setServiceWebsit(websitFWS.getWdId());
|
|
|
|
|
|
op.setOrderBaseId(order.getId());
|