Merge pull request 'develop' (#96) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/96
This commit is contained in:
commit
b9c95f5d0a
@ -4140,19 +4140,29 @@ public class EmisBaseService {
|
|||||||
|
|
||||||
List<EmisTransPlanRule> toAdd = new ArrayList<>();
|
List<EmisTransPlanRule> toAdd = new ArrayList<>();
|
||||||
for (EmisTransPlanRule node : topLevelNodes) {
|
for (EmisTransPlanRule node : topLevelNodes) {
|
||||||
// 柯桥市场部
|
//南京市场部
|
||||||
if ("25001".equals(node.getStartSiteCode())) {
|
if ("25001".equals(node.getStartSiteCode())) {
|
||||||
|
List<EmisTransPlanRule> filterRules = allRules.stream().filter(i -> "25000".equals(i.getStartSiteCode())).collect(Collectors.toList());
|
||||||
EmisTransPlanRule copyRule = new EmisTransPlanRule();
|
EmisTransPlanRule copyRule = new EmisTransPlanRule();
|
||||||
BeanUtils.copyProperties(node, copyRule);
|
BeanUtils.copyProperties(node, copyRule);
|
||||||
copyRule.setStartSiteCode("25000");
|
copyRule.setStartSiteCode("25000");
|
||||||
|
copyRule.setStartSiteName("南京分拨中心");
|
||||||
|
if(CollectionUtil.isNotEmpty(filterRules)){
|
||||||
|
copyRule.setManager(filterRules.get(0).getManager());
|
||||||
|
}
|
||||||
toAdd.add(copyRule);
|
toAdd.add(copyRule);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 南京市场部
|
// 柯桥市场部
|
||||||
if ("57502".equals(node.getStartSiteCode())) {
|
if ("57502".equals(node.getStartSiteCode())) {
|
||||||
|
List<EmisTransPlanRule> filterRules = allRules.stream().filter(i -> "57501".equals(i.getStartSiteCode())).collect(Collectors.toList());
|
||||||
EmisTransPlanRule copyRule = new EmisTransPlanRule();
|
EmisTransPlanRule copyRule = new EmisTransPlanRule();
|
||||||
BeanUtils.copyProperties(node, copyRule);
|
BeanUtils.copyProperties(node, copyRule);
|
||||||
copyRule.setStartSiteCode("57501");
|
copyRule.setStartSiteCode("57501");
|
||||||
|
copyRule.setStartSiteName("柯桥分拨中心");
|
||||||
|
if(CollectionUtil.isNotEmpty(filterRules)){
|
||||||
|
copyRule.setManager(filterRules.get(0).getManager());
|
||||||
|
}
|
||||||
toAdd.add(copyRule);
|
toAdd.add(copyRule);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5119,6 +5129,9 @@ public class EmisBaseService {
|
|||||||
emisWaybill.setVirtualRemark(virtualRemark);
|
emisWaybill.setVirtualRemark(virtualRemark);
|
||||||
emisWaybill.setId(masterWaybill.getId());
|
emisWaybill.setId(masterWaybill.getId());
|
||||||
emisWaybillMapper.updateEmisWaybill(emisWaybill);
|
emisWaybillMapper.updateEmisWaybill(emisWaybill);
|
||||||
|
if(StringUtil.isNotBlank(emisWaybillOld.getMasterBillCode())){
|
||||||
|
updateOldMasterBill(emisWaybillSave,emisWaybillOld.getMasterBillCode());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public EmisWaybill checkVirtualParam(EmisWaybill emisWaybillSave, EmisWaybill emisWaybillOld) throws EmisBizError {
|
public EmisWaybill checkVirtualParam(EmisWaybill emisWaybillSave, EmisWaybill emisWaybillOld) throws EmisBizError {
|
||||||
@ -5181,17 +5194,7 @@ public class EmisBaseService {
|
|||||||
String masterBillCode = emisWaybillOld.getMasterBillCode();
|
String masterBillCode = emisWaybillOld.getMasterBillCode();
|
||||||
if (StringUtil.isNotBlank(masterBillCode)) {
|
if (StringUtil.isNotBlank(masterBillCode)) {
|
||||||
emisWaybillSave.setMasterBillCode(" ");
|
emisWaybillSave.setMasterBillCode(" ");
|
||||||
String virtualBillCode = emisWaybillSave.getBillCode();
|
updateOldMasterBill(emisWaybillSave, masterBillCode);
|
||||||
EmisWaybill masterWaybill = emisWaybillMapper
|
|
||||||
.selectEmisWaybillByBillCode(masterBillCode);
|
|
||||||
List<String> filterVirtualRemark = Arrays.stream(masterWaybill.getVirtualRemark().split(","))
|
|
||||||
.filter(i -> !i.equals(virtualBillCode)).collect(Collectors.toList());
|
|
||||||
String virtualRemark = String.join(",", filterVirtualRemark);
|
|
||||||
if(StringUtil.isBlank(virtualRemark)) {
|
|
||||||
virtualRemark = " ";
|
|
||||||
}
|
|
||||||
masterWaybill.setVirtualRemark(virtualRemark);
|
|
||||||
emisWaybillMapper.updateEmisWaybill(masterWaybill);
|
|
||||||
if (!"078".equals(emisWaybillSave.getTransLineType())) {
|
if (!"078".equals(emisWaybillSave.getTransLineType())) {
|
||||||
emisWaybillProblemInfoService.deleteEmisWaybillProblemInfoByBillCode(emisWaybillSave.getBillCode());
|
emisWaybillProblemInfoService.deleteEmisWaybillProblemInfoByBillCode(emisWaybillSave.getBillCode());
|
||||||
}
|
}
|
||||||
@ -5201,6 +5204,20 @@ public class EmisBaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateOldMasterBill(EmisWaybill emisWaybillSave, String masterBillCode) {
|
||||||
|
String virtualBillCode = emisWaybillSave.getBillCode();
|
||||||
|
EmisWaybill masterWaybill = emisWaybillMapper
|
||||||
|
.selectEmisWaybillByBillCode(masterBillCode);
|
||||||
|
List<String> filterVirtualRemark = Arrays.stream(masterWaybill.getVirtualRemark().split(","))
|
||||||
|
.filter(i -> !i.equals(virtualBillCode)).collect(Collectors.toList());
|
||||||
|
String virtualRemark = String.join(",", filterVirtualRemark);
|
||||||
|
if(StringUtil.isBlank(virtualRemark)) {
|
||||||
|
virtualRemark = " ";
|
||||||
|
}
|
||||||
|
masterWaybill.setVirtualRemark(virtualRemark);
|
||||||
|
emisWaybillMapper.updateEmisWaybill(masterWaybill);
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws ParseException {
|
public static void main(String[] args) throws ParseException {
|
||||||
// Date startDate = new Date("202");
|
// Date startDate = new Date("202");
|
||||||
Date startDate= new SimpleDateFormat("yyyy-MM-dd").parse("2025-05-11");
|
Date startDate= new SimpleDateFormat("yyyy-MM-dd").parse("2025-05-11");
|
||||||
|
|||||||
@ -183,8 +183,7 @@
|
|||||||
and ( disp_area_id=#{dispAreaId} or disp_area_site_code='-1' )
|
and ( disp_area_id=#{dispAreaId} or disp_area_site_code='-1' )
|
||||||
and ( send_area_id=#{sendAreaId} or send_area_site_code='-1')
|
and ( send_area_id=#{sendAreaId} or send_area_site_code='-1')
|
||||||
and (
|
and (
|
||||||
( start_date <![CDATA[< ]]> #{startDate} and #{startDate} <![CDATA[<= ]]> end_date ) or ( start_date
|
start_date <= #{endDate} and end_date >= #{startDate}
|
||||||
<![CDATA[< ]]> #{endDate} and #{endDate} <![CDATA[<= ]]> end_date )
|
|
||||||
)
|
)
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user