|
@@ -55,6 +55,7 @@ import java.net.URLDecoder;
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.text.DecimalFormat;
|
|
import java.text.DecimalFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
|
+import java.time.LocalDateTime;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -834,10 +835,10 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
compId = AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getCompId();
|
|
compId = AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getCompId();
|
|
}
|
|
}
|
|
List<ContractManagementInfo> temp = new ArrayList();
|
|
List<ContractManagementInfo> temp = new ArrayList();
|
|
- List<ContractManagementInfo> listRedis = cacheComponent.getObjList(Const.ADMIN_CONTRACTINFO+compId+flag,ContractManagementInfo.class);
|
|
|
|
- if(listRedis != null && listRedis.size() > 0 ){
|
|
|
|
- return listRedis;
|
|
|
|
- }
|
|
|
|
|
|
+// List<ContractManagementInfo> listRedis = cacheComponent.getObjList(Const.ADMIN_CONTRACTINFO+compId+flag,ContractManagementInfo.class);
|
|
|
|
+// if(listRedis != null && listRedis.size() > 0 ){
|
|
|
|
+// return listRedis;
|
|
|
|
+// }
|
|
//查所有合同编号
|
|
//查所有合同编号
|
|
if (flag == null) {
|
|
if (flag == null) {
|
|
List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
@@ -1142,187 +1143,6 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
}
|
|
}
|
|
//查采购合同编号(不包含自运),以及移库任务编号,销售合同
|
|
//查采购合同编号(不包含自运),以及移库任务编号,销售合同
|
|
else if (flag == 7) {
|
|
else if (flag == 7) {
|
|
-// Map<String, Object> pageView = new HashMap<>();
|
|
|
|
-// pageView.put("compId", compId);
|
|
|
|
-// pageView.put("contractType", '2');
|
|
|
|
-// pageView.put("statusFlag", '1');
|
|
|
|
-// pageView.put("deliverType", '2');
|
|
|
|
-// pageView.put("fleetFlag", '0');
|
|
|
|
-// pageView.put("tranType", '4');
|
|
|
|
-// pageView.put("threeTranType", "汽运");
|
|
|
|
-// pageView.put("submit", '2');
|
|
|
|
-// pageView.put("flag", '1');
|
|
|
|
-// //查合同下的车牌号,入库只能查到未提交的
|
|
|
|
-// List<TranCarInfo> tranCarInfoLists = baseMapper.getTranCarInfo(pageView);
|
|
|
|
-// /*****************************/
|
|
|
|
-// Map<String, Object> pageView1 = new HashMap<>();
|
|
|
|
-// pageView1.put("compId", compId);
|
|
|
|
-// pageView1.put("contractType", '2');
|
|
|
|
-// pageView1.put("statusFlag", '1');
|
|
|
|
-// pageView1.put("deliverType", '2');
|
|
|
|
-// pageView1.put("fleetFlag", '1');
|
|
|
|
-// pageView1.put("tranType", '4');
|
|
|
|
-// pageView1.put("threeTranType", "汽运");
|
|
|
|
-// pageView1.put("flag", '1');
|
|
|
|
-// //查合同下的车牌号,入库只能查到未提交的
|
|
|
|
-// List<TranCarInfo> tranCarInfoLists1 = baseMapper.getTranCarInfo(pageView1);
|
|
|
|
-// /*****************************/
|
|
|
|
-// Map<String, Object> pageView2 = new HashMap<>();
|
|
|
|
-// pageView2.put("compId", compId);
|
|
|
|
-// pageView2.put("contractType", '2');
|
|
|
|
-// pageView2.put("statusFlag", '1');
|
|
|
|
-// pageView2.put("deliverType", '2');
|
|
|
|
-// pageView2.put("tranType", '3');
|
|
|
|
-// pageView2.put("threeTranType", "散船");
|
|
|
|
-// pageView2.put("flag", '2');
|
|
|
|
-// //查合同下的车牌号,入库只能查到未提交的
|
|
|
|
-// List<TranCarInfo> tranCarInfoLists2 = baseMapper.getTranCarInfo(pageView2);
|
|
|
|
-// tranCarInfoLists.addAll(tranCarInfoLists1);
|
|
|
|
-// tranCarInfoLists.addAll(tranCarInfoLists2);
|
|
|
|
-// Set< TranCarInfo > set = new HashSet<>(tranCarInfoLists);
|
|
|
|
-// tranCarInfoLists = set.stream()
|
|
|
|
-// .sorted(Comparator.comparingInt(a -> Integer.parseInt(a.getContractId().substring(1, 25)))).collect(Collectors.toList());
|
|
|
|
-//// List<ContractManagementInfo> contractManagementInfos = new ArrayList<>();
|
|
|
|
-// ContractManagementInfo contractManagementInfo = new ContractManagementInfo();
|
|
|
|
-// List<TranCarInfo> tranCarInfos = new ArrayList<>();
|
|
|
|
-// List<TranCarInfo> tranCarInfos1 = new ArrayList<>();
|
|
|
|
-// List<TranCarInfo> tranCarInfos2 = new ArrayList<>();
|
|
|
|
-// for (int i = 0; i < tranCarInfoLists.size(); i++) {
|
|
|
|
-// TranCarInfo tranCarInfo = tranCarInfoLists.get(i);
|
|
|
|
-//
|
|
|
|
-// if (contractManagementInfo.getUnitContractPrice() != null) {
|
|
|
|
-// //期货取点价,现货取单价
|
|
|
|
-// contractManagementInfo.setContractPrice(contractManagementInfo.getPointPrice() != null ? contractManagementInfo.getPointPrice() : Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())));
|
|
|
|
-// }
|
|
|
|
-// if("0".equals(tranCarInfo.getFleetFlag())&&"4".equals(tranCarInfo.getTranType())&&"汽运".equals(tranCarInfo.getThreeTranType())&&"2".equals(tranCarInfo.getSubmit())) {
|
|
|
|
-// if (i == 0) {
|
|
|
|
-// contractManagementInfo = new ContractManagementInfo();
|
|
|
|
-// contractManagementInfo = contractManagementInfoService.selectById(tranCarInfo.getContractId());
|
|
|
|
-// ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
|
-// .eq("contract_id", tranCarInfo.getContractId()));
|
|
|
|
-// contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
|
-// contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
|
-// contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
|
-// contractManagementInfo.setInOutType("采购入库");
|
|
|
|
-// tranCarInfos = new ArrayList<>();
|
|
|
|
-// tranCarInfos1 = new ArrayList<>();
|
|
|
|
-// tranCarInfos2 = new ArrayList<>();
|
|
|
|
-// contractManagementInfo.setId(tranCarInfo.getId());
|
|
|
|
-// contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
|
-// contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
|
-// contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
|
-// contractManagementInfo.setInOutType("采购入库");
|
|
|
|
-// tranCarInfos.add(tranCarInfo);
|
|
|
|
-// } else if (!tranCarInfo.getContractId().equals(tranCarInfoLists.get(i - 1).getContractId())) {
|
|
|
|
-// contractManagementInfo.setTranCarInfoList(tranCarInfos);
|
|
|
|
-// contractManagementInfo.setTranCarInfoList1(tranCarInfos1);
|
|
|
|
-// contractManagementInfo.setShipInfoList(tranCarInfos2);
|
|
|
|
-// temp.add(contractManagementInfo);
|
|
|
|
-// contractManagementInfo = new ContractManagementInfo();
|
|
|
|
-// contractManagementInfo = contractManagementInfoService.selectById(tranCarInfo.getContractId());
|
|
|
|
-// ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
|
-// .eq("contract_id", tranCarInfo.getContractId()));
|
|
|
|
-// contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
|
-// contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
|
-// contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
|
-// contractManagementInfo.setInOutType("采购入库");
|
|
|
|
-// tranCarInfos = new ArrayList<>();
|
|
|
|
-// tranCarInfos1 = new ArrayList<>();
|
|
|
|
-// tranCarInfos2 = new ArrayList<>();
|
|
|
|
-// contractManagementInfo.setId(tranCarInfo.getId());
|
|
|
|
-// tranCarInfos.add(tranCarInfo);
|
|
|
|
-// } else if (i == tranCarInfoLists.size() - 1) {
|
|
|
|
-// tranCarInfos.add(tranCarInfo);
|
|
|
|
-// contractManagementInfo.setTranCarInfoList(tranCarInfos);
|
|
|
|
-// temp.add(contractManagementInfo);
|
|
|
|
-// } else {
|
|
|
|
-// tranCarInfos.add(tranCarInfo);
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// if("1".equals(tranCarInfo.getFleetFlag())&&"4".equals(tranCarInfo.getTranType())&&"汽运".equals(tranCarInfo.getThreeTranType())) {
|
|
|
|
-// if (i == 0) {
|
|
|
|
-// contractManagementInfo = new ContractManagementInfo();
|
|
|
|
-// contractManagementInfo = contractManagementInfoService.selectById(tranCarInfo.getContractId());
|
|
|
|
-// ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
|
-// .eq("contract_id", tranCarInfo.getContractId()));
|
|
|
|
-// contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
|
-// contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
|
-// contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
|
-// contractManagementInfo.setInOutType("采购入库");
|
|
|
|
-// tranCarInfos = new ArrayList<>();
|
|
|
|
-// tranCarInfos1 = new ArrayList<>();
|
|
|
|
-// tranCarInfos2 = new ArrayList<>();
|
|
|
|
-// contractManagementInfo.setId(tranCarInfo.getId());
|
|
|
|
-// tranCarInfos1.add(tranCarInfo);
|
|
|
|
-// } else if (!tranCarInfo.getContractId().equals(tranCarInfoLists.get(i - 1).getContractId())) {
|
|
|
|
-// contractManagementInfo.setTranCarInfoList(tranCarInfos);
|
|
|
|
-// contractManagementInfo.setTranCarInfoList1(tranCarInfos1);
|
|
|
|
-// contractManagementInfo.setShipInfoList(tranCarInfos2);
|
|
|
|
-// temp.add(contractManagementInfo);
|
|
|
|
-// contractManagementInfo = new ContractManagementInfo();
|
|
|
|
-// contractManagementInfo = contractManagementInfoService.selectById(tranCarInfo.getContractId());
|
|
|
|
-// ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
|
-// .eq("contract_id", tranCarInfo.getContractId()));
|
|
|
|
-// contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
|
-// contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
|
-// contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
|
-// contractManagementInfo.setInOutType("采购入库");
|
|
|
|
-// tranCarInfos = new ArrayList<>();
|
|
|
|
-// tranCarInfos1 = new ArrayList<>();
|
|
|
|
-// tranCarInfos2 = new ArrayList<>();
|
|
|
|
-// contractManagementInfo.setId(tranCarInfo.getId());
|
|
|
|
-// tranCarInfos.add(tranCarInfo);
|
|
|
|
-// } else if (i == tranCarInfoLists.size() - 1) {
|
|
|
|
-// tranCarInfos1.add(tranCarInfo);
|
|
|
|
-// contractManagementInfo.setTranCarInfoList(tranCarInfos);
|
|
|
|
-// temp.add(contractManagementInfo);
|
|
|
|
-// } else {
|
|
|
|
-// tranCarInfos1.add(tranCarInfo);
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// if("3".equals(tranCarInfo.getTranType())||"散船".equals(tranCarInfo.getThreeTranType())) {
|
|
|
|
-// if (i == 0) {
|
|
|
|
-// contractManagementInfo = new ContractManagementInfo();
|
|
|
|
-// contractManagementInfo = contractManagementInfoService.selectById(tranCarInfo.getContractId());
|
|
|
|
-// ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
|
-// .eq("contract_id", tranCarInfo.getContractId()));
|
|
|
|
-// contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
|
-// contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
|
-// contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
|
-// contractManagementInfo.setInOutType("采购入库");
|
|
|
|
-// tranCarInfos = new ArrayList<>();
|
|
|
|
-// tranCarInfos1 = new ArrayList<>();
|
|
|
|
-// tranCarInfos2 = new ArrayList<>();
|
|
|
|
-// contractManagementInfo.setId(tranCarInfo.getId());
|
|
|
|
-// tranCarInfos2.add(tranCarInfo);
|
|
|
|
-// } else if (!tranCarInfo.getContractId().equals(tranCarInfoLists.get(i - 1).getContractId())) {
|
|
|
|
-// contractManagementInfo.setTranCarInfoList(tranCarInfos);
|
|
|
|
-// contractManagementInfo.setTranCarInfoList1(tranCarInfos1);
|
|
|
|
-// contractManagementInfo.setShipInfoList(tranCarInfos2);
|
|
|
|
-// temp.add(contractManagementInfo);
|
|
|
|
-// contractManagementInfo = new ContractManagementInfo();
|
|
|
|
-// contractManagementInfo = contractManagementInfoService.selectById(tranCarInfo.getContractId());
|
|
|
|
-// ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
|
-// .eq("contract_id", tranCarInfo.getContractId()));
|
|
|
|
-// contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
|
-// contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
|
-// contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
|
-// contractManagementInfo.setInOutType("采购入库");
|
|
|
|
-// tranCarInfos = new ArrayList<>();
|
|
|
|
-// tranCarInfos1 = new ArrayList<>();
|
|
|
|
-// tranCarInfos2 = new ArrayList<>();
|
|
|
|
-// contractManagementInfo.setId(tranCarInfo.getId());
|
|
|
|
-// tranCarInfos2.add(tranCarInfo);
|
|
|
|
-// } else if (i == tranCarInfoLists.size() - 1) {
|
|
|
|
-// tranCarInfos2.add(tranCarInfo);
|
|
|
|
-// contractManagementInfo.setTranCarInfoList(tranCarInfos);
|
|
|
|
-// temp.add(contractManagementInfo);
|
|
|
|
-// } else {
|
|
|
|
-// tranCarInfos2.add(tranCarInfo);
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
|
|
|
|
/*****************************************************---------------------------******************************/
|
|
/*****************************************************---------------------------******************************/
|
|
List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
@@ -1462,7 +1282,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
contractManagementInfo1.setInOutType("移库入库");
|
|
contractManagementInfo1.setInOutType("移库入库");
|
|
temp.add(contractManagementInfo1);
|
|
temp.add(contractManagementInfo1);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ temp = temp.stream().sorted(Comparator.comparing(ContractManagementInfo::getCreateDate)).collect(Collectors.toList());
|
|
|
|
+ temp = temp.subList(temp.size()-100,temp.size());
|
|
cacheComponent.putRaw(Const.ADMIN_CONTRACTINFO+compId+flag,JSONObject.toJSONString(temp),60*60*24);
|
|
cacheComponent.putRaw(Const.ADMIN_CONTRACTINFO+compId+flag,JSONObject.toJSONString(temp),60*60*24);
|
|
return temp;
|
|
return temp;
|
|
}
|
|
}
|