57ef9988 康伟

kangwei:药剂结算对接,

         供应商详细页面
1 个父辈 0614bc3c
1 package com.skua.modules.alarmtmp.entity; 1 package com.skua.modules.alarmtmp.entity;
2
3 import java.io.Serializable;
4 import java.util.Date;
5 import com.baomidou.mybatisplus.annotation.IdType; 2 import com.baomidou.mybatisplus.annotation.IdType;
6 import com.baomidou.mybatisplus.annotation.TableId; 3 import com.baomidou.mybatisplus.annotation.TableId;
7 import com.baomidou.mybatisplus.annotation.TableName; 4 import com.baomidou.mybatisplus.annotation.TableName;
...@@ -11,8 +8,6 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -11,8 +8,6 @@ import io.swagger.annotations.ApiModelProperty;
11 import lombok.Data; 8 import lombok.Data;
12 import lombok.EqualsAndHashCode; 9 import lombok.EqualsAndHashCode;
13 import lombok.experimental.Accessors; 10 import lombok.experimental.Accessors;
14 import com.fasterxml.jackson.annotation.JsonFormat;
15 import org.springframework.format.annotation.DateTimeFormat;
16 import org.jeecgframework.poi.excel.annotation.Excel; 11 import org.jeecgframework.poi.excel.annotation.Excel;
17 12
18 /** 13 /**
...@@ -24,7 +19,7 @@ import org.jeecgframework.poi.excel.annotation.Excel; ...@@ -24,7 +19,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
24 @Accessors(chain = true) 19 @Accessors(chain = true)
25 @ApiModel(value="alarm_custom_rule_type对象", description="报警类别") 20 @ApiModel(value="alarm_custom_rule_type对象", description="报警类别")
26 public class AlarmCustomRuleType { 21 public class AlarmCustomRuleType {
27 22
28 /**主键*/ 23 /**主键*/
29 @TableId(type = IdType.ID_WORKER_STR) 24 @TableId(type = IdType.ID_WORKER_STR)
30 @ApiModelProperty(value = "主键") 25 @ApiModelProperty(value = "主键")
...@@ -45,7 +40,7 @@ public class AlarmCustomRuleType { ...@@ -45,7 +40,7 @@ public class AlarmCustomRuleType {
45 @ApiModelProperty(value = "报警类型") 40 @ApiModelProperty(value = "报警类型")
46 @TableField(exist = false) 41 @TableField(exist = false)
47 private java.lang.String alarmType; 42 private java.lang.String alarmType;
48 43
49 @ApiModelProperty(value = "服务类名称") 44 @ApiModelProperty(value = "服务类名称")
50 @TableField(exist = false) 45 @TableField(exist = false)
51 private java.lang.String beanServiceName; 46 private java.lang.String beanServiceName;
......
...@@ -7,22 +7,23 @@ ...@@ -7,22 +7,23 @@
7 </delete> 7 </delete>
8 <!-- 结算单详情:供应商--> 8 <!-- 结算单详情:供应商-->
9 <select id="queryListBySupplier" resultType="com.skua.modules.erp.vo.ErpSettlementItemVO"> 9 <select id="queryListBySupplier" resultType="com.skua.modules.erp.vo.ErpSettlementItemVO">
10 select d.depart_name, pc.project_name, pc.contract_name, mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg,mf.sender_sign,mf.receiver_sign, pm.good_brand , pm.good_origin, si.* 10 select d.depart_name, sm.supp_name supplierName,pc.project_name, pc.contract_name,pc.contract_code, mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg,mf.sender_sign,mf.receiver_sign, pm.good_brand , pm.good_origin, si.*
11 from erp_settlement_item si 11 from erp_settlement_item si
12 left join sys_depart d on d.id = si.depart_id 12 left join sys_depart d on d.id = si.depart_id
13 left join erp_purchase_material pm on (pm.contract_id =si.purchase_contract_id and pm.good_code = si.good_code ) 13 left join erp_purchase_material pm on (pm.contract_id =si.purchase_contract_id and pm.good_code = si.good_code )
14 left join erp_material_acceptance_form mf on mf.id = si.id 14 left join erp_material_acceptance_form mf on mf.id = si.material_in_id
15 left join erp_purchase_contract pc on si.purchase_contract_id = pc.id 15 left join erp_purchase_contract pc on si.purchase_contract_id = pc.id
16 left join ajh_supplier_manage sm on sm.id = pm.supplier_id
16 where si.settlement_id = #{settlementId} 17 where si.settlement_id = #{settlementId}
17 </select> 18 </select>
18 <!-- 结算单详情:水厂--> 19 <!-- 结算单详情:水厂-->
19 <select id="queryListByWaterDepart" resultType="com.skua.modules.erp.vo.ErpSettlementItemVO"> 20 <select id="queryListByWaterDepart" resultType="com.skua.modules.erp.vo.ErpSettlementItemVO">
20 select d.depart_name, dc.contract_name ,dc.project_name, mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg,mf.sender_sign,mf.receiver_sign, pm.good_brand , pm.good_origin, si.* 21 select d.depart_name, dc.contract_name ,dc.project_name,dc.contract_code, mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg,mf.sender_sign,mf.receiver_sign, pm.good_brand , pm.good_origin, si.*
21 from erp_settlement_item si 22 from erp_settlement_item si
22 left join sys_depart d on d.id = si.depart_id 23 left join sys_depart d on d.id = si.depart_id
23 left join erp_purchase_material pm on (pm.contract_id =si.purchase_contract_id and pm.good_code = si.good_code ) 24 left join erp_purchase_material pm on (pm.contract_id =si.purchase_contract_id and pm.good_code = si.good_code )
24 left join erp_material_acceptance_form mf on mf.id = si.id 25 left join erp_material_acceptance_form mf on mf.id = si.material_in_id
25 left join erp_distribut_contract dc on si.distribut_contract_id = dc.id 26 left join erp_distribut_contract dc on si.distribut_contract_id = dc.id
26 where si.settlement_id = #{settlementId} 27 where si.settlement_id = #{settlementId}
27 </select> 28 </select>
28 </mapper> 29 </mapper>
......
...@@ -41,6 +41,10 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E ...@@ -41,6 +41,10 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E
41 private ErpSettlementItemMapper settlementItemMapper; 41 private ErpSettlementItemMapper settlementItemMapper;
42 @Autowired 42 @Autowired
43 private ICommonSqlService commonSqlService; 43 private ICommonSqlService commonSqlService;
44 @Autowired
45 private SupplierManageMapper supplierManageMapper;
46 @Autowired
47 private SysDepartMapper departMapper ;
44 /** 48 /**
45 * 新增结算单 49 * 新增结算单
46 * @param erpSettlementVO 50 * @param erpSettlementVO
...@@ -77,16 +81,23 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E ...@@ -77,16 +81,23 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E
77 81
78 //根据编号查询结算单 82 //根据编号查询结算单
79 public ErpSettlementVO queryById(String id){ 83 public ErpSettlementVO queryById(String id){
84 ErpSettlementVO erpSettlementVO = new ErpSettlementVO();
80 ErpSettlement erpSettlement = this.baseMapper.selectById(id); 85 ErpSettlement erpSettlement = this.baseMapper.selectById(id);
81 86
82 List<ErpSettlementItemVO> settlementItemList = null; 87 List<ErpSettlementItemVO> settlementItemList = null;
83 if("0".equals( erpSettlement.getSettlementType())){ //供应商 88 if("0".equals( erpSettlement.getSettlementType())){ //供应商
89 if(StringUtils.isNotEmpty( erpSettlement.getSupplierId())){
90 erpSettlementVO.setSupplierName(supplierManageMapper.selectById( erpSettlement.getSupplierId()).getSuppName() );
91 }
84 settlementItemList = settlementItemMapper.queryListBySupplier(id); 92 settlementItemList = settlementItemMapper.queryListBySupplier(id);
85 } 93 }
86 if("1".equals( erpSettlement.getSettlementType())){ //水厂 94 if("1".equals( erpSettlement.getSettlementType())){ //水厂
95 if(StringUtils.isNotEmpty( erpSettlement.getDepartId())){
96 erpSettlementVO.setDepartName( departMapper.selectById(erpSettlement.getDepartId()).getDepartName());
97 }
87 settlementItemList = settlementItemMapper.queryListByWaterDepart(id); 98 settlementItemList = settlementItemMapper.queryListByWaterDepart(id);
88 } 99 }
89 ErpSettlementVO erpSettlementVO = new ErpSettlementVO(); 100
90 101
91 if(erpSettlement != null ){ 102 if(erpSettlement != null ){
92 //BeanUtils.copyProperties(有值的对象, 要被赋值的对象); 103 //BeanUtils.copyProperties(有值的对象, 要被赋值的对象);
...@@ -96,6 +107,7 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E ...@@ -96,6 +107,7 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E
96 String jtDepartName = commonSqlService.queryForString("select depart_name from sys_depart order by parent_id asc limit 1"); 107 String jtDepartName = commonSqlService.queryForString("select depart_name from sys_depart order by parent_id asc limit 1");
97 Map<String, SparepartSettlementVO> sparepartSettlementMap = new HashedMap(); 108 Map<String, SparepartSettlementVO> sparepartSettlementMap = new HashedMap();
98 SparepartSettlementVO sparepartSettlementVO = null; 109 SparepartSettlementVO sparepartSettlementVO = null;
110 List<SparepartSettlementVO> sparepartSettlementVOList = new ArrayList<>();
99 if(settlementItemList != null ){ 111 if(settlementItemList != null ){
100 for( ErpSettlementItemVO settlementItemVO : settlementItemList){ 112 for( ErpSettlementItemVO settlementItemVO : settlementItemList){
101 sparepartSettlementVO = sparepartSettlementMap.get(settlementItemVO.getSparepartId()); 113 sparepartSettlementVO = sparepartSettlementMap.get(settlementItemVO.getSparepartId());
...@@ -103,10 +115,13 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E ...@@ -103,10 +115,13 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E
103 //String projectName,String departName, String contractCode, String sparepartName, String specification, String goodOrigin, String goodBrand 115 //String projectName,String departName, String contractCode, String sparepartName, String specification, String goodOrigin, String goodBrand
104 sparepartSettlementVO = new SparepartSettlementVO(settlementItemVO.getProjectName(),settlementItemVO.getDepartName(),settlementItemVO.getContractCode(), 116 sparepartSettlementVO = new SparepartSettlementVO(settlementItemVO.getProjectName(),settlementItemVO.getDepartName(),settlementItemVO.getContractCode(),
105 settlementItemVO.getSparepartName(),settlementItemVO.getSpecification(),settlementItemVO.getGoodCode() ,settlementItemVO.getGoodBrand() ); 117 settlementItemVO.getSparepartName(),settlementItemVO.getSpecification(),settlementItemVO.getGoodCode() ,settlementItemVO.getGoodBrand() );
106 sparepartSettlementVO.setJtDepartName(jtDepartName); 118 sparepartSettlementVO.setSupplierName( settlementItemVO.getSupplierName() ) ;
119 sparepartSettlementVO.setContractName(settlementItemVO.getContractName() );
107 sparepartSettlementMap.put( settlementItemVO.getSparepartId() ,sparepartSettlementVO ); 120 sparepartSettlementMap.put( settlementItemVO.getSparepartId() ,sparepartSettlementVO );
108 } 121 }
122 sparepartSettlementVO.setJtDepartName(jtDepartName);
109 sparepartSettlementVO.addErpSettlementItem( settlementItemVO ); 123 sparepartSettlementVO.addErpSettlementItem( settlementItemVO );
124 sparepartSettlementVOList.add(sparepartSettlementVO );
110 } 125 }
111 } 126 }
112 //送货单以及物资验收单 127 //送货单以及物资验收单
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!