ea8f9ea7 康伟

kangwei:药剂结算联调

1 个父辈 ff66599c
1 package com.skua.modules.erp.controller; 1 package com.skua.modules.erp.controller;
2 2
3 import java.util.Arrays; 3 import java.util.*;
4 import java.util.Date;
5 import java.util.List;
6 import java.util.Map;
7 import java.io.IOException;
8 import java.io.UnsupportedEncodingException; 4 import java.io.UnsupportedEncodingException;
9 import java.net.URLDecoder; 5 import java.net.URLDecoder;
10 import javax.servlet.http.HttpServletRequest; 6 import javax.servlet.http.HttpServletRequest;
...@@ -15,6 +11,7 @@ import com.skua.core.context.BaseContextHandler; ...@@ -15,6 +11,7 @@ import com.skua.core.context.BaseContextHandler;
15 import com.skua.core.query.QueryGenerator; 11 import com.skua.core.query.QueryGenerator;
16 import com.skua.core.util.ConvertUtils; 12 import com.skua.core.util.ConvertUtils;
17 import com.skua.core.util.DateUtils; 13 import com.skua.core.util.DateUtils;
14 import com.skua.modules.common.service.ICommonSqlService;
18 import com.skua.modules.erp.entity.ErpSettlement; 15 import com.skua.modules.erp.entity.ErpSettlement;
19 import com.skua.modules.erp.entity.ErpSettlementItem; 16 import com.skua.modules.erp.entity.ErpSettlementItem;
20 import com.skua.modules.erp.service.IErpSettlementService; 17 import com.skua.modules.erp.service.IErpSettlementService;
...@@ -22,23 +19,21 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -22,23 +19,21 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
22 import com.baomidou.mybatisplus.core.metadata.IPage; 19 import com.baomidou.mybatisplus.core.metadata.IPage;
23 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 20 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
24 import com.skua.modules.erp.vo.ErpSettlementFormVO; 21 import com.skua.modules.erp.vo.ErpSettlementFormVO;
22 import com.skua.modules.erp.vo.ErpSettlementItemVO;
25 import com.skua.modules.erp.vo.ErpSettlementVO; 23 import com.skua.modules.erp.vo.ErpSettlementVO;
24 import com.skua.modules.erp.vo.SparepartSettlementVO;
26 import com.skua.modules.productionduty.utils.HolidaysUtils; 25 import com.skua.modules.productionduty.utils.HolidaysUtils;
27 import com.skua.modules.quartz.util.BaseUtil; 26 import com.skua.tool.util.JSUtils;
28 import io.netty.util.internal.StringUtil;
29 import lombok.extern.slf4j.Slf4j; 27 import lombok.extern.slf4j.Slf4j;
30 28
29 import org.apache.commons.collections.map.HashedMap;
31 import org.apache.commons.lang3.StringUtils; 30 import org.apache.commons.lang3.StringUtils;
32 import org.jeecgframework.poi.excel.ExcelImportUtil;
33 import org.jeecgframework.poi.excel.def.NormalExcelConstants; 31 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
34 import org.jeecgframework.poi.excel.entity.ExportParams; 32 import org.jeecgframework.poi.excel.entity.ExportParams;
35 import org.jeecgframework.poi.excel.entity.ImportParams;
36 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; 33 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
37 34
38 import org.springframework.beans.factory.annotation.Autowired; 35 import org.springframework.beans.factory.annotation.Autowired;
39 import org.springframework.web.bind.annotation.*; 36 import org.springframework.web.bind.annotation.*;
40 import org.springframework.web.multipart.MultipartFile;
41 import org.springframework.web.multipart.MultipartHttpServletRequest;
42 import org.springframework.web.servlet.ModelAndView; 37 import org.springframework.web.servlet.ModelAndView;
43 import com.alibaba.fastjson.JSON; 38 import com.alibaba.fastjson.JSON;
44 import io.swagger.annotations.Api; 39 import io.swagger.annotations.Api;
...@@ -51,9 +46,11 @@ import io.swagger.annotations.ApiOperation; ...@@ -51,9 +46,11 @@ import io.swagger.annotations.ApiOperation;
51 public class ErpSettlementController { 46 public class ErpSettlementController {
52 @Autowired 47 @Autowired
53 private IErpSettlementService erpSettlementService; 48 private IErpSettlementService erpSettlementService;
49 @Autowired
50 private ICommonSqlService commonSqlService;
54 51
55 @AutoLog(value = "药剂结算单详情-分页列表查询") 52 @AutoLog(value = "药剂结算单详情-分页列表查询")
56 @ApiOperation(value="药剂结算单详情-分页列表查询", notes="药剂结算单详情-分页列表查询") 53 @ApiOperation(value="药剂结算单详情-分页列表查询(settlementType = 0 供应商结算集合,settlementType= 1 水厂结算)", notes="药剂结算单详情-分页列表查询")
57 @GetMapping(value = "/list") 54 @GetMapping(value = "/list")
58 public Result<IPage<ErpSettlement>> queryPageList(ErpSettlement erpSettlement, 55 public Result<IPage<ErpSettlement>> queryPageList(ErpSettlement erpSettlement,
59 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, 56 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
...@@ -68,70 +65,110 @@ public class ErpSettlementController { ...@@ -68,70 +65,110 @@ public class ErpSettlementController {
68 return result; 65 return result;
69 } 66 }
70 67
71 @AutoLog(value = "药剂结算单详情-供应商结算") 68 @AutoLog(value = "药剂结算单详情-根据ids生成供应商结算")
72 @ApiOperation(value="药剂结算单详情-供应商结算", notes="药剂结算单详情-供应商结算") 69 @ApiOperation(value="药剂结算单详情-根据ids生成供应商结算", notes="药剂结算单详情-供应商结算")
73 @GetMapping(value = "/supplierSettlement") 70 @GetMapping(value = "/supplierSettlement")
74 public Result<ErpSettlementVO> supplierSettlement(@RequestParam(name="ids",required=true) String ids) { 71 public Result<ErpSettlementVO> supplierSettlement(@RequestParam(name="ids",required=true) String ids) {
75 Result<ErpSettlementVO> result = new Result<>(); 72 Result<ErpSettlementVO> result = new Result<>();
76 ErpSettlementVO erpSettlementVO = null; 73 ErpSettlementVO erpSettlementVO = null;
77 List<ErpSettlementVO> settlementVOList = erpSettlementService.supplierSettlement(ids); 74 List<ErpSettlementVO> settlementVOList = erpSettlementService.supplierSettlement(JSUtils.quoteEach(ids,","));
78 if(settlementVOList==null || settlementVOList.isEmpty()) { 75 if(settlementVOList==null || settlementVOList.isEmpty()) {
79 result.error500("根据供应商与合同号未找到实体"); 76 result.error500("根据供应商与合同号未找到实体");
80 return result; 77 return result;
81 } 78 }
82 String supplierName = ""; 79 String supplierName = "";
80 String contractCode = "";
83 if(settlementVOList != null ){ 81 if(settlementVOList != null ){
84 for(ErpSettlementVO settlementVO : settlementVOList){ 82 for(ErpSettlementVO settlementVO : settlementVOList){
85 erpSettlementVO = settlementVO; 83 erpSettlementVO = settlementVO;
84 erpSettlementVO.setSettlementType("0");
86 if(supplierName.length() >0 ) supplierName+=","; 85 if(supplierName.length() >0 ) supplierName+=",";
87 supplierName += settlementVO.getSupplierName(); 86 supplierName += settlementVO.getSupplierName();
87 contractCode += settlementVO.getContractCode();
88 } 88 }
89 } 89 }
90 String[] supplierNameList = supplierName.split(","); 90 String[] supplierNameList = supplierName.split(",");
91 if(supplierNameList.length > 1){ 91 if(settlementVOList != null && settlementVOList.size() > 1){
92 result.error500("查询多个供应商:"+supplierName+"记录;请选择某一个供应商"); 92 result.error500("查询多个供应商:"+supplierName+";合同号:"+contractCode+"记录;请选择某一个供应商,同一合同");
93 }else{ 93 }else{
94 List<ErpSettlementItem> erpSettlementItemList = erpSettlementService.querySupplierSettlementByMaterialIds(ids); 94 List<ErpSettlementItemVO> erpSettlementItemList = erpSettlementService.querySupplierSettlementByMaterialIds(JSUtils.quoteEach(ids,","));
95 erpSettlementVO.setItemList( erpSettlementItemList ); 95 erpSettlementVO.setItemList( erpSettlementItemList );
96
97 erpSettlementVO.setSparepartSettlementList( converErpSettlementItemList(erpSettlementItemList) );
98
96 result.setResult(erpSettlementVO); 99 result.setResult(erpSettlementVO);
97 result.setSuccess(true); 100 result.setSuccess(true);
98 } 101 }
99 return result; 102 return result;
100 } 103 }
101 104
102 @AutoLog(value = "药剂结算单详情-水厂结算") 105 @AutoLog(value = "药剂结算单详情-根据ids生成水厂结算")
103 @ApiOperation(value="药剂结算单详情-水厂结算", notes="药剂结算单详情-水厂结算") 106 @ApiOperation(value="药剂结算单详情-根据ids生成水厂结算", notes="药剂结算单详情-水厂结算")
104 @GetMapping(value = "/waterDepartSettlement") 107 @GetMapping(value = "/waterDepartSettlement")
105 public Result<ErpSettlementVO> waterDepartSettlement(@RequestParam(name="ids",required=true) String ids) { 108 public Result<ErpSettlementVO> waterDepartSettlement(@RequestParam(name="ids",required=true) String ids) {
106 Result<ErpSettlementVO> result = new Result<ErpSettlementVO>(); 109 Result<ErpSettlementVO> result = new Result<ErpSettlementVO>();
107 ErpSettlementVO erpSettlementVO = null; 110 ErpSettlementVO erpSettlementVO = null;
108 List<ErpSettlementVO> settlementVOList = erpSettlementService.waterDepartSettlement(ids); 111 List<ErpSettlementVO> settlementVOList = erpSettlementService.waterDepartSettlement(JSUtils.quoteEach(ids,","));
109 if(settlementVOList==null || settlementVOList.isEmpty()) { 112 if(settlementVOList==null || settlementVOList.isEmpty()) {
110 result.error500("根据部门与合同号未找到实体"); 113 result.error500("根据部门与合同号未找到实体");
111 return result; 114 return result;
112 } 115 }
113 String supplierName = ""; 116 String departName = "";
117 String contractCode = "";
118
114 if(settlementVOList != null ){ 119 if(settlementVOList != null ){
115 for(ErpSettlementVO settlementVO : settlementVOList){ 120 for(ErpSettlementVO settlementVO : settlementVOList){
116 erpSettlementVO = settlementVO; 121 erpSettlementVO = settlementVO;
117 if(supplierName.length() >0 ) supplierName+=","; 122 erpSettlementVO.setSettlementType("1");
118 supplierName += settlementVO.getSupplierName(); 123 if(departName.length() >0 ) departName+=",";
124 departName += settlementVO.getDepartName();
125 contractCode += settlementVO.getContractCode();
119 } 126 }
120 } 127 }
121 String[] supplierNameList = supplierName.split(","); 128 String[] supplierNameList = departName.split(",");
122 if(supplierNameList.length > 1){ 129 if(settlementVOList != null && settlementVOList.size() > 1){
123 result.error500("查询出多个水厂:"+supplierName+"记录;请选择某一个水厂"); 130 result.error500("查询出多个水厂:"+departName+";合同编号:"+contractCode+"记录;请选择某一个水厂,同一合同");
124 }else{ 131 }else{
125 List<ErpSettlementItem> settlementItemList = erpSettlementService.queryWaterDepartSettlementByMaterialIds(ids); 132 List<ErpSettlementItemVO> settlementItemList = erpSettlementService.queryWaterDepartSettlementByMaterialIds(JSUtils.quoteEach(ids,","));
126 erpSettlementVO.setItemList(settlementItemList ); 133 erpSettlementVO.setItemList(settlementItemList );
134
135 //送货单以及物资验收单
136 erpSettlementVO.setSparepartSettlementList( converErpSettlementItemList(settlementItemList) );
127 result.setResult(erpSettlementVO); 137 result.setResult(erpSettlementVO);
128 result.setSuccess(true); 138 result.setSuccess(true);
129 } 139 }
130 return result; 140 return result;
131 } 141 }
132 142
133 @AutoLog(value = "药剂结算单详情-添加") 143 /***
134 @ApiOperation(value="药剂结算单详情-添加", notes="药剂结算单详情-添加") 144 * 转换ErpSettlementItem
145 * @return
146 */
147 private List<SparepartSettlementVO> converErpSettlementItemList(List<ErpSettlementItemVO> settlementItemList ){
148 String jtDepartName = commonSqlService.queryForString("select depart_name from sys_depart order by parent_id asc limit 1");
149 Map<String, SparepartSettlementVO> sparepartSettlementMap = new HashedMap();
150 SparepartSettlementVO sparepartSettlementVO = null;
151 if(settlementItemList != null ){
152 for( ErpSettlementItemVO settlementItem : settlementItemList){
153 sparepartSettlementVO = sparepartSettlementMap.get(settlementItem.getSparepartId());
154 if(sparepartSettlementVO == null ){
155 //String projectName,String departName, String contractCode, String sparepartName, String specification, String goodOrigin, String goodBrand
156 sparepartSettlementVO = new SparepartSettlementVO(settlementItem.getProjectName(),settlementItem.getDepartName(),settlementItem.getContractCode(),
157 settlementItem.getSparepartName(),settlementItem.getSpecification(),settlementItem.getGoodCode() ,settlementItem.getGoodBrand() );
158 sparepartSettlementVO.setJtDepartName(jtDepartName);
159 sparepartSettlementVO.setSupplierName( settlementItem.getSupplierName() );
160 sparepartSettlementVO.setContractName(settlementItem.getContractName() );
161 sparepartSettlementMap.put( settlementItem.getSparepartId() ,sparepartSettlementVO );
162 }
163 sparepartSettlementVO.addErpSettlementItem( settlementItem );
164 }
165 }
166 return new ArrayList(sparepartSettlementMap.values());
167 }
168
169
170 @AutoLog(value = "药剂结算单-添加")
171 @ApiOperation(value="药剂结算单-添加", notes="药剂结算单-添加")
135 @PostMapping(value = "/add") 172 @PostMapping(value = "/add")
136 public Result<ErpSettlementVO> add(@RequestBody ErpSettlementVO erpSettlementVO) { 173 public Result<ErpSettlementVO> add(@RequestBody ErpSettlementVO erpSettlementVO) {
137 Result<ErpSettlementVO> result = new Result<ErpSettlementVO>(); 174 Result<ErpSettlementVO> result = new Result<ErpSettlementVO>();
...@@ -266,7 +303,7 @@ public class ErpSettlementController { ...@@ -266,7 +303,7 @@ public class ErpSettlementController {
266 return result; 303 return result;
267 } 304 }
268 305
269 @AutoLog(value = "药剂结算单详情-导出:(供应商)送货单以及物资验收单") 306 /* @AutoLog(value = "药剂结算单详情-导出:(供应商)送货单以及物资验收单")
270 @ApiOperation(value="药剂结算单详情-导出:(供应商)送货单以及物资验收单", notes="药剂结算单详情-导出:送货单以及物资验收单") 307 @ApiOperation(value="药剂结算单详情-导出:(供应商)送货单以及物资验收单", notes="药剂结算单详情-导出:送货单以及物资验收单")
271 @GetMapping(value = "/exportSupplierSupplierFormPDF") 308 @GetMapping(value = "/exportSupplierSupplierFormPDF")
272 public Result<ErpSettlementFormVO> exportSupplierSupplierFormPDF(@RequestParam(name="id",required=true) String id) { 309 public Result<ErpSettlementFormVO> exportSupplierSupplierFormPDF(@RequestParam(name="id",required=true) String id) {
...@@ -293,7 +330,7 @@ public class ErpSettlementController { ...@@ -293,7 +330,7 @@ public class ErpSettlementController {
293 result.setSuccess(true); 330 result.setSuccess(true);
294 } 331 }
295 return result; 332 return result;
296 } 333 }*/
297 334
298 @RequestMapping(value = "/exportXls") 335 @RequestMapping(value = "/exportXls")
299 public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) { 336 public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
......
...@@ -35,6 +35,8 @@ public class DistributContract { ...@@ -35,6 +35,8 @@ public class DistributContract {
35 @ApiModelProperty(value = "所属机构") 35 @ApiModelProperty(value = "所属机构")
36 @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name") 36 @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name")
37 private String departId; 37 private String departId;
38 @ApiModelProperty(value = "项目名称")
39 private String projectName;
38 /**合同名称*/ 40 /**合同名称*/
39 @Excel(name = "合同名称", width = 15) 41 @Excel(name = "合同名称", width = 15)
40 @ApiModelProperty(value = "合同名称") 42 @ApiModelProperty(value = "合同名称")
......
...@@ -50,6 +50,8 @@ public class ERPPurchaseContract { ...@@ -50,6 +50,8 @@ public class ERPPurchaseContract {
50 @ApiModelProperty(value = "采购类型:招标采购/询价采购") 50 @ApiModelProperty(value = "采购类型:招标采购/询价采购")
51 @Dict(dicCode = "purchase_type") 51 @Dict(dicCode = "purchase_type")
52 private java.lang.String purchaseType; 52 private java.lang.String purchaseType;
53 @ApiModelProperty(value = "合同名称")
54 private String contractName;
53 /**合同编号*/ 55 /**合同编号*/
54 @Excel(name = "合同编号", width = 15) 56 @Excel(name = "合同编号", width = 15)
55 @ApiModelProperty(value = "合同编号") 57 @ApiModelProperty(value = "合同编号")
...@@ -68,7 +70,6 @@ public class ERPPurchaseContract { ...@@ -68,7 +70,6 @@ public class ERPPurchaseContract {
68 @ApiModelProperty(value = "采购时间") 70 @ApiModelProperty(value = "采购时间")
69 private java.lang.String projectTime; 71 private java.lang.String projectTime;
70 72
71
72 /**入库仓库编号*/ 73 /**入库仓库编号*/
73 @Excel(name = "入库仓库编号", width = 15) 74 @Excel(name = "入库仓库编号", width = 15)
74 @ApiModelProperty(value = "入库仓库编号") 75 @ApiModelProperty(value = "入库仓库编号")
...@@ -98,11 +99,9 @@ public class ERPPurchaseContract { ...@@ -98,11 +99,9 @@ public class ERPPurchaseContract {
98 private String startTime; 99 private String startTime;
99 @ApiModelProperty(value = "失效时间") 100 @ApiModelProperty(value = "失效时间")
100 private String endTime; 101 private String endTime;
101
102 @ApiModelProperty(value = "变更合同编号") 102 @ApiModelProperty(value = "变更合同编号")
103 private String oldContractId; 103 private String oldContractId;
104 104
105
106 @Excel(name = "备注", width = 15) 105 @Excel(name = "备注", width = 15)
107 @ApiModelProperty(value = "备注") 106 @ApiModelProperty(value = "备注")
108 private String remark; 107 private String remark;
......
...@@ -29,6 +29,9 @@ public class ErpSettlement { ...@@ -29,6 +29,9 @@ public class ErpSettlement {
29 @ApiModelProperty(value = "主键") 29 @ApiModelProperty(value = "主键")
30 private String id; 30 private String id;
31 31
32 @ApiModelProperty(value = "结算类型:0 供应商结算,1 水厂结算")
33 private String settlementType;
34
32 /**供应商id*/ 35 /**供应商id*/
33 @Excel(name = "供应商id", width = 15) 36 @Excel(name = "供应商id", width = 15)
34 @ApiModelProperty(value = "供应商id") 37 @ApiModelProperty(value = "供应商id")
...@@ -82,6 +85,7 @@ public class ErpSettlement { ...@@ -82,6 +85,7 @@ public class ErpSettlement {
82 @ApiModelProperty(value = "结算日期") 85 @ApiModelProperty(value = "结算日期")
83 private String settlementTime; 86 private String settlementTime;
84 87
88
85 /**申请人签字*/ 89 /**申请人签字*/
86 @Excel(name = "申请人签字", width = 15) 90 @Excel(name = "申请人签字", width = 15)
87 @ApiModelProperty(value = "申请人签字") 91 @ApiModelProperty(value = "申请人签字")
...@@ -103,7 +107,11 @@ public class ErpSettlement { ...@@ -103,7 +107,11 @@ public class ErpSettlement {
103 @ApiModelProperty(value = "审批签字") 107 @ApiModelProperty(value = "审批签字")
104 private String approverSign; 108 private String approverSign;
105 109
110 @ApiModelProperty(value = "开始时间")
111 private String startDate;
106 112
113 @ApiModelProperty(value = "结束时间")
114 private String endDate;
107 /**备注*/ 115 /**备注*/
108 @Excel(name = "备注", width = 15) 116 @Excel(name = "备注", width = 15)
109 @ApiModelProperty(value = "备注") 117 @ApiModelProperty(value = "备注")
......
...@@ -108,4 +108,6 @@ public class ErpSettlementItem { ...@@ -108,4 +108,6 @@ public class ErpSettlementItem {
108 @ApiModelProperty(value = "分销合同") 108 @ApiModelProperty(value = "分销合同")
109 private String distributContractId; 109 private String distributContractId;
110 110
111
112
111 } 113 }
......
...@@ -25,7 +25,7 @@ import org.jeecgframework.poi.excel.annotation.Excel; ...@@ -25,7 +25,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
25 @Accessors(chain = true) 25 @Accessors(chain = true)
26 @ApiModel(value="erp_material_acceptance_form对象", description="物料验收单") 26 @ApiModel(value="erp_material_acceptance_form对象", description="物料验收单")
27 public class MaterialAcceptanceForm { 27 public class MaterialAcceptanceForm {
28 28
29 /**主键*/ 29 /**主键*/
30 @TableId(type = IdType.ID_WORKER_STR) 30 @TableId(type = IdType.ID_WORKER_STR)
31 @ApiModelProperty(value = "入库单号") 31 @ApiModelProperty(value = "入库单号")
...@@ -34,6 +34,8 @@ public class MaterialAcceptanceForm { ...@@ -34,6 +34,8 @@ public class MaterialAcceptanceForm {
34 @Excel(name = "入库单号", width = 15) 34 @Excel(name = "入库单号", width = 15)
35 @ApiModelProperty(value = "入库单号") 35 @ApiModelProperty(value = "入库单号")
36 private String inOrder; 36 private String inOrder;
37 @ApiModelProperty(value = "技术文件/资料")
38 private String jishuFilePath;
37 /**外观情况*/ 39 /**外观情况*/
38 @Excel(name = "外观情况", width = 15) 40 @Excel(name = "外观情况", width = 15)
39 @ApiModelProperty(value = "外观情况") 41 @ApiModelProperty(value = "外观情况")
......
...@@ -202,12 +202,16 @@ public class MaterialIN { ...@@ -202,12 +202,16 @@ public class MaterialIN {
202 @ApiModelProperty(value = "物料类别") 202 @ApiModelProperty(value = "物料类别")
203 private String sparepartTypeName; 203 private String sparepartTypeName;
204 204
205
206
207 @ApiModelProperty(value = "入库编号") 205 @ApiModelProperty(value = "入库编号")
208 private String equipmentInId; 206 private String equipmentInId;
209 207
210 @ApiModelProperty(value = "出库编号") 208 @ApiModelProperty(value = "出库编号")
211 private String equipmentOutId; 209 private String equipmentOutId;
212 210
211 @ApiModelProperty(value = "供应商结算,0:未结算,1:已结算")
212 private Integer supplierSettlementFlag;
213
214 @ApiModelProperty(value = "水厂结算,0:未结算,1:已结算")
215 private Integer waterDepartSettlementFlag;
216
213 } 217 }
......
...@@ -2,6 +2,7 @@ package com.skua.modules.erp.mapper; ...@@ -2,6 +2,7 @@ package com.skua.modules.erp.mapper;
2 2
3 import java.util.List; 3 import java.util.List;
4 4
5 import com.skua.modules.erp.vo.ErpSettlementItemVO;
5 import org.apache.ibatis.annotations.Param; 6 import org.apache.ibatis.annotations.Param;
6 import com.skua.modules.erp.entity.ErpSettlementItem; 7 import com.skua.modules.erp.entity.ErpSettlementItem;
7 import com.baomidou.mybatisplus.core.mapper.BaseMapper; 8 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...@@ -11,5 +12,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -11,5 +12,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
11 */ 12 */
12 public interface ErpSettlementItemMapper extends BaseMapper<ErpSettlementItem> { 13 public interface ErpSettlementItemMapper extends BaseMapper<ErpSettlementItem> {
13 14
14 public void deleteBySettlementId(@Param("settlementId") String settlementId); 15 void deleteBySettlementId(@Param("settlementId") String settlementId);
16
17 List<ErpSettlementItemVO> queryListBySupplier(@Param("settlementId") String settlementId);
18 List<ErpSettlementItemVO> queryListByWaterDepart(@Param("settlementId") String settlementId);
15 } 19 }
......
...@@ -19,12 +19,12 @@ public interface ErpSettlementMapper extends BaseMapper<ErpSettlement> { ...@@ -19,12 +19,12 @@ public interface ErpSettlementMapper extends BaseMapper<ErpSettlement> {
19 List<ErpSettlementVO> waterDepartSettlement(@Param("ids")String ids); 19 List<ErpSettlementVO> waterDepartSettlement(@Param("ids")String ids);
20 20
21 // 根据入库单ids,获取【供应商】结算单详情 21 // 根据入库单ids,获取【供应商】结算单详情
22 List<ErpSettlementItem> querySupplierSettlementByMaterialIds(@Param("ids") String materialIds); 22 List<ErpSettlementItemVO> querySupplierSettlementByMaterialIds(@Param("ids") String materialIds);
23 23
24 // 根据入库单ids,获取【水厂】结算单详情 24 // 根据入库单ids,获取【水厂】结算单详情
25 List<ErpSettlementItem> queryWaterDepartSettlementByMaterialIds(@Param("ids") String materialIds); 25 List<ErpSettlementItemVO> queryWaterDepartSettlementByMaterialIds(@Param("ids") String materialIds);
26 //(供应商)送货单以及物资验收单 26 //(供应商)送货单以及物资验收单
27 List<ErpSettlementItemVO> querySupplierSettlementFormById(@Param("id")String id); 27 /// List<ErpSettlementItemVO> querySupplierSettlementFormById(@Param("id")String id);
28 //(水厂) 送货单以及物资验收单 28 //(水厂) 送货单以及物资验收单
29 List<ErpSettlementItemVO> queryWaterDepartSettlementFormById(@Param("id")String id); 29 // List<ErpSettlementItemVO> queryWaterDepartSettlementFormById(@Param("id")String id);
30 } 30 }
......
...@@ -5,5 +5,24 @@ ...@@ -5,5 +5,24 @@
5 <delete id="deleteBySettlementId" > 5 <delete id="deleteBySettlementId" >
6 delete from erp_settlement_item where settlement_id = #{settlementId} 6 delete from erp_settlement_item where settlement_id = #{settlementId}
7 </delete> 7 </delete>
8 8 <!-- 结算单详情:供应商-->
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.*
11 from erp_settlement_item si
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 )
14 left join erp_material_acceptance_form mf on mf.id = si.id
15 left join erp_purchase_contract pc on si.purchase_contract_id = pc.id
16 where si.settlement_id = #{settlementId}
17 </select>
18 <!-- 结算单详情:水厂-->
19 <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 from erp_settlement_item si
22 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_material_acceptance_form mf on mf.id = si.id
25 left join erp_distribut_contract dc on si.distribut_contract_id = dc.id
26 where si.settlement_id = #{settlementId}
27 </select>
9 </mapper> 28 </mapper>
......
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 <mapper namespace="com.skua.modules.erp.mapper.ErpSettlementMapper"> 3 <mapper namespace="com.skua.modules.erp.mapper.ErpSettlementMapper">
4 <!--供应商结算 --> 4 <!--根据ids获取:供应商结算单 -->
5 <select id="supplierSettlement" resultType="com.skua.modules.erp.vo.ErpSettlementVO"> 5 <select id="supplierSettlement" resultType="com.skua.modules.erp.vo.ErpSettlementVO">
6 select sm.supp_name 'supplierName', d.depart_name ,aaa.* from ( 6 select sm.supp_name 'supplierName', d.depart_name ,aaa.* from (
7 select pm.supplier_id ,pc.contract_code, mi.purchase_contract_id ,pc.project_name, mi.depart_id, 7 select pm.supplier_id ,pc.contract_code, mi.purchase_contract_id ,pc.project_name, mi.depart_id,
...@@ -16,17 +16,24 @@ ...@@ -16,17 +16,24 @@
16 left join sys_depart d on aaa.depart_id = d.id 16 left join sys_depart d on aaa.depart_id = d.id
17 </select> 17 </select>
18 <!-- 根据入库单ids,获取供应商结算单详情--> 18 <!-- 根据入库单ids,获取供应商结算单详情-->
19 <select id="querySupplierSettlementByMaterialIds" resultType="com.skua.modules.erp.entity.ErpSettlementItem"> 19 <select id="querySupplierSettlementByMaterialIds" resultType="com.skua.modules.erp.vo.ErpSettlementItemVO">
20 select pc.contract_code, mi.purchase_contract_id , pm.unit_price ,mi.material_num, pm.tax_amount ,(pm.unit_price * mi.material_num) total_price,(pm.unit_price * mi.material_num *(100+pm.tax_amount) /100) total_price_tax, 20 select sm.supp_name 'supplierName',d.depart_name, mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg,mf.sender_sign,mf.receiver_sign,
21 mi.arrive_time ,mi.remark,mi.sparepart_type,mi.sparepart_id,mi.sparepart_name,mi.sparepart_code,mi.specification, mi.measuring_unit,mi.good_code,mi.id 'material_in_id' 21 pc.contract_name,pc.contract_code,pc.project_name , mi.purchase_contract_id , pm.good_brand , pm.good_origin, pm.unit_price ,mi.material_num, pm.tax_amount ,round(pm.unit_price * mi.material_num,2) total_price,
22 from erp_material_in mi ,erp_purchase_contract pc , erp_purchase_material pm 22 round(pm.unit_price * mi.material_num *(100+pm.tax_amount) /100 ,2) total_price_tax,
23 where mi.audit_status = 3 and mi.purchase_contract_id = pc.id and pm.good_code = mi.good_code and pm.contract_id = mi.purchase_contract_id 23 mi.arrive_time ,mi.remark,mi.sparepart_type,mi.sparepart_id,mi.sparepart_name,mi.sparepart_code,mi.specification, mi.measuring_unit,mi.good_code,mi.id 'material_in_id'
24 and mi.id in (${ids}) 24 from erp_material_in mi
25 left join erp_purchase_contract pc on mi.purchase_contract_id = pc.id
26 left join sys_depart d on d.id = mi.depart_id
27 left join erp_purchase_material pm on (pm.contract_id =mi.purchase_contract_id and pm.good_code = mi.good_code )
28 left join erp_material_acceptance_form mf on mf.id = mi.id
29 left join ajh_supplier_manage sm on pm.supplier_id = sm.id
30 where mi.audit_status = 3
31 and mi.id in (${ids})
25 order by mi.arrive_time asc 32 order by mi.arrive_time asc
26 </select> 33 </select>
27 34
28 <!--水厂结算 --> 35 <!-- 根据ids获取:水厂结算单 -->
29 <select id="waterDepartSettlement" resultType="com.skua.modules.erp.vo.ErpSettlementVO"> 36 <!-- <select id="waterDepartSettlement" resultType="com.skua.modules.erp.vo.ErpSettlementVO">
30 select d.depart_name ,aaa.* from ( 37 select d.depart_name ,aaa.* from (
31 select mi.depart_id ,dc.contract_code, mi.distribut_contract_id ,sum(mi.material_num) material_num, dc.contract_name 'project_name', round(sum(dm.distribut_price * mi.material_num),2) total_price, 38 select mi.depart_id ,dc.contract_code, mi.distribut_contract_id ,sum(mi.material_num) material_num, dc.contract_name 'project_name', round(sum(dm.distribut_price * mi.material_num),2) total_price,
32 round(sum(dm.distribut_price * mi.material_num *(100+dm.tax_amount) /100),2) total_price_tax 39 round(sum(dm.distribut_price * mi.material_num *(100+dm.tax_amount) /100),2) total_price_tax
...@@ -36,21 +43,26 @@ ...@@ -36,21 +43,26 @@
36 group by mi.depart_id ,dc.contract_code 43 group by mi.depart_id ,dc.contract_code
37 )aaa 44 )aaa
38 left join sys_depart d on aaa.depart_id = d.id 45 left join sys_depart d on aaa.depart_id = d.id
39 </select> 46 </select>-->
40 <!-- 根据入库单ids,获取水厂结算单详情--> 47 <!-- 根据入库单ids,获取水厂结算单详情-->
41 <select id="queryWaterDepartSettlementByMaterialIds" resultType="com.skua.modules.erp.entity.ErpSettlementItem"> 48 <select id="queryWaterDepartSettlementByMaterialIds" resultType="com.skua.modules.erp.vo.ErpSettlementVO">
42 select dc.contract_code, mi.distribut_contract_id , dm.distribut_price 'unit_price' , mi.material_num, dm.tax_amount ,(dm.distribut_price * mi.material_num) total_price, 49 select d.depart_name, dc.contract_name ,dc.project_name, dc.contract_code, dm.distribut_price 'unit_price' , pm.good_brand , pm.good_origin, mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg,mf.sender_sign,mf.receiver_sign, dm.tax_amount ,
43 (dm.distribut_price * mi.material_num *(100+dm.tax_amount) /100) total_price_tax, 50 round(dm.distribut_price * mi.material_num,2) total_price,
44 mi.arrive_time ,mi.remark,mi.sparepart_type,mi.sparepart_id,mi.sparepart_name,mi.sparepart_code,mi.specification, 51 round(dm.distribut_price * mi.material_num *(100+dm.tax_amount) /100,2) total_price_tax, mi.depart_id , mi.distribut_contract_id ,mi.purchase_contract_id, mi.material_num,
45 mi.measuring_unit,mi.good_code,mi.id 'material_in_id' 52 mi.arrive_time ,mi.remark,mi.sparepart_type,mi.sparepart_id,mi.sparepart_name,mi.sparepart_code,mi.specification, mi.measuring_unit,mi.good_code,mi.id 'material_in_id'
46 from erp_material_in mi ,erp_distribut_contract dc , erp_distribut_material dm 53 from erp_material_in mi
47 where mi.audit_status = 3 and mi.distribut_contract_id = dc.id and dm.good_code = mi.good_code and dm.contract_id = mi.distribut_contract_id 54 left join erp_distribut_material dm on (dm.good_code = mi.good_code and dm.contract_id = mi.distribut_contract_id)
55 left join erp_distribut_contract dc on mi.distribut_contract_id = dc.id
56 left join sys_depart d on d.id = mi.depart_id
57 left join erp_purchase_material pm on (pm.contract_id =mi.purchase_contract_id and pm.good_code = mi.good_code )
58 left join erp_material_acceptance_form mf on mf.id = mi.id
59 where mi.audit_status = 3
48 and mi.id in (${ids}) 60 and mi.id in (${ids})
49 order by mi.arrive_time asc 61 order by mi.arrive_time asc
50 </select> 62 </select>
51 63
52 <select id="querySupplierSettlementFormById" resultType="com.skua.modules.erp.vo.ErpSettlementItemVO"> 64 <select id="querySupplierSettlementFormById" resultType="com.skua.modules.erp.vo.ErpSettlementItemVO">
53 select d.depart_name,pc.project_name ,pc.contract_code,sm.supp_name as supplier_name,mi.arrive_time, maf.appearance_info ,maf.matched_info ,maf.handle_msg ,maf.sender_sign ,maf.receiver_sign ,aaa.* 65 select d.depart_name,pc.project_name ,pc.contract_code,pc.contract_name,sm.supp_name as supplier_name,mi.arrive_time, mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg,maf.appearance_info ,maf.matched_info ,maf.handle_msg ,maf.sender_sign ,maf.receiver_sign ,aaa.*
54 from ( 66 from (
55 select si.sparepart_name,si.material_num,si.specification,si.measuring_unit,s.purchase_contract_id,s.supplier_id,si.material_in_id 67 select si.sparepart_name,si.material_num,si.specification,si.measuring_unit,s.purchase_contract_id,s.supplier_id,si.material_in_id
56 from erp_settlement s ,erp_settlement_item si where s.id = si.settlement_id and s.id = #{id} 68 from erp_settlement s ,erp_settlement_item si where s.id = si.settlement_id and s.id = #{id}
...@@ -63,7 +75,7 @@ ...@@ -63,7 +75,7 @@
63 </select> 75 </select>
64 76
65 <select id="queryWaterDepartSettlementFormById" resultType="com.skua.modules.erp.vo.ErpSettlementItemVO"> 77 <select id="queryWaterDepartSettlementFormById" resultType="com.skua.modules.erp.vo.ErpSettlementItemVO">
66 select d.depart_name,dc.contract_code,dc.contract_name as project_name ,mi.arrive_time, maf.appearance_info ,maf.matched_info ,maf.handle_msg ,maf.sender_sign ,maf.receiver_sign ,aaa.* 78 select d.depart_name,dc.contract_code,dc.contract_name , dc.project_name ,mi.arrive_time,mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg, maf.appearance_info ,maf.matched_info ,maf.handle_msg ,maf.sender_sign ,maf.receiver_sign ,aaa.*
67 from ( 79 from (
68 select si.sparepart_name,si.material_num,si.specification,si.measuring_unit, 80 select si.sparepart_name,si.material_num,si.specification,si.measuring_unit,
69 s.distribut_contract_id,s.supplier_id,si.material_in_id 81 s.distribut_contract_id,s.supplier_id,si.material_in_id
......
...@@ -4,6 +4,7 @@ import com.skua.modules.erp.entity.ErpSettlement; ...@@ -4,6 +4,7 @@ import com.skua.modules.erp.entity.ErpSettlement;
4 import com.baomidou.mybatisplus.extension.service.IService; 4 import com.baomidou.mybatisplus.extension.service.IService;
5 import com.skua.modules.erp.entity.ErpSettlementItem; 5 import com.skua.modules.erp.entity.ErpSettlementItem;
6 import com.skua.modules.erp.vo.ErpSettlementFormVO; 6 import com.skua.modules.erp.vo.ErpSettlementFormVO;
7 import com.skua.modules.erp.vo.ErpSettlementItemVO;
7 import com.skua.modules.erp.vo.ErpSettlementVO; 8 import com.skua.modules.erp.vo.ErpSettlementVO;
8 import org.apache.ibatis.annotations.Param; 9 import org.apache.ibatis.annotations.Param;
9 10
...@@ -31,19 +32,20 @@ public interface IErpSettlementService extends IService<ErpSettlement> { ...@@ -31,19 +32,20 @@ public interface IErpSettlementService extends IService<ErpSettlement> {
31 // 删除 32 // 删除
32 void delById(String id); 33 void delById(String id);
33 34
34 //供应商结算
35 List<ErpSettlementVO> supplierSettlement(String materialInIds);
36 // 根据入库单ids,获取【供应商】结算单详情
37 List<ErpSettlementItem> querySupplierSettlementByMaterialIds(String materialInIds);
38 35
36 // 根据入库单ids,获取【供应商】结算单详情
37 List<ErpSettlementItemVO> querySupplierSettlementByMaterialIds(String materialInIds);
38 // 根据入库单ids,获取【水厂】结算单详情
39 List<ErpSettlementItemVO> queryWaterDepartSettlementByMaterialIds( String materialInIds);
39 40
41 //供应商结算
42 List<ErpSettlementVO> supplierSettlement(String materialInIds);
40 //水厂结算 43 //水厂结算
41 List<ErpSettlementVO> waterDepartSettlement(String materialInIds); 44 List<ErpSettlementVO> waterDepartSettlement(String materialInIds);
42 // 根据入库单ids,获取【水厂】结算单详情 45
43 List<ErpSettlementItem> queryWaterDepartSettlementByMaterialIds( String materialInIds);
44 // (供应商)送货单以及物资验收单 46 // (供应商)送货单以及物资验收单
45 ErpSettlementFormVO querySupplierSettlementFormById(String id); 47 // ErpSettlementFormVO querySupplierSettlementFormById(String id);
46 //(水厂) 送货单以及物资验收单 48 //(水厂) 送货单以及物资验收单
47 ErpSettlementFormVO queryWaterDepartSettlementFormById(String id); 49 // ErpSettlementFormVO queryWaterDepartSettlementFormById(String id);
48 50
49 } 51 }
......
1 package com.skua.modules.erp.service.impl; 1 package com.skua.modules.erp.service.impl;
2 2
3 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 3 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 import com.skua.modules.common.service.ICommonSqlService;
4 import com.skua.modules.equipment.entity.SupplierManage; 5 import com.skua.modules.equipment.entity.SupplierManage;
5 import com.skua.modules.equipment.mapper.SupplierManageMapper; 6 import com.skua.modules.equipment.mapper.SupplierManageMapper;
6 import com.skua.modules.erp.entity.ErpSettlement; 7 import com.skua.modules.erp.entity.ErpSettlement;
...@@ -11,17 +12,22 @@ import com.skua.modules.erp.service.IErpSettlementService; ...@@ -11,17 +12,22 @@ import com.skua.modules.erp.service.IErpSettlementService;
11 import com.skua.modules.erp.vo.ErpSettlementFormVO; 12 import com.skua.modules.erp.vo.ErpSettlementFormVO;
12 import com.skua.modules.erp.vo.ErpSettlementItemVO; 13 import com.skua.modules.erp.vo.ErpSettlementItemVO;
13 import com.skua.modules.erp.vo.ErpSettlementVO; 14 import com.skua.modules.erp.vo.ErpSettlementVO;
15 import com.skua.modules.erp.vo.SparepartSettlementVO;
14 import com.skua.modules.system.entity.SysDepart; 16 import com.skua.modules.system.entity.SysDepart;
15 import com.skua.modules.system.mapper.SysDepartMapper; 17 import com.skua.modules.system.mapper.SysDepartMapper;
16 import com.skua.tool.util.JSUtils; 18 import com.skua.tool.util.JSUtils;
19 import org.apache.commons.collections.map.HashedMap;
17 import org.springframework.beans.BeanUtils; 20 import org.springframework.beans.BeanUtils;
21 import org.springframework.beans.factory.annotation.Autowired;
18 import org.springframework.stereotype.Service; 22 import org.springframework.stereotype.Service;
19 23
20 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 24 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
21 import org.springframework.transaction.annotation.Transactional; 25 import org.springframework.transaction.annotation.Transactional;
22 26
23 import javax.annotation.Resource; 27 import javax.annotation.Resource;
28 import java.util.ArrayList;
24 import java.util.List; 29 import java.util.List;
30 import java.util.Map;
25 31
26 /** 32 /**
27 * 药剂结算单详情 33 * 药剂结算单详情
...@@ -31,10 +37,8 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E ...@@ -31,10 +37,8 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E
31 37
32 @Resource 38 @Resource
33 private ErpSettlementItemMapper settlementItemMapper; 39 private ErpSettlementItemMapper settlementItemMapper;
34 @Resource 40 @Autowired
35 private SupplierManageMapper supplierManageMapper; 41 private ICommonSqlService commonSqlService;
36 @Resource
37 private SysDepartMapper departMapper;
38 /** 42 /**
39 * 新增结算单 43 * 新增结算单
40 * @param erpSettlementVO 44 * @param erpSettlementVO
...@@ -72,15 +76,39 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E ...@@ -72,15 +76,39 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E
72 //根据编号查询结算单 76 //根据编号查询结算单
73 public ErpSettlementVO queryById(String id){ 77 public ErpSettlementVO queryById(String id){
74 ErpSettlement erpSettlement = this.baseMapper.selectById(id); 78 ErpSettlement erpSettlement = this.baseMapper.selectById(id);
75 QueryWrapper<ErpSettlementItem> queryWrapper = new QueryWrapper<ErpSettlementItem>(); 79
76 queryWrapper.eq("settlement_id",id); 80 List<ErpSettlementItemVO> settlementItemList = null;
77 List<ErpSettlementItem> settlementItemList = settlementItemMapper.selectList(queryWrapper); 81 if("0".equals( erpSettlement.getSettlementType())){ //供应商
82 settlementItemList = settlementItemMapper.queryListBySupplier(id);
83 }
84 if("1".equals( erpSettlement.getSettlementType())){ //水厂
85 settlementItemList = settlementItemMapper.queryListByWaterDepart(id);
86 }
78 ErpSettlementVO erpSettlementVO = new ErpSettlementVO(); 87 ErpSettlementVO erpSettlementVO = new ErpSettlementVO();
79 88
80 if(erpSettlement != null ){ 89 if(erpSettlement != null ){
81 //BeanUtils.copyProperties(有值的对象, 要被赋值的对象); 90 //BeanUtils.copyProperties(有值的对象, 要被赋值的对象);
82 BeanUtils.copyProperties(erpSettlement, erpSettlementVO); 91 BeanUtils.copyProperties(erpSettlement, erpSettlementVO);
83 erpSettlementVO.setItemList( settlementItemList ); 92 erpSettlementVO.setItemList( settlementItemList );
93
94 String jtDepartName = commonSqlService.queryForString("select depart_name from sys_depart order by parent_id asc limit 1");
95 Map<String, SparepartSettlementVO> sparepartSettlementMap = new HashedMap();
96 SparepartSettlementVO sparepartSettlementVO = null;
97 if(settlementItemList != null ){
98 for( ErpSettlementItemVO settlementItemVO : settlementItemList){
99 sparepartSettlementVO = sparepartSettlementMap.get(settlementItemVO.getSparepartId());
100 if(sparepartSettlementVO == null ){
101 //String projectName,String departName, String contractCode, String sparepartName, String specification, String goodOrigin, String goodBrand
102 sparepartSettlementVO = new SparepartSettlementVO(settlementItemVO.getProjectName(),settlementItemVO.getDepartName(),settlementItemVO.getContractCode(),
103 settlementItemVO.getSparepartName(),settlementItemVO.getSpecification(),settlementItemVO.getGoodCode() ,settlementItemVO.getGoodBrand() );
104 sparepartSettlementVO.setJtDepartName(jtDepartName);
105 sparepartSettlementMap.put( settlementItemVO.getSparepartId() ,sparepartSettlementVO );
106 }
107 sparepartSettlementVO.addErpSettlementItem( settlementItemVO );
108 }
109 }
110 //送货单以及物资验收单
111 erpSettlementVO.setSparepartSettlementList( new ArrayList(sparepartSettlementMap.values()) );
84 } 112 }
85 return erpSettlementVO; 113 return erpSettlementVO;
86 } 114 }
...@@ -102,15 +130,15 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E ...@@ -102,15 +130,15 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E
102 } 130 }
103 131
104 // 根据入库单ids,获取【供应商】结算单详情 132 // 根据入库单ids,获取【供应商】结算单详情
105 public List<ErpSettlementItem> querySupplierSettlementByMaterialIds(String materialInIds){ 133 public List<ErpSettlementItemVO> querySupplierSettlementByMaterialIds(String materialInIds){
106 return this.baseMapper.querySupplierSettlementByMaterialIds( materialInIds ); 134 return this.baseMapper.querySupplierSettlementByMaterialIds( materialInIds );
107 } 135 }
108 136
109 // 根据入库单ids,获取【水厂】结算单详情 137 // 根据入库单ids,获取【水厂】结算单详情
110 public List<ErpSettlementItem> queryWaterDepartSettlementByMaterialIds( String materialInIds){ 138 public List<ErpSettlementItemVO> queryWaterDepartSettlementByMaterialIds( String materialInIds){
111 return this.baseMapper.queryWaterDepartSettlementByMaterialIds( materialInIds ); 139 return this.baseMapper.queryWaterDepartSettlementByMaterialIds( materialInIds );
112 } 140 }
113 // 送货单以及物资验收单 141 /* // 送货单以及物资验收单
114 public ErpSettlementFormVO querySupplierSettlementFormById(String id){ 142 public ErpSettlementFormVO querySupplierSettlementFormById(String id){
115 List<ErpSettlementItemVO> itemList = this.baseMapper.querySupplierSettlementFormById( id ); 143 List<ErpSettlementItemVO> itemList = this.baseMapper.querySupplierSettlementFormById( id );
116 ErpSettlementFormVO erpSettlementFormVO = new ErpSettlementFormVO(); 144 ErpSettlementFormVO erpSettlementFormVO = new ErpSettlementFormVO();
...@@ -145,5 +173,5 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E ...@@ -145,5 +173,5 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E
145 } 173 }
146 erpSettlementFormVO.setItemList(itemList ); 174 erpSettlementFormVO.setItemList(itemList );
147 return erpSettlementFormVO; 175 return erpSettlementFormVO;
148 } 176 }*/
149 } 177 }
......
1 package com.skua.modules.erp.vo; 1 package com.skua.modules.erp.vo;
2 2
3 import com.baomidou.mybatisplus.annotation.TableField;
3 import com.skua.modules.erp.entity.ErpSettlementItem; 4 import com.skua.modules.erp.entity.ErpSettlementItem;
4 import io.swagger.annotations.ApiModel; 5 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty; 6 import io.swagger.annotations.ApiModelProperty;
...@@ -10,10 +11,18 @@ import lombok.Data; ...@@ -10,10 +11,18 @@ import lombok.Data;
10 @Data 11 @Data
11 @ApiModel(value="erp_settlement_item数据传输对象", description="药剂结算单详情") 12 @ApiModel(value="erp_settlement_item数据传输对象", description="药剂结算单详情")
12 public class ErpSettlementItemVO extends ErpSettlementItem { 13 public class ErpSettlementItemVO extends ErpSettlementItem {
13 @ApiModelProperty(value = "合同编号") 14 @ApiModelProperty(value = "产地")
14 private String contractCode; 15 private String goodOrigin;
15 @ApiModelProperty(value = "项目名称") 16 @ApiModelProperty(value = "品牌")
16 private String projectName; 17 private String goodBrand;
18 @ApiModelProperty(value = "项目名称")
19 private String projectName;
20
21 @ApiModelProperty(value = "合同名称")
22 private String contractName;
23 @ApiModelProperty(value = "合同编码")
24 private String contractCode;
25
17 26
18 @ApiModelProperty(value = "供应商名称") 27 @ApiModelProperty(value = "供应商名称")
19 private String supplierName; 28 private String supplierName;
...@@ -22,6 +31,8 @@ public class ErpSettlementItemVO extends ErpSettlementItem { ...@@ -22,6 +31,8 @@ public class ErpSettlementItemVO extends ErpSettlementItem {
22 private String departName; 31 private String departName;
23 32
24 33
34 @ApiModelProperty(value = "技术文件/资料")
35 private String jishuFilePath;
25 /**外观情况*/ 36 /**外观情况*/
26 @ApiModelProperty(value = "外观情况") 37 @ApiModelProperty(value = "外观情况")
27 private String appearanceInfo; 38 private String appearanceInfo;
...@@ -31,10 +42,8 @@ public class ErpSettlementItemVO extends ErpSettlementItem { ...@@ -31,10 +42,8 @@ public class ErpSettlementItemVO extends ErpSettlementItem {
31 /**处理意见*/ 42 /**处理意见*/
32 @ApiModelProperty(value = "处理意见") 43 @ApiModelProperty(value = "处理意见")
33 private String handleMsg; 44 private String handleMsg;
34 /**送货/供方人员签字*/ 45 @ApiModelProperty(value = "验收人员签字")
35 @ApiModelProperty(value = "送货/供方人员签字") 46 private String receiverSign;
36 private String senderSign; 47 @ApiModelProperty(value = "送货人员签字")
37 /**收货人员签字*/ 48 private String senderSign;
38 @ApiModelProperty(value = "收货人员签字")
39 private String receiverSign;
40 } 49 }
......
...@@ -25,20 +25,21 @@ import org.jeecgframework.poi.excel.annotation.Excel; ...@@ -25,20 +25,21 @@ import org.jeecgframework.poi.excel.annotation.Excel;
25 @Data 25 @Data
26 @ApiModel(value="erp_settlement数据传输对象", description="药剂结算单详情") 26 @ApiModel(value="erp_settlement数据传输对象", description="药剂结算单详情")
27 public class ErpSettlementVO extends ErpSettlement { 27 public class ErpSettlementVO extends ErpSettlement {
28 @TableField(exist=false)
29 @ApiModelProperty(value = "项目名称") 28 @ApiModelProperty(value = "项目名称")
30 private String projectName; 29 private String projectName;
31 30
32 @TableField(exist=false)
33 @ApiModelProperty(value = "供应商名称") 31 @ApiModelProperty(value = "供应商名称")
34 private String supplierName; 32 private String supplierName;
35 33
36 @TableField(exist=false)
37 @ApiModelProperty(value = "部门名称") 34 @ApiModelProperty(value = "部门名称")
38 private String departName; 35 private String departName;
39 36
40 @TableField(exist=false)
41 @ApiModelProperty(value = "结算清单") 37 @ApiModelProperty(value = "结算清单")
42 private List<ErpSettlementItem> itemList ; 38 private List<ErpSettlementItemVO> itemList ;
39
40
41 @ApiModelProperty(value = "物料结算记录")
42 private List<SparepartSettlementVO> sparepartSettlementList ;
43
43 44
44 } 45 }
......
1 package com.skua.modules.erp.vo;
2
3 import com.skua.modules.erp.entity.ErpSettlementItem;
4 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8 import lombok.experimental.Accessors;
9
10 import java.util.ArrayList;
11 import java.util.List;
12
13 @Data
14 @EqualsAndHashCode(callSuper = false)
15 @Accessors(chain = true)
16 @ApiModel(value="物料结算对象", description="物料结算对象")
17 public class SparepartSettlementVO {
18
19 @ApiModelProperty(value = "项目名称")
20 private String projectName;
21
22 @ApiModelProperty(value = "供应商名称")
23 private String supplierName;
24
25 @ApiModelProperty(value = "部门名称")
26 private String departName;
27
28
29 @ApiModelProperty(value = "合同名称")
30 private String contractName;
31 /**合同编号*/
32 @ApiModelProperty(value = "合同编号")
33 private String contractCode;
34
35
36 @ApiModelProperty(value = "药剂名称")
37 private String sparepartName;
38
39 @ApiModelProperty(value = "规格型号")
40 private String specification;
41
42 @ApiModelProperty(value = "产地")
43 private String goodOrigin;
44 @ApiModelProperty(value = "品牌")
45 private String goodBrand;
46
47 @ApiModelProperty(value = "集团名称")
48 private String jtDepartName;
49
50 @ApiModelProperty(value = "结算清单")
51 private List<ErpSettlementItemVO> itemList ;
52
53
54 public SparepartSettlementVO(){
55
56 }
57
58 public SparepartSettlementVO(String projectName,String departName, String contractCode, String sparepartName, String specification, String goodOrigin, String goodBrand) {
59 this.projectName = projectName;
60 this.contractCode = contractCode;
61 this.sparepartName = sparepartName;
62 this.specification = specification;
63 this.goodOrigin = goodOrigin;
64 this.goodBrand = goodBrand;
65 }
66
67 public void addErpSettlementItem(ErpSettlementItemVO settlementItem){
68 if(itemList == null ) itemList = new ArrayList<>();
69 itemList.add( settlementItem ) ;
70 }
71
72
73 }
...@@ -44,6 +44,7 @@ public class SysUser implements Serializable { ...@@ -44,6 +44,7 @@ public class SysUser implements Serializable {
44 /** 44 /**
45 * 密码 45 * 密码
46 */ 46 */
47
47 private String password; 48 private String password;
48 49
49 /** 50 /**
...@@ -172,7 +173,7 @@ public class SysUser implements Serializable { ...@@ -172,7 +173,7 @@ public class SysUser implements Serializable {
172 private String cid; 173 private String cid;
173 174
174 private String remark; 175 private String remark;
175 176
176 /** 177 /**
177 * 数字孪生像素流地址 178 * 数字孪生像素流地址
178 */ 179 */
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!