Commit 7dd4a878 by huangtao

专账修复

parent c8361808
......@@ -23,7 +23,7 @@ public class BillDTO {
@ApiModelProperty(value = "数量")
private Integer physicNum;
@ApiModelProperty(value = "1-收取 2-支出")
@ApiModelProperty(value = "1-采购入库 2-申领入库 3-申领出库")
private Integer type;
@ApiModelProperty(value = "厂家名称")
......
......@@ -35,6 +35,8 @@ public class PhysicBill extends BaseVersionEntity {
@ApiModelProperty(value = "凭证号")
private String voucherNo;
@ApiModelProperty(value = "1-采购入库 2-申领入库 3-申领出库")
private Integer type;
......
......@@ -199,7 +199,7 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp
if(f){
BillDTO billDTO = new BillDTO();
BeanUtil.copyProperties(physicApply,billDTO);
billDTO.setType(1);
billDTO.setType(2);
billDTO.setPhysicNum(physicApply.getActualNum());
billDTO.setDeptId(physicApply.getLyDeptId());
billDTO.setRefId(physicApply.getId());
......@@ -207,7 +207,7 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp
BillDTO billDTO2 = new BillDTO();
BeanUtil.copyProperties(physicApply,billDTO2);
billDTO2.setType(2);
billDTO2.setType(3);
billDTO2.setPhysicNum(physicApply.getActualNum());
billDTO2.setDeptId(physicApply.getFyDeptId());
billDTO2.setRefId(physicApply.getId());
......
......@@ -42,11 +42,11 @@ public class PhysicBillServiceImpl extends AbstractService implements PhysicBill
Integer batchNoSum = physicBillMapper.selectSumByBatchNo(billDTO.getPhysicName(), billDTO.getPhysicSpec(), billDTO.getFactoryName(), billDTO.getBatchNo(),billDTO.getDeptId());
Integer sum = physicBillMapper.selectSumByName(billDTO.getPhysicName(), billDTO.getPhysicSpec(), billDTO.getFactoryName(),billDTO.getDeptId());
if(billDTO.getType()==1){
if(billDTO.getType()==1 || billDTO.getType()==2){
bill.setAcquireNum(billDTO.getPhysicNum());
bill.setBalance(batchNoSum+billDTO.getPhysicNum());
bill.setBalanceAll(sum+billDTO.getPhysicNum());
}else if(billDTO.getType()==2){
}else if(billDTO.getType()==3){
bill.setExpendNum(billDTO.getPhysicNum());
bill.setBalance(batchNoSum-billDTO.getPhysicNum());
bill.setBalanceAll(sum-billDTO.getPhysicNum());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment