3b7d7bb3 康伟

kangwei: 扩展:统购合同选中水务公司,分销合同使用水厂,根据货号查询水厂以及水厂所属水务公司的物料信息

1 个父辈 da332013
......@@ -85,6 +85,11 @@ public class ErpSettlementController {
public Result<ErpSettlementVO> supplierSettlement(@RequestParam(name="ids",required=true) String ids) {
Result<ErpSettlementVO> result = new Result<>();
ErpSettlementVO erpSettlementVO = null;
if(StringUtils.isEmpty(ids)){
result.error500("请选择记录进行结算");
return result;
}
List<ErpSettlementVO> settlementVOList = erpSettlementService.supplierSettlement(JSUtils.quoteEach(ids,","));
if(settlementVOList==null || settlementVOList.isEmpty()) {
result.error500("根据供应商与合同号未找到实体");
......@@ -106,12 +111,15 @@ public class ErpSettlementController {
result.error500("查询多个供应商:"+supplierName+";合同号:"+contractCode+"记录;请选择某一个供应商,同一合同");
}else{
List<ErpSettlementItemVO> erpSettlementItemList = erpSettlementService.querySupplierSettlementByMaterialIds(JSUtils.quoteEach(ids,","));
erpSettlementVO.setItemList( erpSettlementItemList );
erpSettlementVO.setSparepartSettlementList( converErpSettlementItemList(erpSettlementItemList) );
result.setResult(erpSettlementVO);
result.setSuccess(true);
if(erpSettlementItemList != null && !erpSettlementItemList.isEmpty()){
erpSettlementVO.setItemList( erpSettlementItemList );
erpSettlementVO.setSparepartSettlementList( converErpSettlementItemList(erpSettlementItemList) );
result.setResult(erpSettlementVO);
result.setSuccess(true);
}else{
result.error500("未找到审核通过的记录!");
return result;
}
}
return result;
}
......@@ -122,6 +130,11 @@ public class ErpSettlementController {
public Result<ErpSettlementVO> waterDepartSettlement(@RequestParam(name="ids",required=true) String ids) {
Result<ErpSettlementVO> result = new Result<ErpSettlementVO>();
ErpSettlementVO erpSettlementVO = null;
if(StringUtils.isEmpty(ids)){
result.error500("请选择记录进行结算");
return result;
}
List<ErpSettlementVO> settlementVOList = erpSettlementService.waterDepartSettlement(JSUtils.quoteEach(ids,","));
if(settlementVOList==null || settlementVOList.isEmpty()) {
result.error500("根据部门与合同号未找到实体");
......@@ -144,12 +157,16 @@ public class ErpSettlementController {
result.error500("查询出多个水厂:"+departName+";合同编号:"+contractCode+"记录;请选择某一个水厂,同一合同");
}else{
List<ErpSettlementItemVO> settlementItemList = erpSettlementService.queryWaterDepartSettlementByMaterialIds(JSUtils.quoteEach(ids,","));
erpSettlementVO.setItemList(settlementItemList );
//送货单以及物资验收单
erpSettlementVO.setSparepartSettlementList( converErpSettlementItemList(settlementItemList) );
result.setResult(erpSettlementVO);
result.setSuccess(true);
if(settlementItemList != null && !settlementItemList.isEmpty()){
erpSettlementVO.setItemList(settlementItemList );
//送货单以及物资验收单
erpSettlementVO.setSparepartSettlementList( converErpSettlementItemList(settlementItemList) );
result.setResult(erpSettlementVO);
result.setSuccess(true);
}else{
result.error500("未找到审核通过的记录!");
return result;
}
}
return result;
}
......
......@@ -139,7 +139,7 @@ public class ERPPurchaseContract {
@ApiModelProperty(value = "删除标识,0:有效,1:删除")
private java.lang.Integer delFlag;
@ApiModelProperty(value = "删除标识,0:有效,1:删除")
@ApiModelProperty(value = "入库单编号")
private String equipmentInId;
/**审批意见*/
......
......@@ -108,6 +108,7 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia
//入库
errMsg = syncEquipmentIn(materialINTemp,inWarehouseId);
}
materialINTemp.setApproveMessage(materialINVO.getApproveMessage());//审批意见
this.baseMapper.updateById( materialINTemp ) ;
//审批记录
ApproveRecord record = new ApproveRecord( "YJIN", materialINVO.getApplyUser(), materialINVO.getId(), BaseContextHandler.getUserId(), materialINVO.getApproveMessage(), materialINVO.getApproveState());
......@@ -195,8 +196,9 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia
ERPPurchaseContract erpPurchaseContract = purchaseContractService.getById(materialINTemp.getPurchaseContractId());
if(erpPurchaseContract != null ){
if(StringUtils.isNotEmpty(erpPurchaseContract.getEquipmentInId())){
EquipmentIn equipmentIn = equipmentInService.getById( erpPurchaseContract.getEquipmentInId() );
EquipmentIn equipmentIn = equipmentInService.getById( erpPurchaseContract.getEquipmentInId() );
if(equipmentIn != null){
equipmentOutDTO.setDepartId( equipmentIn.getDepartId() ) ;
equipmentOutDTO.setOutType("9");//
equipmentOutDTO.setRemark( materialINTemp.getRemark() );
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!