|
@@ -618,6 +618,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
if (flag == null) {
|
|
|
List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
.eq("comp_id", compId)
|
|
|
+ .eq("status_flag", "1")
|
|
|
.eq("delete_flag", "0")
|
|
|
.orderBy("update_date", false));
|
|
|
|
|
@@ -631,6 +632,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
.eq("comp_id", compId)
|
|
|
.eq("contract_type", "2")
|
|
|
+ .eq("status_flag", "1")
|
|
|
.eq("delete_flag", "0")
|
|
|
.orderBy("update_date", false));
|
|
|
for (ContractManagementInfo contractManagementInfo : contractManagementInfoList) {
|
|
@@ -643,6 +645,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
.eq("comp_id", compId)
|
|
|
.eq("contract_type", "1")
|
|
|
+ .eq("status_flag", "1")
|
|
|
.eq("delete_flag", "0")
|
|
|
.orderBy("update_date", false));
|
|
|
|
|
@@ -656,6 +659,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
.eq("comp_id", compId)
|
|
|
.eq("contract_type", "2")
|
|
|
+ .eq("status_flag", "1")
|
|
|
.eq("delete_flag", "0")
|
|
|
.orderBy("update_date", false));
|
|
|
if (!CollectionUtils.isEmpty(contractManagementInfoList)) {
|
|
@@ -681,6 +685,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
.eq("comp_id", compId)
|
|
|
.eq("contract_type", "1")
|
|
|
+ .eq("status_flag", "1")
|
|
|
.eq("delete_flag", "0")
|
|
|
.orderBy("update_date", false));
|
|
|
if (!CollectionUtils.isEmpty(contractManagementInfoList)) {
|
|
@@ -706,6 +711,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
.eq("comp_id", compId)
|
|
|
.eq("delete_flag", "0")
|
|
|
+ .eq("status_flag", "1")
|
|
|
.eq("contract_type", "1")
|
|
|
.orderBy("update_date", false));
|
|
|
for (ContractManagementInfo contractManagementInfo : contractManagementInfoList) {
|
|
@@ -731,10 +737,84 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
}
|
|
|
return temp;
|
|
|
}
|
|
|
+ //查采购合同编号(不包含自运),以及移库任务编号
|
|
|
+ else if(flag == 6){
|
|
|
+ List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
+ .eq("comp_id", compId)
|
|
|
+ .eq("delete_flag", "0")
|
|
|
+ .eq("contract_type", "2")
|
|
|
+ .eq("status_flag", "1")
|
|
|
+ .eq("deliver_type", "2")
|
|
|
+ .orderBy("update_date", false));
|
|
|
+ for (ContractManagementInfo contractManagementInfo : contractManagementInfoList) {
|
|
|
+ ContractGoodsInfo contractGoodsInfo=contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
+ .eq("contract_id",contractManagementInfo.getId()));
|
|
|
+ contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
+ //期货取点价,现货取单价
|
|
|
+ contractManagementInfo.setContractPrice(contractManagementInfo.getPointPrice()!=null?contractManagementInfo.getPointPrice():Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())));
|
|
|
+ temp.add(contractManagementInfo);
|
|
|
+ }
|
|
|
+ List<InOutWarehouseTask> inOutWarehouseTaskList = iInOutWarehouseTaskService.selectList(new EntityWrapper<InOutWarehouseTask>()
|
|
|
+ .eq("comp_id", compId)
|
|
|
+ .eq("delete_flag", "0")
|
|
|
+ .eq("task_type_key", "3")
|
|
|
+ .eq("in_out_flag", "1")
|
|
|
+ .orderBy("update_date", false));
|
|
|
+ for (InOutWarehouseTask inOutWarehouseTask : inOutWarehouseTaskList) {
|
|
|
+ ContractManagementInfo contractManagementInfo = new ContractManagementInfo();
|
|
|
+ BeanUtils.copyProperties(inOutWarehouseTask, contractManagementInfo);
|
|
|
+ contractManagementInfo.setContractNo(inOutWarehouseTask.getMoveTaskNo());
|
|
|
+ contractManagementInfo.setContractPrice(inOutWarehouseTask.getUnitPrice());
|
|
|
+ temp.add(contractManagementInfo);
|
|
|
+ }
|
|
|
+ return temp;
|
|
|
+ }
|
|
|
+ //查采购合同编号(不包含自运),以及移库任务编号,销售合同
|
|
|
+ else if(flag == 7){
|
|
|
+ List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
+ .eq("comp_id", compId)
|
|
|
+ .eq("delete_flag", "0")
|
|
|
+ .eq("contract_type", "2")
|
|
|
+ .eq("status_flag", "1")
|
|
|
+ .eq("deliver_type", "2")
|
|
|
+ .orderBy("update_date", false));
|
|
|
+ for (ContractManagementInfo contractManagementInfo : contractManagementInfoList) {
|
|
|
+ ContractGoodsInfo contractGoodsInfo=contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
+ .eq("contract_id",contractManagementInfo.getId()));
|
|
|
+ contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
+ //期货取点价,现货取单价
|
|
|
+ contractManagementInfo.setContractPrice(contractManagementInfo.getPointPrice()!=null?contractManagementInfo.getPointPrice():Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())));
|
|
|
+ temp.add(contractManagementInfo);
|
|
|
+ }
|
|
|
+ List<ContractManagementInfo> contractManagementInfoList1 = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
+ .eq("comp_id", compId)
|
|
|
+ .eq("status_flag", "1")
|
|
|
+ .eq("contract_type", "1")
|
|
|
+ .eq("delete_flag", "0")
|
|
|
+ .orderBy("update_date", false));
|
|
|
+ for (ContractManagementInfo contractManagementInfo1 : contractManagementInfoList1) {
|
|
|
+ temp.add(contractManagementInfo1);
|
|
|
+ }
|
|
|
+ List<InOutWarehouseTask> inOutWarehouseTaskList = iInOutWarehouseTaskService.selectList(new EntityWrapper<InOutWarehouseTask>()
|
|
|
+ .eq("comp_id", compId)
|
|
|
+ .eq("delete_flag", "0")
|
|
|
+ .eq("task_type_key", "3")
|
|
|
+ .eq("in_out_flag", "1")
|
|
|
+ .orderBy("update_date", false));
|
|
|
+ for (InOutWarehouseTask inOutWarehouseTask : inOutWarehouseTaskList) {
|
|
|
+ ContractManagementInfo contractManagementInfo = new ContractManagementInfo();
|
|
|
+ BeanUtils.copyProperties(inOutWarehouseTask, contractManagementInfo);
|
|
|
+ contractManagementInfo.setContractNo(inOutWarehouseTask.getMoveTaskNo());
|
|
|
+ contractManagementInfo.setContractPrice(inOutWarehouseTask.getUnitPrice());
|
|
|
+ temp.add(contractManagementInfo);
|
|
|
+ }
|
|
|
+ return temp;
|
|
|
+ }
|
|
|
//查采购、销售合同编号,以及移库任务编号
|
|
|
else{
|
|
|
List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
.eq("comp_id", compId)
|
|
|
+ .eq("status_flag", "1")
|
|
|
.eq("delete_flag", "0")
|
|
|
.orderBy("update_date", false));
|
|
|
for (ContractManagementInfo contractManagementInfo : contractManagementInfoList) {
|