Commit c8361808 by huangtao

专账修复

parent ebb692ae
......@@ -29,4 +29,7 @@ public class BillDTO {
@ApiModelProperty(value = "厂家名称")
private String factoryName;
@ApiModelProperty(value = "相关申请、入库id")
private Long refId;
}
......@@ -44,6 +44,9 @@ public class PhysicBill extends BaseVersionEntity {
@ApiModelProperty(value = "发出")
private Integer expendNum;
@ApiModelProperty(value = "相关申请、入库id")
private Long refId;
@ApiModelProperty(value = "状态 0 -待验收 1 -已完成")
private Integer status;
......
......@@ -202,14 +202,16 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp
billDTO.setType(1);
billDTO.setPhysicNum(physicApply.getActualNum());
billDTO.setDeptId(physicApply.getLyDeptId());
billDTO.setRefId(physicApply.getId());
physicBillService.createBill(billDTO);
BillDTO billDTO2 = new BillDTO();
BeanUtil.copyProperties(physicApply,billDTO);
BeanUtil.copyProperties(physicApply,billDTO2);
billDTO2.setType(2);
billDTO2.setPhysicNum(physicApply.getActualNum());
billDTO2.setDeptId(physicApply.getFyDeptId());
physicBillService.createBill(billDTO);
billDTO2.setRefId(physicApply.getId());
physicBillService.createBill(billDTO2);
}
return getInfo(physicApplySignReq.getPhysicApplyId());
}
......
......@@ -14,4 +14,6 @@ public class BillInfoVO {
@ApiModelProperty(value = "厂家名称")
private String factoryName;
}
......@@ -4,14 +4,17 @@
<select id="selectSumByBatchNo" resultType="java.lang.Integer">
select (IFNULL(sum(expend_num),0) - IFNULL(sum(acquire_num),0)) from physic_bill where physic_name=#{name} and physic_spec=#{spec} and batch_no=#{batchNo} and factory_name =#{factoryName}
select (IFNULL(sum(acquire_num),0) - IFNULL(sum(expend_num),0)) from physic_bill where
physic_name=#{name} and physic_spec=#{spec} and batch_no=#{batchNo} and factory_name =#{factoryName} and dept_id =#{deptId}
</select>
<select id="selectSumByName" resultType="java.lang.Integer">
select (IFNULL(sum(expend_num),0) - IFNULL(sum(acquire_num),0)) from physic_bill where physic_name=#{name} and physic_spec=#{spec} and factory_name =#{factoryName} and dept_id =#{deptId}
select (IFNULL(sum(acquire_num),0) - IFNULL(sum(expend_num),0)) from physic_bill where
physic_name=#{name} and physic_spec=#{spec} and factory_name =#{factoryName} and dept_id =#{deptId}
</select>
<select id="selectByGroup" resultType="com.jmai.physic.vo.BillInfoVO">
select physic_name,physic_spec,factory_name from physic_bill where physic_name LIKE CONCAT('%', #{physicName}, '%') group by physic_name,physic_spec,factory_name,dept_id
select physic_name,physic_spec,factory_name from physic_bill
where physic_name LIKE CONCAT('%', #{physicName}, '%') group by physic_name,physic_spec,factory_name,dept_id
</select>
<select id="selectBillPage" resultType="com.jmai.physic.vo.BillQueryVO">
select *,b.dept_name from physic_bill a left join sys_dept b on a.dept_id =b.id where a.physic_name =#{req.physicName} and
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
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