3d3fd299 康伟

kangwei : 会议纪要文件下载

1 个父辈 f4d0b938
...@@ -26,6 +26,7 @@ import com.skua.modules.ajh.service.IAjhMeetingSendService; ...@@ -26,6 +26,7 @@ import com.skua.modules.ajh.service.IAjhMeetingSendService;
26 import com.skua.modules.ajh.service.IAjhMeetingService; 26 import com.skua.modules.ajh.service.IAjhMeetingService;
27 27
28 import com.skua.modules.guest.util.DateUtil; 28 import com.skua.modules.guest.util.DateUtil;
29 import com.skua.modules.system.service.ISysConfigService;
29 import com.skua.modules.system.service.ISysUserService; 30 import com.skua.modules.system.service.ISysUserService;
30 import lombok.extern.slf4j.Slf4j; 31 import lombok.extern.slf4j.Slf4j;
31 32
...@@ -80,6 +81,9 @@ public class AjhMeetingMinutesController { ...@@ -80,6 +81,9 @@ public class AjhMeetingMinutesController {
80 @Autowired 81 @Autowired
81 private ISysUserService userService; 82 private ISysUserService userService;
82 83
84 @Autowired
85 private ISysConfigService sysConfigService;
86
83 87
84 /** 88 /**
85 * <pre> 89 * <pre>
...@@ -412,17 +416,20 @@ public class AjhMeetingMinutesController { ...@@ -412,17 +416,20 @@ public class AjhMeetingMinutesController {
412 416
413 //添加图片 417 //添加图片
414 // 第三部分:图片 418 // 第三部分:图片
415 File minutesimageFile = new File(minutesimage); 419 if(minutesimage != null ){
416 if(minutesimageFile.exists()){ 420 File minutesimageFile = new File(minutesimage);
417 WordImageEntity img = new WordImageEntity(); 421 if(minutesimageFile.exists()){
418 img.setType(WordImageEntity.URL); 422 WordImageEntity img = new WordImageEntity();
419 img.setUrl(minutesimage); 423 img.setType(WordImageEntity.URL);
420 //img.setUrl("https://s2.51cto.com/media/2024/blog/logo.png"); 424 img.setUrl(minutesimage);
421 img.setWidth(550); 425 //img.setUrl("https://s2.51cto.com/media/2024/blog/logo.png");
422 img.setHeight(500); 426 img.setWidth(550);
423 427 img.setHeight(500);
424 paramMap.put("meetingImg" , img); 428
429 paramMap.put("meetingImg" , img);
430 }
425 } 431 }
432
426 //导出word 433 //导出word
427 exportWordData( templatePath , exportName , paramMap ,response); 434 exportWordData( templatePath , exportName , paramMap ,response);
428 } 435 }
...@@ -440,12 +447,15 @@ public class AjhMeetingMinutesController { ...@@ -440,12 +447,15 @@ public class AjhMeetingMinutesController {
440 try { 447 try {
441 //获取word文档解析对象 448 //获取word文档解析对象
442 File file = new File(templatePath); 449 File file = new File(templatePath);
443 if(file.exists()){ 450 if( ! file.exists()){////判断文件是否存在,如果不存在使用默认模板
444 inputStream = new FileInputStream(templatePath); 451 templatePath = sysConfigService.queryValueByKey("MEETING_MINUTES_TEMPLATE_PATH");
445 }else{//判断文件是否存在,如果不存在使用默认模板 452 //file = new File(bak_templatePath);
446 Resource resource = new ClassPathResource("templates" + File.separator + "template_AjhMeetingMinutes.docx"); 453 //}else{
447 inputStream = resource.getInputStream(); 454 //inputStream = this.getClass().getResourceAsStream(File.separator +"templates" + File.separator + "template_AjhMeetingMinutes.docx");
455 //Resource resource = new ClassPathResource("templates" + File.separator + "template_AjhMeetingMinutes.docx");
456 // inputStream = resource.getInputStream();
448 } 457 }
458 inputStream = new FileInputStream(templatePath);
449 //加载模板文件 459 //加载模板文件
450 MyXWPFDocument document = new MyXWPFDocument(inputStream); 460 MyXWPFDocument document = new MyXWPFDocument(inputStream);
451 //解析07版的Word并且进行赋值 461 //解析07版的Word并且进行赋值
......
...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
22 import com.baomidou.mybatisplus.core.metadata.IPage; 22 import com.baomidou.mybatisplus.core.metadata.IPage;
23 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 23 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
24 import com.skua.modules.erp.service.IPurchaseMaterialService; 24 import com.skua.modules.erp.service.IPurchaseMaterialService;
25 import com.skua.modules.erp.vo.DistributContractVO;
25 import lombok.extern.slf4j.Slf4j; 26 import lombok.extern.slf4j.Slf4j;
26 27
27 import org.jeecgframework.poi.excel.ExcelImportUtil; 28 import org.jeecgframework.poi.excel.ExcelImportUtil;
...@@ -75,10 +76,10 @@ public class DistributContractController { ...@@ -75,10 +76,10 @@ public class DistributContractController {
75 @AutoLog(value = "erp分销合同-添加") 76 @AutoLog(value = "erp分销合同-添加")
76 @ApiOperation(value="erp分销合同-添加", notes="erp分销合同-添加") 77 @ApiOperation(value="erp分销合同-添加", notes="erp分销合同-添加")
77 @PostMapping(value = "/add") 78 @PostMapping(value = "/add")
78 public Result<DistributContract> add(@RequestBody DistributContract distributContract) { 79 public Result<DistributContractVO> add(@RequestBody DistributContractVO distributContract) {
79 Result<DistributContract> result = new Result<DistributContract>(); 80 Result<DistributContractVO> result = new Result<DistributContractVO>();
80 try { 81 try {
81 distributContractService.save(distributContract); 82 distributContractService.saveDistributContractVO(distributContract);
82 result.success("添加成功!"); 83 result.success("添加成功!");
83 } catch (Exception e) { 84 } catch (Exception e) {
84 log.error(e.getMessage(),e); 85 log.error(e.getMessage(),e);
...@@ -90,13 +91,13 @@ public class DistributContractController { ...@@ -90,13 +91,13 @@ public class DistributContractController {
90 @AutoLog(value = "erp分销合同-编辑") 91 @AutoLog(value = "erp分销合同-编辑")
91 @ApiOperation(value="erp分销合同-编辑", notes="erp分销合同-编辑") 92 @ApiOperation(value="erp分销合同-编辑", notes="erp分销合同-编辑")
92 @PutMapping(value = "/edit") 93 @PutMapping(value = "/edit")
93 public Result<DistributContract> edit(@RequestBody DistributContract distributContract) { 94 public Result<DistributContract> edit(@RequestBody DistributContractVO distributContract) {
94 Result<DistributContract> result = new Result<DistributContract>(); 95 Result<DistributContract> result = new Result<DistributContract>();
95 DistributContract distributContractEntity = distributContractService.getById(distributContract.getId()); 96 DistributContract distributContractEntity = distributContractService.getById(distributContract.getId());
96 if(distributContractEntity==null) { 97 if(distributContractEntity==null) {
97 result.error500("未找到对应实体"); 98 result.error500("未找到对应实体");
98 }else { 99 }else {
99 boolean ok = distributContractService.updateById(distributContract); 100 boolean ok = distributContractService.updateDistributContractVO(distributContract);
100 //TODO 返回false说明什么? 101 //TODO 返回false说明什么?
101 if(ok) { 102 if(ok) {
102 result.success("修改成功!"); 103 result.success("修改成功!");
...@@ -111,7 +112,7 @@ public class DistributContractController { ...@@ -111,7 +112,7 @@ public class DistributContractController {
111 @DeleteMapping(value = "/delete") 112 @DeleteMapping(value = "/delete")
112 public Result<?> delete(@RequestParam(name="id",required=true) String id) { 113 public Result<?> delete(@RequestParam(name="id",required=true) String id) {
113 try { 114 try {
114 distributContractService.removeById(id); 115 distributContractService.delById(id);
115 } catch (Exception e) { 116 } catch (Exception e) {
116 log.error("删除失败",e.getMessage()); 117 log.error("删除失败",e.getMessage());
117 return Result.error("删除失败!"); 118 return Result.error("删除失败!");
......
...@@ -96,4 +96,9 @@ public class PurchaseMaterial { ...@@ -96,4 +96,9 @@ public class PurchaseMaterial {
96 @ApiModelProperty(value = "厂站名称") 96 @ApiModelProperty(value = "厂站名称")
97 private String departName; 97 private String departName;
98 98
99 @TableField(exist=false)
100 @ApiModelProperty(value = "扩展:采购物料数量")
101 private String materialNum;
102
103
99 } 104 }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
26 <if test="goodCode != null and goodCode != ''"> 26 <if test="goodCode != null and goodCode != ''">
27 AND m.good_code like concat('%', #{goodCode}, '%') 27 AND m.good_code like concat('%', #{goodCode}, '%')
28 </if> 28 </if>
29 <if test="noticeType != null and noticeType != ''"> 29 <if test="departId != null and departId != ''">
30 AND pc.departs like concat('%', #{departId}, '%') 30 AND pc.departs like concat('%', #{departId}, '%')
31 </if> 31 </if>
32 ) aaa 32 ) aaa
...@@ -40,15 +40,17 @@ ...@@ -40,15 +40,17 @@
40 from ( 40 from (
41 select m.* from erp_purchase_material m , erp_purchase_contract pc where m.contract_id = pc.id 41 select m.* from erp_purchase_material m , erp_purchase_contract pc where m.contract_id = pc.id
42 <if test="goodCode != null and goodCode != ''"> 42 <if test="goodCode != null and goodCode != ''">
43 AND m.good_code like concat('%', #{goodCode}, '%') 43 AND m.good_code like concat('', #{goodCode}, '%')
44 </if> 44 </if>
45 <if test="noticeType != null and noticeType != ''"> 45 <if test="departId != null and departId != ''">
46 AND pc.departs like concat('%', #{departId}, '%') 46 AND pc.departs like concat('%', #{departId}, '%')
47 </if> 47 </if>
48 limit 1
48 ) aaa 49 ) aaa
49 left join equipment_sparepart_supplies ss on aaa.sparepart_id = ss.id 50 left join equipment_sparepart_supplies ss on aaa.sparepart_id = ss.id
50 left join equipment_sparepart_type st on st.id = aaa.sparepart_type 51 left join equipment_sparepart_type st on st.id = aaa.sparepart_type
51 left join ajh_supplier_manage sm on sm.id = aaa.supplier_id 52 left join ajh_supplier_manage sm on sm.id = aaa.supplier_id
53
52 </select> 54 </select>
53 55
54 56
......
...@@ -10,8 +10,12 @@ ...@@ -10,8 +10,12 @@
10 pp.id = pi.plan_id 10 pp.id = pi.plan_id
11 <if test="ev.sparepartType != null and ev.sparepartType != '' "> 11 <if test="ev.sparepartType != null and ev.sparepartType != '' ">
12 and pi.sparepart_type = #{ev.sparepartType} 12 and pi.sparepart_type = #{ev.sparepartType}
13 </if> <if test="ev.sparepartName != null and ev.sparepartName != '' "> 13 </if>
14 AND pi.sparepart_name like concat('%', #{ev.sparepartName}, '%') 14 <if test="ev.sparepartCode != null and ev.sparepartCode != '' ">
15 AND pi.sparepart_code like concat('%', #{ev.sparepartCode}, '%')
16 </if>
17 <if test="ev.sparepartName != null and ev.sparepartName != '' ">
18 AND pi.sparepart_name like concat('%', #{ev.sparepartName}, '%')
15 </if> 19 </if>
16 <if test="ev.applyYear != null and ev.applyYear != '' "> 20 <if test="ev.applyYear != null and ev.applyYear != '' ">
17 and pp.apply_year = #{ev.applyYear} 21 and pp.apply_year = #{ev.applyYear}
...@@ -28,7 +32,7 @@ ...@@ -28,7 +32,7 @@
28 group by pi.sparepart_id 32 group by pi.sparepart_id
29 )aaa 33 )aaa
30 left join equipment_sparepart_supplies ss on aaa.sparepart_id = ss.id 34 left join equipment_sparepart_supplies ss on aaa.sparepart_id = ss.id
31 left join equipment_sparepart_type st on st.id = aaa.sparepart_type 35 left join equipment_sparepart_type st on st.id = ss.sparepart_type
32 36
33 </select> 37 </select>
34 38
......
...@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5 import com.skua.modules.erp.entity.PurchaseMaterial; 5 import com.skua.modules.erp.entity.PurchaseMaterial;
6 import com.skua.modules.erp.mapper.PurchaseMaterialMapper; 6 import com.skua.modules.erp.mapper.PurchaseMaterialMapper;
7 import com.skua.modules.erp.service.IPurchaseMaterialService; 7 import com.skua.modules.erp.service.IPurchaseMaterialService;
8 import com.skua.modules.erp.vo.PurchasePlanSearchVO;
9 import org.springframework.stereotype.Service; 8 import org.springframework.stereotype.Service;
10 9
11 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 10 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......
...@@ -25,10 +25,12 @@ public class PurchasePlanSearchVO { ...@@ -25,10 +25,12 @@ public class PurchasePlanSearchVO {
25 @ApiModelProperty(value = "物料编号") 25 @ApiModelProperty(value = "物料编号")
26 public String sparepartId; 26 public String sparepartId;
27 27
28 @ApiModelProperty(value = "物料Code")
29 public String sparepartCode;
30
28 @ApiModelProperty(value = "权限下的部门编号集合") 31 @ApiModelProperty(value = "权限下的部门编号集合")
29 private String departs; 32 private String departs;
30 33
31
32 @ApiModelProperty(value = "开始时间") 34 @ApiModelProperty(value = "开始时间")
33 private String startTime; 35 private String startTime;
34 36
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!