|
@@ -330,7 +330,11 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
|
|
|
if (StringUtils.isNotEmpty(status)) {
|
|
|
return AjaxResult.error(status);
|
|
|
}
|
|
|
- long orderStatus = 1030L;
|
|
|
+ long actId = 1030L;
|
|
|
+ boolean orderStatus = false;
|
|
|
+ if (tmsorderbillscars.getOrderStatus() == 80L) {
|
|
|
+ orderStatus = true;
|
|
|
+ }
|
|
|
if ("waybillDate".equals(operationType)) {
|
|
|
// 回单提交
|
|
|
if (StringUtils.isNull(tmsorderbillscars.getWaybillDate())) {
|
|
@@ -342,7 +346,9 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
|
|
|
if (StringUtils.isNull(tmsorderbillscars.getUnLoadDate())) {
|
|
|
return AjaxResult.error("未找到还卸柜时间");
|
|
|
}
|
|
|
- if (tmsorderbillscars.getOrderStatus() < 80L) {
|
|
|
+ if (orderStatus) {
|
|
|
+ return AjaxResult.error("该运单已回单,若多次失败请联系管理员");
|
|
|
+ } else if (tmsorderbillscars.getOrderStatus() < 80L) {
|
|
|
tmsorderbillscars.setOrderStatus(60L);
|
|
|
}
|
|
|
} else if ("mdLoadDate".equals(operationType)) {
|
|
@@ -350,7 +356,9 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
|
|
|
if (StringUtils.isNull(tmsorderbillscars.getMdLoadDate())) {
|
|
|
return AjaxResult.error("未找到装卸货时间");
|
|
|
}
|
|
|
- if (tmsorderbillscars.getOrderStatus() < 60L) {
|
|
|
+ if (orderStatus) {
|
|
|
+ return AjaxResult.error("该运单已回单,若多次失败请联系管理员");
|
|
|
+ } else if (tmsorderbillscars.getOrderStatus() < 60L) {
|
|
|
tmsorderbillscars.setOrderStatus(50L);
|
|
|
}
|
|
|
} else if ("loadDate".equals(operationType)) {
|
|
@@ -358,7 +366,9 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
|
|
|
if (StringUtils.isNull(tmsorderbillscars.getLoadDate())) {
|
|
|
return AjaxResult.error("未找到提箱时间");
|
|
|
}
|
|
|
- if (tmsorderbillscars.getOrderStatus() < 50L) {
|
|
|
+ if (orderStatus) {
|
|
|
+ return AjaxResult.error("该运单已回单,若多次失败请联系管理员");
|
|
|
+ } else if (tmsorderbillscars.getOrderStatus() < 50L) {
|
|
|
tmsorderbillscars.setOrderStatus(40L);
|
|
|
}
|
|
|
} else if ("acceptDate".equals(operationType)) {
|
|
@@ -366,7 +376,9 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
|
|
|
if (StringUtils.isNull(tmsorderbillscars.getAcceptDate())) {
|
|
|
return AjaxResult.error("未找到接单时间");
|
|
|
}
|
|
|
- if (tmsorderbillscars.getOrderStatus() < 40L) {
|
|
|
+ if (orderStatus) {
|
|
|
+ return AjaxResult.error("该运单已回单,若多次失败请联系管理员");
|
|
|
+ } else if (tmsorderbillscars.getOrderStatus() < 40L) {
|
|
|
tmsorderbillscars.setOrderStatus(20L);
|
|
|
}
|
|
|
}
|
|
@@ -378,7 +390,7 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
|
|
|
}
|
|
|
Ftmsorderbillsattachs ftmsorderbillsattachs = new Ftmsorderbillsattachs();
|
|
|
ftmsorderbillsattachs.setPId(pId);
|
|
|
- ftmsorderbillsattachs.setActId(orderStatus);
|
|
|
+ ftmsorderbillsattachs.setActId(actId);
|
|
|
ftmsorderbillsattachsMapper.deleteftmsorderbillsattachs(ftmsorderbillsattachs);
|
|
|
if (StringUtils.isNotEmpty(attachs) && !"[]".equals(attachs)) {
|
|
|
JSONArray attachJson = JSONArray.parseArray(attachs);
|
|
@@ -387,7 +399,7 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
|
|
|
a.setPId(pId);
|
|
|
a.setOrgId(orgId);
|
|
|
a.setBillStatus(6L);
|
|
|
- a.setActId(orderStatus);
|
|
|
+ a.setActId(actId);
|
|
|
a.setCreateTime(new Date());
|
|
|
a.setCreateBy(SecurityUtils.getUsername());
|
|
|
if (ftmsorderbillsattachsMapper.insertftmsorderbillsattachs(a) <= 0) {
|