kangwei : 药剂入库相关接口
健康档案接口 安环目标接口
正在显示
21 个修改的文件
包含
895 行增加
和
25 行删除
... | @@ -85,10 +85,10 @@ | ... | @@ -85,10 +85,10 @@ |
85 | </exclusions> | 85 | </exclusions> |
86 | </dependency> | 86 | </dependency> |
87 | <!-- online form --> | 87 | <!-- online form --> |
88 | <dependency> | 88 | <!--<dependency> |
89 | <groupId>org.springframework.integration</groupId> | 89 | <groupId>org.springframework.integration</groupId> |
90 | <artifactId>spring-integration-mqtt</artifactId> | 90 | <artifactId>spring-integration-mqtt</artifactId> |
91 | </dependency> | 91 | </dependency>--> |
92 | <!-- 节假日 start --> | 92 | <!-- 节假日 start --> |
93 | <dependency> | 93 | <dependency> |
94 | <groupId>net.sourceforge.htmlunit</groupId> | 94 | <groupId>net.sourceforge.htmlunit</groupId> | ... | ... |
... | @@ -75,7 +75,7 @@ public class DistributContractController { | ... | @@ -75,7 +75,7 @@ public class DistributContractController { |
75 | 75 | ||
76 | 76 | ||
77 | @AutoLog(value = "erp分销合同-列表查询") | 77 | @AutoLog(value = "erp分销合同-列表查询") |
78 | @ApiOperation(value="erp分销合同-分页列表查询", notes="erp分销合同-分页列表查询") | 78 | @ApiOperation(value="erp分销合同-列表查询", notes="erp分销合同-列表查询") |
79 | @GetMapping(value = "/disContractList") | 79 | @GetMapping(value = "/disContractList") |
80 | public Result<List<DistributContract>> queryPageList(DistributContract distributContract, | 80 | public Result<List<DistributContract>> queryPageList(DistributContract distributContract, |
81 | HttpServletRequest req) { | 81 | HttpServletRequest req) { | ... | ... |
... | @@ -94,9 +94,18 @@ public class MaterialAcceptanceFormController { | ... | @@ -94,9 +94,18 @@ public class MaterialAcceptanceFormController { |
94 | public Result<MaterialAcceptanceForm> add(@RequestBody MaterialAcceptanceForm materialAcceptanceForm) { | 94 | public Result<MaterialAcceptanceForm> add(@RequestBody MaterialAcceptanceForm materialAcceptanceForm) { |
95 | Result<MaterialAcceptanceForm> result = new Result<MaterialAcceptanceForm>(); | 95 | Result<MaterialAcceptanceForm> result = new Result<MaterialAcceptanceForm>(); |
96 | try { | 96 | try { |
97 | materialAcceptanceForm.setConfirmStatus("1"); | 97 | /*materialAcceptanceForm.setConfirmStatus("1"); |
98 | if(StringUtils.isNotBlank(materialAcceptanceForm.getSenderSign()) && StringUtils.isNotBlank(materialAcceptanceForm.getReceiverSign()) ){ | 98 | if(StringUtils.isNotBlank(materialAcceptanceForm.getSenderSign()) && StringUtils.isNotBlank(materialAcceptanceForm.getReceiverSign()) ){ |
99 | materialAcceptanceForm.setConfirmStatus("2"); | 99 | materialAcceptanceForm.setConfirmStatus("2"); |
100 | }*/ | ||
101 | if(StringUtils.isNotBlank(materialAcceptanceForm.getReceiverSign())){ | ||
102 | materialAcceptanceForm.setConfirmStatus("1"); | ||
103 | } | ||
104 | if(StringUtils.isNotBlank(materialAcceptanceForm.getSenderSign())){ | ||
105 | materialAcceptanceForm.setConfirmStatus("2"); | ||
106 | } | ||
107 | if(StringUtils.isNotBlank(materialAcceptanceForm.getSenderSign()) && StringUtils.isNotBlank(materialAcceptanceForm.getReceiverSign()) ){ | ||
108 | materialAcceptanceForm.setConfirmStatus("9"); | ||
100 | } | 109 | } |
101 | materialAcceptanceFormService.save(materialAcceptanceForm); | 110 | materialAcceptanceFormService.save(materialAcceptanceForm); |
102 | result.success("添加成功!"); | 111 | result.success("添加成功!"); |
... | @@ -120,16 +129,26 @@ public class MaterialAcceptanceFormController { | ... | @@ -120,16 +129,26 @@ public class MaterialAcceptanceFormController { |
120 | @PutMapping(value = "/edit") | 129 | @PutMapping(value = "/edit") |
121 | public Result<MaterialAcceptanceForm> edit(@RequestBody MaterialAcceptanceForm materialAcceptanceForm) { | 130 | public Result<MaterialAcceptanceForm> edit(@RequestBody MaterialAcceptanceForm materialAcceptanceForm) { |
122 | Result<MaterialAcceptanceForm> result = new Result<MaterialAcceptanceForm>(); | 131 | Result<MaterialAcceptanceForm> result = new Result<MaterialAcceptanceForm>(); |
132 | /* */ | ||
133 | if(StringUtils.isNotBlank(materialAcceptanceForm.getReceiverSign())){ | ||
134 | materialAcceptanceForm.setConfirmStatus("1"); | ||
135 | } | ||
136 | if(StringUtils.isNotBlank(materialAcceptanceForm.getSenderSign())){ | ||
137 | materialAcceptanceForm.setConfirmStatus("2"); | ||
138 | } | ||
139 | if(StringUtils.isNotBlank(materialAcceptanceForm.getSenderSign()) && StringUtils.isNotBlank(materialAcceptanceForm.getReceiverSign()) ){ | ||
140 | materialAcceptanceForm.setConfirmStatus("9"); | ||
141 | } | ||
123 | MaterialAcceptanceForm materialAcceptanceFormEntity = materialAcceptanceFormService.getById(materialAcceptanceForm.getId()); | 142 | MaterialAcceptanceForm materialAcceptanceFormEntity = materialAcceptanceFormService.getById(materialAcceptanceForm.getId()); |
124 | if(materialAcceptanceFormEntity==null) { | 143 | if(materialAcceptanceFormEntity==null) { |
125 | result.error500("未找到对应实体"); | 144 | //result.error500("未找到对应实体"); |
145 | materialAcceptanceFormService.save(materialAcceptanceForm); | ||
126 | }else { | 146 | }else { |
127 | boolean ok = materialAcceptanceFormService.updateById(materialAcceptanceForm); | 147 | materialAcceptanceFormService.updateById(materialAcceptanceForm); |
148 | } | ||
149 | |||
128 | //TODO 返回false说明什么? | 150 | //TODO 返回false说明什么? |
129 | if(ok) { | ||
130 | result.success("修改成功!"); | 151 | result.success("修改成功!"); |
131 | } | ||
132 | } | ||
133 | return result; | 152 | return result; |
134 | } | 153 | } |
135 | 154 | ||
... | @@ -171,11 +190,12 @@ public class MaterialAcceptanceFormController { | ... | @@ -171,11 +190,12 @@ public class MaterialAcceptanceFormController { |
171 | Result<MaterialAcceptanceForm> result = new Result<MaterialAcceptanceForm>(); | 190 | Result<MaterialAcceptanceForm> result = new Result<MaterialAcceptanceForm>(); |
172 | MaterialAcceptanceForm materialAcceptanceForm = materialAcceptanceFormService.getById(id); | 191 | MaterialAcceptanceForm materialAcceptanceForm = materialAcceptanceFormService.getById(id); |
173 | if(materialAcceptanceForm==null) { | 192 | if(materialAcceptanceForm==null) { |
174 | result.error500("未找到对应实体"); | 193 | //result.error500("未找到对应实体"); |
175 | }else { | 194 | materialAcceptanceForm = new MaterialAcceptanceForm(); |
195 | materialAcceptanceForm.setId(id); | ||
196 | } | ||
176 | result.setResult(materialAcceptanceForm); | 197 | result.setResult(materialAcceptanceForm); |
177 | result.setSuccess(true); | 198 | result.setSuccess(true); |
178 | } | ||
179 | return result; | 199 | return result; |
180 | } | 200 | } |
181 | @AutoLog(value = "erp--物料验收单-送货/供方人员签字") | 201 | @AutoLog(value = "erp--物料验收单-送货/供方人员签字") |
... | @@ -187,10 +207,7 @@ public class MaterialAcceptanceFormController { | ... | @@ -187,10 +207,7 @@ public class MaterialAcceptanceFormController { |
187 | if(materialAcceptanceFormEntity==null) { | 207 | if(materialAcceptanceFormEntity==null) { |
188 | result.error500("未找到对应实体"); | 208 | result.error500("未找到对应实体"); |
189 | }else { | 209 | }else { |
190 | acceptanceForm.setConfirmStatus("1"); | ||
191 | if(StringUtils.isNotBlank(acceptanceForm.getSenderSign()) && StringUtils.isNotBlank(acceptanceForm.getReceiverSign()) ){ | ||
192 | acceptanceForm.setConfirmStatus("2"); | 210 | acceptanceForm.setConfirmStatus("2"); |
193 | } | ||
194 | boolean ok = materialAcceptanceFormService.updateById(acceptanceForm); | 211 | boolean ok = materialAcceptanceFormService.updateById(acceptanceForm); |
195 | //TODO 返回false说明什么? | 212 | //TODO 返回false说明什么? |
196 | if(ok) { | 213 | if(ok) { |
... | @@ -209,9 +226,6 @@ public class MaterialAcceptanceFormController { | ... | @@ -209,9 +226,6 @@ public class MaterialAcceptanceFormController { |
209 | result.error500("未找到对应实体"); | 226 | result.error500("未找到对应实体"); |
210 | }else { | 227 | }else { |
211 | acceptanceForm.setConfirmStatus("1"); | 228 | acceptanceForm.setConfirmStatus("1"); |
212 | if(StringUtils.isNotBlank(acceptanceForm.getSenderSign()) && StringUtils.isNotBlank(acceptanceForm.getReceiverSign()) ){ | ||
213 | acceptanceForm.setConfirmStatus("2"); | ||
214 | } | ||
215 | boolean ok = materialAcceptanceFormService.updateById(acceptanceForm); | 229 | boolean ok = materialAcceptanceFormService.updateById(acceptanceForm); |
216 | //TODO 返回false说明什么? | 230 | //TODO 返回false说明什么? |
217 | if(ok) { | 231 | if(ok) { | ... | ... |
... | @@ -81,7 +81,21 @@ public class MaterialINController { | ... | @@ -81,7 +81,21 @@ public class MaterialINController { |
81 | result.setResult(pageList); | 81 | result.setResult(pageList); |
82 | return result; | 82 | return result; |
83 | } | 83 | } |
84 | 84 | @AutoLog(value = "erp--物料(药剂)入库-集团审核列表") | |
85 | @ApiOperation(value="erp--物料(药剂)入库-集团审核列表", notes="erp--物料(药剂)入库-集团审核列表") | ||
86 | @GetMapping(value = "/handleList") | ||
87 | public Result<IPage<MaterialIN>> handleList(MaterialIN materialIN, | ||
88 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | ||
89 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | ||
90 | HttpServletRequest req) { | ||
91 | Result<IPage<MaterialIN>> result = new Result<IPage<MaterialIN>>(); | ||
92 | QueryWrapper<MaterialIN> queryWrapper = QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap()); | ||
93 | Page<MaterialIN> page = new Page<MaterialIN>(pageNo, pageSize); | ||
94 | IPage<MaterialIN> pageList = materialINService.page(page, queryWrapper); | ||
95 | result.setSuccess(true); | ||
96 | result.setResult(pageList); | ||
97 | return result; | ||
98 | } | ||
85 | /** | 99 | /** |
86 | * <pre> | 100 | * <pre> |
87 | * 添加 | 101 | * 添加 | ... | ... |
... | @@ -57,7 +57,23 @@ public class PurchaseContractController { | ... | @@ -57,7 +57,23 @@ public class PurchaseContractController { |
57 | result.setResult(pageList); | 57 | result.setResult(pageList); |
58 | return result; | 58 | return result; |
59 | } | 59 | } |
60 | @AutoLog(value = "erp采购合同-集团审核列表") | ||
61 | @ApiOperation(value="erp采购合同-集团审核列表", notes="erp采购合同-集团审核列表") | ||
62 | @GetMapping(value = "/handleList") | ||
63 | public Result<IPage<ERPPurchaseContract>> handleList(ERPPurchaseContract ERPPurchaseContract, | ||
64 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | ||
65 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | ||
66 | HttpServletRequest req) { | ||
67 | Result<IPage<ERPPurchaseContract>> result = new Result<IPage<ERPPurchaseContract>>(); | ||
68 | QueryWrapper<ERPPurchaseContract> queryWrapper = QueryGenerator.initQueryWrapper(ERPPurchaseContract, req.getParameterMap()); | ||
69 | Page<ERPPurchaseContract> page = new Page<ERPPurchaseContract>(pageNo, pageSize); | ||
60 | 70 | ||
71 | // 需要添加条件判断 | ||
72 | IPage<ERPPurchaseContract> pageList = purchaseContractService.page(page, queryWrapper); | ||
73 | result.setSuccess(true); | ||
74 | result.setResult(pageList); | ||
75 | return result; | ||
76 | } | ||
61 | 77 | ||
62 | @AutoLog(value = "erp采购合同-有权限的采购合同集合") | 78 | @AutoLog(value = "erp采购合同-有权限的采购合同集合") |
63 | @ApiOperation(value="erp采购合同-有权限的采购合同集合", notes="erp采购合同-有权限的采购合同集合") | 79 | @ApiOperation(value="erp采购合同-有权限的采购合同集合", notes="erp采购合同-有权限的采购合同集合") | ... | ... |
... | @@ -58,9 +58,8 @@ public class MaterialAcceptanceForm { | ... | @@ -58,9 +58,8 @@ public class MaterialAcceptanceForm { |
58 | @Excel(name = "收货人员签字", width = 15) | 58 | @Excel(name = "收货人员签字", width = 15) |
59 | @ApiModelProperty(value = "收货人员签字") | 59 | @ApiModelProperty(value = "收货人员签字") |
60 | private String receiverSign; | 60 | private String receiverSign; |
61 | /**确认状态 0 未确认、1 部分确认、2全部确认*/ | ||
62 | @Excel(name = "确认状态 0 未确认、1 部分确认、2全部确认", width = 15) | 61 | @Excel(name = "确认状态 0 未确认、1 部分确认、2全部确认", width = 15) |
63 | @ApiModelProperty(value = "确认状态 0 未确认、1 部分确认、2全部确认") | 62 | @ApiModelProperty(value = "确认状态 0 未确认、1 收货签字、2 送货方签字 、9 全部确认") |
64 | @Dict( dicCode="purchase_confirm_status") | 63 | @Dict( dicCode="purchase_confirm_status") |
65 | private String confirmStatus; | 64 | private String confirmStatus; |
66 | /**分享地址*/ | 65 | /**分享地址*/ | ... | ... |
... | @@ -62,17 +62,19 @@ public class MaterialIN { | ... | @@ -62,17 +62,19 @@ public class MaterialIN { |
62 | 62 | ||
63 | @Excel(name = "物料类别", width = 15) | 63 | @Excel(name = "物料类别", width = 15) |
64 | @ApiModelProperty(value = "物料类别") | 64 | @ApiModelProperty(value = "物料类别") |
65 | @Dict(dictTable = "equipment_sparepart_type", dicCode="id", dicText = "item_text") | ||
65 | private String sparepartType; | 66 | private String sparepartType; |
66 | /**物料编号*/ | 67 | /**物料编号*/ |
67 | @Excel(name = "物料编号", width = 15) | 68 | @Excel(name = "物料编号", width = 15) |
68 | @ApiModelProperty(value = "物料编号") | 69 | @ApiModelProperty(value = "物料编号") |
70 | @Dict(dictTable = "equipment_sparepart_supplies", dicCode="id", dicText = "sparepart_name") | ||
69 | private String sparepartId; | 71 | private String sparepartId; |
70 | /**药剂(物料)名称*/ | 72 | /**药剂(物料)名称*/ |
71 | @Excel(name = "药剂(物料)名称", width = 15) | 73 | @Excel(name = "药剂(物料)名称", width = 15) |
72 | @ApiModelProperty(value = "药剂(物料)名称") | 74 | @ApiModelProperty(value = "药剂(物料)名称") |
73 | private String sparepartName; | 75 | private String sparepartName; |
74 | 76 | ||
75 | @ApiModelProperty(value = "物料类别") | 77 | @ApiModelProperty(value = "物料编码") |
76 | private String sparepartCode; | 78 | private String sparepartCode; |
77 | /**规格型号*/ | 79 | /**规格型号*/ |
78 | @Excel(name = "规格型号", width = 15) | 80 | @Excel(name = "规格型号", width = 15) |
... | @@ -85,11 +87,12 @@ public class MaterialIN { | ... | @@ -85,11 +87,12 @@ public class MaterialIN { |
85 | /**数量*/ | 87 | /**数量*/ |
86 | @Excel(name = "数量", width = 15) | 88 | @Excel(name = "数量", width = 15) |
87 | @ApiModelProperty(value = "数量") | 89 | @ApiModelProperty(value = "数量") |
88 | private String materialNum; | 90 | private String purchaseNum; |
89 | 91 | ||
90 | /**供应商编号*/ | 92 | /**供应商编号*/ |
91 | @Excel(name = "供应商编号", width = 15) | 93 | @Excel(name = "供应商编号", width = 15) |
92 | @ApiModelProperty(value = "供应商编号") | 94 | @ApiModelProperty(value = "供应商编号") |
95 | @Dict(dictTable = "equipment_sparepart_supplies", dicCode="id", dicText = "sparepart_name") | ||
93 | private String supplierId; | 96 | private String supplierId; |
94 | /**货号*/ | 97 | /**货号*/ |
95 | @Excel(name = "货号", width = 15) | 98 | @Excel(name = "货号", width = 15) | ... | ... |
sk-module-biz/src/main/java/com/skua/modules/safe/controller/EnvironmentTargetController.java
0 → 100644
1 | package com.skua.modules.safe.controller; | ||
2 | |||
3 | import java.util.Arrays; | ||
4 | import java.util.List; | ||
5 | import java.util.Map; | ||
6 | import java.io.IOException; | ||
7 | import java.io.UnsupportedEncodingException; | ||
8 | import java.net.URLDecoder; | ||
9 | import javax.servlet.http.HttpServletRequest; | ||
10 | import javax.servlet.http.HttpServletResponse; | ||
11 | import com.skua.core.api.vo.Result; | ||
12 | import com.skua.core.aspect.annotation.AutoLog; | ||
13 | import com.skua.core.query.QueryGenerator; | ||
14 | import com.skua.core.util.ConvertUtils; | ||
15 | import com.skua.modules.safe.entity.EnvironmentTarget; | ||
16 | import com.skua.modules.safe.service.IEnvironmentTargetService; | ||
17 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
18 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
19 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
20 | import lombok.extern.slf4j.Slf4j; | ||
21 | |||
22 | import org.jeecgframework.poi.excel.ExcelImportUtil; | ||
23 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; | ||
24 | import org.jeecgframework.poi.excel.entity.ExportParams; | ||
25 | import org.jeecgframework.poi.excel.entity.ImportParams; | ||
26 | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; | ||
27 | |||
28 | import org.springframework.beans.factory.annotation.Autowired; | ||
29 | import org.springframework.web.bind.annotation.*; | ||
30 | import org.springframework.web.multipart.MultipartFile; | ||
31 | import org.springframework.web.multipart.MultipartHttpServletRequest; | ||
32 | import org.springframework.web.servlet.ModelAndView; | ||
33 | import com.alibaba.fastjson.JSON; | ||
34 | import io.swagger.annotations.Api; | ||
35 | import io.swagger.annotations.ApiOperation; | ||
36 | |||
37 | /** | ||
38 | * <pre> | ||
39 | * 安环环保目标 | ||
40 | * </pre> | ||
41 | * @author 开发者姓名 | ||
42 | * @version V0.1, 开发时间 | ||
43 | */ | ||
44 | @Slf4j | ||
45 | @Api(tags="安环环保目标") | ||
46 | @RestController("webEnvironmentTargetController") | ||
47 | @RequestMapping("/web/safe/environmentTarget") | ||
48 | public class EnvironmentTargetController { | ||
49 | @Autowired | ||
50 | private IEnvironmentTargetService environmentTargetService; | ||
51 | |||
52 | /** | ||
53 | * <pre> | ||
54 | * 分页列表查询 | ||
55 | * </pre> | ||
56 | * @param environmentTarget | ||
57 | * @param pageNo | ||
58 | * @param pageSize | ||
59 | * @param req | ||
60 | * @return | ||
61 | * @author 开发者姓名, 开发时间 | ||
62 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
63 | */ | ||
64 | |||
65 | @AutoLog(value = "安环环保目标-分页列表查询") | ||
66 | @ApiOperation(value="安环环保目标-分页列表查询", notes="安环环保目标-分页列表查询") | ||
67 | @GetMapping(value = "/list") | ||
68 | public Result<IPage<EnvironmentTarget>> queryPageList(EnvironmentTarget environmentTarget, | ||
69 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | ||
70 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | ||
71 | HttpServletRequest req) { | ||
72 | Result<IPage<EnvironmentTarget>> result = new Result<IPage<EnvironmentTarget>>(); | ||
73 | QueryWrapper<EnvironmentTarget> queryWrapper = QueryGenerator.initQueryWrapper(environmentTarget, req.getParameterMap()); | ||
74 | Page<EnvironmentTarget> page = new Page<EnvironmentTarget>(pageNo, pageSize); | ||
75 | //queryWrapper.eq("depart_id", BaseContextHandler.getRealDepartId()); | ||
76 | /*if(environmentTarget.getDepartId() == null ){ | ||
77 | queryWrapper.in("depart_id", BaseContextHandler.getDeparts().split(",")); | ||
78 | }*/ | ||
79 | |||
80 | IPage<EnvironmentTarget> pageList = environmentTargetService.page(page, queryWrapper); | ||
81 | result.setSuccess(true); | ||
82 | result.setResult(pageList); | ||
83 | return result; | ||
84 | } | ||
85 | |||
86 | /** | ||
87 | * <pre> | ||
88 | * 添加 | ||
89 | * </pre> | ||
90 | * @param environmentTarget | ||
91 | * @return | ||
92 | * @author 开发者姓名, 开发时间 | ||
93 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
94 | */ | ||
95 | @AutoLog(value = "安环环保目标-添加") | ||
96 | @ApiOperation(value="安环环保目标-添加", notes="安环环保目标-添加") | ||
97 | @PostMapping(value = "/add") | ||
98 | public Result<EnvironmentTarget> add(@RequestBody EnvironmentTarget environmentTarget) { | ||
99 | Result<EnvironmentTarget> result = new Result<EnvironmentTarget>(); | ||
100 | try { | ||
101 | environmentTargetService.save(environmentTarget); | ||
102 | result.success("添加成功!"); | ||
103 | } catch (Exception e) { | ||
104 | log.error(e.getMessage(),e); | ||
105 | result.error500("操作失败"); | ||
106 | } | ||
107 | return result; | ||
108 | } | ||
109 | /** | ||
110 | * <pre> | ||
111 | * 编辑 | ||
112 | * </pre> | ||
113 | * @param environmentTarget | ||
114 | * @return | ||
115 | * @author 开发者姓名, 开发时间 | ||
116 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
117 | */ | ||
118 | @AutoLog(value = "安环环保目标-编辑") | ||
119 | @ApiOperation(value="安环环保目标-编辑", notes="安环环保目标-编辑") | ||
120 | @PutMapping(value = "/edit") | ||
121 | public Result<EnvironmentTarget> edit(@RequestBody EnvironmentTarget environmentTarget) { | ||
122 | Result<EnvironmentTarget> result = new Result<EnvironmentTarget>(); | ||
123 | EnvironmentTarget environmentTargetEntity = environmentTargetService.getById(environmentTarget.getId()); | ||
124 | if(environmentTargetEntity==null) { | ||
125 | result.error500("未找到对应实体"); | ||
126 | }else { | ||
127 | boolean ok = environmentTargetService.updateById(environmentTarget); | ||
128 | //TODO 返回false说明什么? | ||
129 | if(ok) { | ||
130 | result.success("修改成功!"); | ||
131 | } | ||
132 | } | ||
133 | |||
134 | return result; | ||
135 | } | ||
136 | /** | ||
137 | * <pre> | ||
138 | * 通过id删除 | ||
139 | * </pre> | ||
140 | * @param id | ||
141 | * @return | ||
142 | * @author 开发者姓名, 开发时间 | ||
143 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
144 | */ | ||
145 | @AutoLog(value = "安环环保目标-通过id删除") | ||
146 | @ApiOperation(value="安环环保目标-通过id删除", notes="安环环保目标-通过id删除") | ||
147 | @DeleteMapping(value = "/delete") | ||
148 | public Result<?> delete(@RequestParam(name="id",required=true) String id) { | ||
149 | try { | ||
150 | environmentTargetService.removeById(id); | ||
151 | } catch (Exception e) { | ||
152 | log.error("删除失败",e.getMessage()); | ||
153 | return Result.error("删除失败!"); | ||
154 | } | ||
155 | return Result.ok("删除成功!"); | ||
156 | } | ||
157 | |||
158 | /** | ||
159 | * <pre> | ||
160 | * 批量删除 | ||
161 | * </pre> | ||
162 | * @param ids | ||
163 | * @return | ||
164 | * @author 开发者姓名, 开发时间 | ||
165 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
166 | */ | ||
167 | @AutoLog(value = "安环环保目标-批量删除") | ||
168 | @ApiOperation(value="安环环保目标-批量删除", notes="安环环保目标-批量删除") | ||
169 | @DeleteMapping(value = "/deleteBatch") | ||
170 | public Result<EnvironmentTarget> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | ||
171 | Result<EnvironmentTarget> result = new Result<EnvironmentTarget>(); | ||
172 | if(ids==null || "".equals(ids.trim())) { | ||
173 | result.error500("参数不识别!"); | ||
174 | }else { | ||
175 | this.environmentTargetService.removeByIds(Arrays.asList(ids.split(","))); | ||
176 | result.success("删除成功!"); | ||
177 | } | ||
178 | return result; | ||
179 | } | ||
180 | /** | ||
181 | * <pre> | ||
182 | * 通过id查询 | ||
183 | * </pre> | ||
184 | * @param id | ||
185 | * @return | ||
186 | * @author 开发者姓名, 开发时间 | ||
187 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
188 | */ | ||
189 | @AutoLog(value = "安环环保目标-通过id查询") | ||
190 | @ApiOperation(value="安环环保目标-通过id查询", notes="安环环保目标-通过id查询") | ||
191 | @GetMapping(value = "/queryById") | ||
192 | public Result<EnvironmentTarget> queryById(@RequestParam(name="id",required=true) String id) { | ||
193 | Result<EnvironmentTarget> result = new Result<EnvironmentTarget>(); | ||
194 | EnvironmentTarget environmentTarget = environmentTargetService.getById(id); | ||
195 | if(environmentTarget==null) { | ||
196 | result.error500("未找到对应实体"); | ||
197 | }else { | ||
198 | result.setResult(environmentTarget); | ||
199 | result.setSuccess(true); | ||
200 | } | ||
201 | return result; | ||
202 | } | ||
203 | |||
204 | /** | ||
205 | * <pre> | ||
206 | * 导出excel | ||
207 | * </pre> | ||
208 | * @param request | ||
209 | * @param response | ||
210 | * @return | ||
211 | * @author 开发者姓名, 开发时间 | ||
212 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
213 | */ | ||
214 | |||
215 | @RequestMapping(value = "/exportXls") | ||
216 | public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) { | ||
217 | // Step.1 组装查询条件 | ||
218 | QueryWrapper<EnvironmentTarget> queryWrapper = null; | ||
219 | try { | ||
220 | String paramsStr = request.getParameter("paramsStr"); | ||
221 | if (ConvertUtils.isNotEmpty(paramsStr)) { | ||
222 | String deString = URLDecoder.decode(paramsStr, "UTF-8"); | ||
223 | EnvironmentTarget environmentTarget = JSON.parseObject(deString, EnvironmentTarget.class); | ||
224 | queryWrapper = QueryGenerator.initQueryWrapper(environmentTarget, request.getParameterMap()); | ||
225 | } | ||
226 | } catch (UnsupportedEncodingException e) { | ||
227 | e.printStackTrace(); | ||
228 | } | ||
229 | |||
230 | //Step.2 AutoPoi 导出Excel | ||
231 | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); | ||
232 | List<EnvironmentTarget> pageList = environmentTargetService.list(queryWrapper); | ||
233 | //导出文件名称 | ||
234 | mv.addObject(NormalExcelConstants.FILE_NAME, "安环环保目标列表"); | ||
235 | mv.addObject(NormalExcelConstants.CLASS, EnvironmentTarget.class); | ||
236 | mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("安环环保目标列表数据", "导出人:Jeecg", "导出信息")); | ||
237 | mv.addObject(NormalExcelConstants.DATA_LIST, pageList); | ||
238 | return mv; | ||
239 | } | ||
240 | |||
241 | /** | ||
242 | * <pre> | ||
243 | * 通过excel导入数据 | ||
244 | * </pre> | ||
245 | * @param request | ||
246 | * @param response | ||
247 | * @return | ||
248 | * @author 开发者姓名, 开发时间 | ||
249 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
250 | */ | ||
251 | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) | ||
252 | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | ||
253 | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; | ||
254 | Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); | ||
255 | for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { | ||
256 | MultipartFile file = entity.getValue();// 获取上传文件对象 | ||
257 | ImportParams params = new ImportParams(); | ||
258 | params.setTitleRows(2); | ||
259 | params.setHeadRows(1); | ||
260 | params.setNeedSave(true); | ||
261 | try { | ||
262 | List<EnvironmentTarget> listEnvironmentTargets = ExcelImportUtil.importExcel(file.getInputStream(), EnvironmentTarget.class, params); | ||
263 | environmentTargetService.saveBatch(listEnvironmentTargets); | ||
264 | return Result.ok("文件导入成功!数据行数:" + listEnvironmentTargets.size()); | ||
265 | } catch (Exception e) { | ||
266 | log.error(e.getMessage(),e); | ||
267 | return Result.error("文件导入失败:"+e.getMessage()); | ||
268 | } finally { | ||
269 | try { | ||
270 | file.getInputStream().close(); | ||
271 | } catch (IOException e) { | ||
272 | e.printStackTrace(); | ||
273 | } | ||
274 | } | ||
275 | } | ||
276 | return Result.ok("文件导入失败!"); | ||
277 | } | ||
278 | |||
279 | } |
sk-module-biz/src/main/java/com/skua/modules/safe/controller/HealthRecordsController.java
0 → 100644
1 | package com.skua.modules.safe.controller; | ||
2 | |||
3 | import java.util.Arrays; | ||
4 | import java.util.List; | ||
5 | import java.util.Map; | ||
6 | import java.io.IOException; | ||
7 | import java.io.UnsupportedEncodingException; | ||
8 | import java.net.URLDecoder; | ||
9 | import javax.servlet.http.HttpServletRequest; | ||
10 | import javax.servlet.http.HttpServletResponse; | ||
11 | import com.skua.core.api.vo.Result; | ||
12 | import com.skua.core.aspect.annotation.AutoLog; | ||
13 | import com.skua.core.context.BaseContextHandler; | ||
14 | import com.skua.core.query.QueryGenerator; | ||
15 | import com.skua.core.util.ConvertUtils; | ||
16 | import com.skua.modules.safe.entity.HealthRecords; | ||
17 | import com.skua.modules.safe.service.IHealthRecordsService; | ||
18 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
19 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
20 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
21 | import lombok.extern.slf4j.Slf4j; | ||
22 | |||
23 | import org.jeecgframework.poi.excel.ExcelImportUtil; | ||
24 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; | ||
25 | import org.jeecgframework.poi.excel.entity.ExportParams; | ||
26 | import org.jeecgframework.poi.excel.entity.ImportParams; | ||
27 | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; | ||
28 | |||
29 | import org.springframework.beans.factory.annotation.Autowired; | ||
30 | import org.springframework.web.bind.annotation.*; | ||
31 | import org.springframework.web.multipart.MultipartFile; | ||
32 | import org.springframework.web.multipart.MultipartHttpServletRequest; | ||
33 | import org.springframework.web.servlet.ModelAndView; | ||
34 | import com.alibaba.fastjson.JSON; | ||
35 | import io.swagger.annotations.Api; | ||
36 | import io.swagger.annotations.ApiOperation; | ||
37 | |||
38 | /** | ||
39 | * <pre> | ||
40 | * 健康档案 | ||
41 | * </pre> | ||
42 | * @author 开发者姓名 | ||
43 | * @version V0.1, 开发时间 | ||
44 | */ | ||
45 | @Slf4j | ||
46 | @Api(tags="健康档案") | ||
47 | @RestController("webHealthRecordsController") | ||
48 | @RequestMapping("/web/safe/healthRecords") | ||
49 | public class HealthRecordsController { | ||
50 | @Autowired | ||
51 | private IHealthRecordsService healthRecordsService; | ||
52 | |||
53 | /** | ||
54 | * <pre> | ||
55 | * 分页列表查询 | ||
56 | * </pre> | ||
57 | * @param healthRecords | ||
58 | * @param pageNo | ||
59 | * @param pageSize | ||
60 | * @param req | ||
61 | * @return | ||
62 | * @author 开发者姓名, 开发时间 | ||
63 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
64 | */ | ||
65 | |||
66 | @AutoLog(value = "健康档案-分页列表查询") | ||
67 | @ApiOperation(value="健康档案-分页列表查询", notes="健康档案-分页列表查询") | ||
68 | @GetMapping(value = "/list") | ||
69 | public Result<IPage<HealthRecords>> queryPageList(HealthRecords healthRecords, | ||
70 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | ||
71 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | ||
72 | HttpServletRequest req) { | ||
73 | Result<IPage<HealthRecords>> result = new Result<IPage<HealthRecords>>(); | ||
74 | QueryWrapper<HealthRecords> queryWrapper = QueryGenerator.initQueryWrapper(healthRecords, req.getParameterMap()); | ||
75 | Page<HealthRecords> page = new Page<HealthRecords>(pageNo, pageSize); | ||
76 | //queryWrapper.eq("depart_id", BaseContextHandler.getRealDepartId()); | ||
77 | queryWrapper.in("depart_id", BaseContextHandler.getDeparts().split(",")); | ||
78 | IPage<HealthRecords> pageList = healthRecordsService.page(page, queryWrapper); | ||
79 | result.setSuccess(true); | ||
80 | result.setResult(pageList); | ||
81 | return result; | ||
82 | } | ||
83 | |||
84 | /** | ||
85 | * <pre> | ||
86 | * 添加 | ||
87 | * </pre> | ||
88 | * @param healthRecords | ||
89 | * @return | ||
90 | * @author 开发者姓名, 开发时间 | ||
91 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
92 | */ | ||
93 | @AutoLog(value = "健康档案-添加") | ||
94 | @ApiOperation(value="健康档案-添加", notes="健康档案-添加") | ||
95 | @PostMapping(value = "/add") | ||
96 | public Result<HealthRecords> add(@RequestBody HealthRecords healthRecords) { | ||
97 | Result<HealthRecords> result = new Result<HealthRecords>(); | ||
98 | try { | ||
99 | healthRecordsService.save(healthRecords); | ||
100 | result.success("添加成功!"); | ||
101 | } catch (Exception e) { | ||
102 | log.error(e.getMessage(),e); | ||
103 | result.error500("操作失败"); | ||
104 | } | ||
105 | return result; | ||
106 | } | ||
107 | /** | ||
108 | * <pre> | ||
109 | * 编辑 | ||
110 | * </pre> | ||
111 | * @param healthRecords | ||
112 | * @return | ||
113 | * @author 开发者姓名, 开发时间 | ||
114 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
115 | */ | ||
116 | @AutoLog(value = "健康档案-编辑") | ||
117 | @ApiOperation(value="健康档案-编辑", notes="健康档案-编辑") | ||
118 | @PutMapping(value = "/edit") | ||
119 | public Result<HealthRecords> edit(@RequestBody HealthRecords healthRecords) { | ||
120 | Result<HealthRecords> result = new Result<HealthRecords>(); | ||
121 | HealthRecords healthRecordsEntity = healthRecordsService.getById(healthRecords.getId()); | ||
122 | if(healthRecordsEntity==null) { | ||
123 | result.error500("未找到对应实体"); | ||
124 | }else { | ||
125 | boolean ok = healthRecordsService.updateById(healthRecords); | ||
126 | //TODO 返回false说明什么? | ||
127 | if(ok) { | ||
128 | result.success("修改成功!"); | ||
129 | } | ||
130 | } | ||
131 | |||
132 | return result; | ||
133 | } | ||
134 | /** | ||
135 | * <pre> | ||
136 | * 通过id删除 | ||
137 | * </pre> | ||
138 | * @param id | ||
139 | * @return | ||
140 | * @author 开发者姓名, 开发时间 | ||
141 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
142 | */ | ||
143 | @AutoLog(value = "健康档案-通过id删除") | ||
144 | @ApiOperation(value="健康档案-通过id删除", notes="健康档案-通过id删除") | ||
145 | @DeleteMapping(value = "/delete") | ||
146 | public Result<?> delete(@RequestParam(name="id",required=true) String id) { | ||
147 | try { | ||
148 | healthRecordsService.removeById(id); | ||
149 | } catch (Exception e) { | ||
150 | log.error("删除失败",e.getMessage()); | ||
151 | return Result.error("删除失败!"); | ||
152 | } | ||
153 | return Result.ok("删除成功!"); | ||
154 | } | ||
155 | |||
156 | /** | ||
157 | * <pre> | ||
158 | * 批量删除 | ||
159 | * </pre> | ||
160 | * @param ids | ||
161 | * @return | ||
162 | * @author 开发者姓名, 开发时间 | ||
163 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
164 | */ | ||
165 | @AutoLog(value = "健康档案-批量删除") | ||
166 | @ApiOperation(value="健康档案-批量删除", notes="健康档案-批量删除") | ||
167 | @DeleteMapping(value = "/deleteBatch") | ||
168 | public Result<HealthRecords> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | ||
169 | Result<HealthRecords> result = new Result<HealthRecords>(); | ||
170 | if(ids==null || "".equals(ids.trim())) { | ||
171 | result.error500("参数不识别!"); | ||
172 | }else { | ||
173 | this.healthRecordsService.removeByIds(Arrays.asList(ids.split(","))); | ||
174 | result.success("删除成功!"); | ||
175 | } | ||
176 | return result; | ||
177 | } | ||
178 | /** | ||
179 | * <pre> | ||
180 | * 通过id查询 | ||
181 | * </pre> | ||
182 | * @param id | ||
183 | * @return | ||
184 | * @author 开发者姓名, 开发时间 | ||
185 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
186 | */ | ||
187 | @AutoLog(value = "健康档案-通过id查询") | ||
188 | @ApiOperation(value="健康档案-通过id查询", notes="健康档案-通过id查询") | ||
189 | @GetMapping(value = "/queryById") | ||
190 | public Result<HealthRecords> queryById(@RequestParam(name="id",required=true) String id) { | ||
191 | Result<HealthRecords> result = new Result<HealthRecords>(); | ||
192 | HealthRecords healthRecords = healthRecordsService.getById(id); | ||
193 | if(healthRecords==null) { | ||
194 | result.error500("未找到对应实体"); | ||
195 | }else { | ||
196 | result.setResult(healthRecords); | ||
197 | result.setSuccess(true); | ||
198 | } | ||
199 | return result; | ||
200 | } | ||
201 | |||
202 | /** | ||
203 | * <pre> | ||
204 | * 导出excel | ||
205 | * </pre> | ||
206 | * @param request | ||
207 | * @param response | ||
208 | * @return | ||
209 | * @author 开发者姓名, 开发时间 | ||
210 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
211 | */ | ||
212 | |||
213 | @RequestMapping(value = "/exportXls") | ||
214 | public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) { | ||
215 | // Step.1 组装查询条件 | ||
216 | QueryWrapper<HealthRecords> queryWrapper = null; | ||
217 | try { | ||
218 | String paramsStr = request.getParameter("paramsStr"); | ||
219 | if (ConvertUtils.isNotEmpty(paramsStr)) { | ||
220 | String deString = URLDecoder.decode(paramsStr, "UTF-8"); | ||
221 | HealthRecords healthRecords = JSON.parseObject(deString, HealthRecords.class); | ||
222 | queryWrapper = QueryGenerator.initQueryWrapper(healthRecords, request.getParameterMap()); | ||
223 | } | ||
224 | } catch (UnsupportedEncodingException e) { | ||
225 | e.printStackTrace(); | ||
226 | } | ||
227 | |||
228 | //Step.2 AutoPoi 导出Excel | ||
229 | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); | ||
230 | List<HealthRecords> pageList = healthRecordsService.list(queryWrapper); | ||
231 | //导出文件名称 | ||
232 | mv.addObject(NormalExcelConstants.FILE_NAME, "健康档案列表"); | ||
233 | mv.addObject(NormalExcelConstants.CLASS, HealthRecords.class); | ||
234 | mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("健康档案列表数据", "导出人:Jeecg", "导出信息")); | ||
235 | mv.addObject(NormalExcelConstants.DATA_LIST, pageList); | ||
236 | return mv; | ||
237 | } | ||
238 | |||
239 | /** | ||
240 | * <pre> | ||
241 | * 通过excel导入数据 | ||
242 | * </pre> | ||
243 | * @param request | ||
244 | * @param response | ||
245 | * @return | ||
246 | * @author 开发者姓名, 开发时间 | ||
247 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
248 | */ | ||
249 | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) | ||
250 | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | ||
251 | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; | ||
252 | Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); | ||
253 | for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { | ||
254 | MultipartFile file = entity.getValue();// 获取上传文件对象 | ||
255 | ImportParams params = new ImportParams(); | ||
256 | params.setTitleRows(2); | ||
257 | params.setHeadRows(1); | ||
258 | params.setNeedSave(true); | ||
259 | try { | ||
260 | List<HealthRecords> listHealthRecordss = ExcelImportUtil.importExcel(file.getInputStream(), HealthRecords.class, params); | ||
261 | healthRecordsService.saveBatch(listHealthRecordss); | ||
262 | return Result.ok("文件导入成功!数据行数:" + listHealthRecordss.size()); | ||
263 | } catch (Exception e) { | ||
264 | log.error(e.getMessage(),e); | ||
265 | return Result.error("文件导入失败:"+e.getMessage()); | ||
266 | } finally { | ||
267 | try { | ||
268 | file.getInputStream().close(); | ||
269 | } catch (IOException e) { | ||
270 | e.printStackTrace(); | ||
271 | } | ||
272 | } | ||
273 | } | ||
274 | return Result.ok("文件导入失败!"); | ||
275 | } | ||
276 | |||
277 | } |
... | @@ -20,10 +20,10 @@ import org.jeecgframework.poi.excel.annotation.Excel; | ... | @@ -20,10 +20,10 @@ import org.jeecgframework.poi.excel.annotation.Excel; |
20 | * 事故案例库 | 20 | * 事故案例库 |
21 | */ | 21 | */ |
22 | @Data | 22 | @Data |
23 | @TableName("safe_accident_case") | 23 | @TableName("safety_accident_case") |
24 | @EqualsAndHashCode(callSuper = false) | 24 | @EqualsAndHashCode(callSuper = false) |
25 | @Accessors(chain = true) | 25 | @Accessors(chain = true) |
26 | @ApiModel(value="safe_accident_case对象", description="事故案例库") | 26 | @ApiModel(value="safety_accident_case对象", description="事故案例库") |
27 | public class AccidentCase { | 27 | public class AccidentCase { |
28 | 28 | ||
29 | /**id*/ | 29 | /**id*/ | ... | ... |
1 | package com.skua.modules.safe.entity; | ||
2 | |||
3 | import java.io.Serializable; | ||
4 | import java.util.Date; | ||
5 | import com.baomidou.mybatisplus.annotation.IdType; | ||
6 | import com.baomidou.mybatisplus.annotation.TableId; | ||
7 | import com.baomidou.mybatisplus.annotation.TableName; | ||
8 | import com.baomidou.mybatisplus.annotation.TableField; | ||
9 | import com.skua.core.aspect.annotation.Dict; | ||
10 | import io.swagger.annotations.ApiModel; | ||
11 | import io.swagger.annotations.ApiModelProperty; | ||
12 | import lombok.Data; | ||
13 | import lombok.EqualsAndHashCode; | ||
14 | import lombok.experimental.Accessors; | ||
15 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
16 | import org.springframework.format.annotation.DateTimeFormat; | ||
17 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
18 | |||
19 | /** | ||
20 | * 安环环保目标 | ||
21 | */ | ||
22 | @Data | ||
23 | @TableName("safety_environment_target") | ||
24 | @EqualsAndHashCode(callSuper = false) | ||
25 | @Accessors(chain = true) | ||
26 | @ApiModel(value="safety_environment_target对象", description="安环环保目标") | ||
27 | public class EnvironmentTarget { | ||
28 | |||
29 | /**主键id*/ | ||
30 | @TableId(type = IdType.ID_WORKER_STR) | ||
31 | @ApiModelProperty(value = "主键id") | ||
32 | private String id; | ||
33 | /**所属厂站*/ | ||
34 | @Excel(name = "所属厂站", width = 15) | ||
35 | @ApiModelProperty(value = "所属厂站") | ||
36 | @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name") | ||
37 | private String departId; | ||
38 | /**祖级列表*/ | ||
39 | @Excel(name = "祖级列表", width = 15) | ||
40 | @ApiModelProperty(value = "祖级列表") | ||
41 | private String departAncestors; | ||
42 | /**目标年度*/ | ||
43 | @Excel(name = "目标年度", width = 15) | ||
44 | @ApiModelProperty(value = "目标年度") | ||
45 | private String targetYear; | ||
46 | /**生成安全工亡责任事务*/ | ||
47 | @Excel(name = "生成安全工亡责任事务", width = 15) | ||
48 | @ApiModelProperty(value = "生成安全工亡责任事务") | ||
49 | private String workerDeathNum; | ||
50 | /**突发环境事件*/ | ||
51 | @Excel(name = "突发环境事件", width = 15) | ||
52 | @ApiModelProperty(value = "突发环境事件") | ||
53 | private String suddenlyNum; | ||
54 | /**新增职业病病例*/ | ||
55 | @Excel(name = "新增职业病病例", width = 15) | ||
56 | @ApiModelProperty(value = "新增职业病病例") | ||
57 | private String newCaseNum; | ||
58 | /**考核分数*/ | ||
59 | @Excel(name = "考核分数", width = 15) | ||
60 | @ApiModelProperty(value = "考核分数") | ||
61 | private String examScore; | ||
62 | /**创建人Id*/ | ||
63 | @Excel(name = "创建人Id", width = 15) | ||
64 | @ApiModelProperty(value = "创建人Id") | ||
65 | private String createBy; | ||
66 | /**创建时间*/ | ||
67 | @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
68 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
69 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
70 | @ApiModelProperty(value = "创建时间") | ||
71 | private Date createTime; | ||
72 | /**修改人Id*/ | ||
73 | @Excel(name = "修改人Id", width = 15) | ||
74 | @ApiModelProperty(value = "修改人Id") | ||
75 | private String updateBy; | ||
76 | /**修改时间*/ | ||
77 | @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
78 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
79 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
80 | @ApiModelProperty(value = "修改时间") | ||
81 | private Date updateTime; | ||
82 | /**删除标识*/ | ||
83 | @Excel(name = "删除标识", width = 15) | ||
84 | @ApiModelProperty(value = "删除标识") | ||
85 | private Integer delFlag; | ||
86 | } |
1 | package com.skua.modules.safe.entity; | ||
2 | |||
3 | import java.io.Serializable; | ||
4 | import java.util.Date; | ||
5 | import com.baomidou.mybatisplus.annotation.IdType; | ||
6 | import com.baomidou.mybatisplus.annotation.TableId; | ||
7 | import com.baomidou.mybatisplus.annotation.TableName; | ||
8 | import com.baomidou.mybatisplus.annotation.TableField; | ||
9 | import com.skua.core.aspect.annotation.Dict; | ||
10 | import io.swagger.annotations.ApiModel; | ||
11 | import io.swagger.annotations.ApiModelProperty; | ||
12 | import lombok.Data; | ||
13 | import lombok.EqualsAndHashCode; | ||
14 | import lombok.experimental.Accessors; | ||
15 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
16 | import org.springframework.format.annotation.DateTimeFormat; | ||
17 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
18 | |||
19 | /** | ||
20 | * 健康档案 | ||
21 | */ | ||
22 | @Data | ||
23 | @TableName("safety_health_records") | ||
24 | @EqualsAndHashCode(callSuper = false) | ||
25 | @Accessors(chain = true) | ||
26 | @ApiModel(value="safety_health_records对象", description="健康档案") | ||
27 | public class HealthRecords { | ||
28 | |||
29 | /**主键*/ | ||
30 | @TableId(type = IdType.ID_WORKER_STR) | ||
31 | @ApiModelProperty(value = "主键") | ||
32 | private String id; | ||
33 | /**所属厂站*/ | ||
34 | @Excel(name = "所属厂站", width = 15) | ||
35 | @ApiModelProperty(value = "所属厂站") | ||
36 | @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name") | ||
37 | private String departId; | ||
38 | /**祖级列表*/ | ||
39 | @Excel(name = "祖级列表", width = 15) | ||
40 | @ApiModelProperty(value = "祖级列表") | ||
41 | private String departAncestors; | ||
42 | /**用户编号*/ | ||
43 | @Excel(name = "用户编号", width = 15) | ||
44 | @ApiModelProperty(value = "用户编号") | ||
45 | private String userId; | ||
46 | /**检查地点*/ | ||
47 | @Excel(name = "检查地点", width = 15) | ||
48 | @ApiModelProperty(value = "检查地点") | ||
49 | private String inspectPlace; | ||
50 | /**检查结果*/ | ||
51 | @Excel(name = "检查结果", width = 15) | ||
52 | @ApiModelProperty(value = "检查结果") | ||
53 | private String inspectResult; | ||
54 | /**检查报告*/ | ||
55 | @Excel(name = "检查报告", width = 15) | ||
56 | @ApiModelProperty(value = "检查报告") | ||
57 | private String inspectReportFile; | ||
58 | /**异常情况以及处理意见*/ | ||
59 | @Excel(name = "异常情况以及处理意见", width = 15) | ||
60 | @ApiModelProperty(value = "异常情况以及处理意见") | ||
61 | private String proposal; | ||
62 | /**备注*/ | ||
63 | @Excel(name = "备注", width = 15) | ||
64 | @ApiModelProperty(value = "备注") | ||
65 | private String remark; | ||
66 | /**创建时间*/ | ||
67 | @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
68 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
69 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
70 | @ApiModelProperty(value = "创建时间") | ||
71 | private Date createTime; | ||
72 | /**创建人*/ | ||
73 | @Excel(name = "创建人", width = 15) | ||
74 | @ApiModelProperty(value = "创建人") | ||
75 | private String createBy; | ||
76 | /**修改时间*/ | ||
77 | @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
78 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
79 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
80 | @ApiModelProperty(value = "修改时间") | ||
81 | private Date updateTime; | ||
82 | /**修改人*/ | ||
83 | @Excel(name = "修改人", width = 15) | ||
84 | @ApiModelProperty(value = "修改人") | ||
85 | private String updateBy; | ||
86 | } |
1 | package com.skua.modules.safe.mapper; | ||
2 | |||
3 | import java.util.List; | ||
4 | |||
5 | import org.apache.ibatis.annotations.Param; | ||
6 | import com.skua.modules.safe.entity.EnvironmentTarget; | ||
7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
8 | |||
9 | /** | ||
10 | * 安环环保目标 | ||
11 | */ | ||
12 | public interface EnvironmentTargetMapper extends BaseMapper<EnvironmentTarget> { | ||
13 | |||
14 | } |
1 | package com.skua.modules.safe.mapper; | ||
2 | |||
3 | import java.util.List; | ||
4 | |||
5 | import org.apache.ibatis.annotations.Param; | ||
6 | import com.skua.modules.safe.entity.HealthRecords; | ||
7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
8 | |||
9 | /** | ||
10 | * 健康档案 | ||
11 | */ | ||
12 | public interface HealthRecordsMapper extends BaseMapper<HealthRecords> { | ||
13 | |||
14 | } |
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"> | ||
3 | <mapper namespace="com.skua.modules.safe.mapper.EnvironmentTargetMapper"> | ||
4 | |||
5 | </mapper> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/EnvironmentTargetServiceImpl.java
0 → 100644
1 | package com.skua.modules.safe.service.impl; | ||
2 | |||
3 | import com.skua.modules.safe.entity.EnvironmentTarget; | ||
4 | import com.skua.modules.safe.mapper.EnvironmentTargetMapper; | ||
5 | import com.skua.modules.safe.service.IEnvironmentTargetService; | ||
6 | import org.springframework.stereotype.Service; | ||
7 | |||
8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
9 | |||
10 | /** | ||
11 | * 安环环保目标 | ||
12 | */ | ||
13 | @Service | ||
14 | public class EnvironmentTargetServiceImpl extends ServiceImpl<EnvironmentTargetMapper, EnvironmentTarget> implements IEnvironmentTargetService { | ||
15 | |||
16 | } |
sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/HealthRecordsServiceImpl.java
0 → 100644
1 | package com.skua.modules.safe.service.impl; | ||
2 | |||
3 | import com.skua.modules.safe.entity.HealthRecords; | ||
4 | import com.skua.modules.safe.mapper.HealthRecordsMapper; | ||
5 | import com.skua.modules.safe.service.IHealthRecordsService; | ||
6 | import org.springframework.stereotype.Service; | ||
7 | |||
8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
9 | |||
10 | /** | ||
11 | * 健康档案 | ||
12 | */ | ||
13 | @Service | ||
14 | public class HealthRecordsServiceImpl extends ServiceImpl<HealthRecordsMapper, HealthRecords> implements IHealthRecordsService { | ||
15 | |||
16 | } |
... | @@ -59,6 +59,10 @@ public class ShiroConfig { | ... | @@ -59,6 +59,10 @@ public class ShiroConfig { |
59 | filterChainDefinitionMap.put("/sys/common/view/**", "anon");//图片预览不限制token | 59 | filterChainDefinitionMap.put("/sys/common/view/**", "anon");//图片预览不限制token |
60 | filterChainDefinitionMap.put("/sys/common/download/**", "anon");//文件下载不限制token | 60 | filterChainDefinitionMap.put("/sys/common/download/**", "anon");//文件下载不限制token |
61 | filterChainDefinitionMap.put("/sys/common/pdf/**", "anon");//pdf预览 | 61 | filterChainDefinitionMap.put("/sys/common/pdf/**", "anon");//pdf预览 |
62 | filterChainDefinitionMap.put("/web/erp/materialAcceptanceForm/queryById", "anon");//采购入库,送货方查询验货单 | ||
63 | filterChainDefinitionMap.put("/web/erp/materialAcceptanceForm/senderSign", "anon");//采购入库,送货方签名 | ||
64 | filterChainDefinitionMap.put("/web/erp/materialIN/queryById", "anon");//采购入库,查询采购入库信息 | ||
65 | filterChainDefinitionMap.put("/generic/**", "anon");//pdf预览需要文件 | ||
62 | filterChainDefinitionMap.put("/generic/**", "anon");//pdf预览需要文件 | 66 | filterChainDefinitionMap.put("/generic/**", "anon");//pdf预览需要文件 |
63 | filterChainDefinitionMap.put("/", "anon"); | 67 | filterChainDefinitionMap.put("/", "anon"); |
64 | filterChainDefinitionMap.put("/doc.html", "anon"); | 68 | filterChainDefinitionMap.put("/doc.html", "anon"); | ... | ... |
-
请 注册 或 登录 后发表评论