d6ca71fe 张雷

安环禅道问题修改

1 个父辈 beb320ec
正在显示 18 个修改的文件 包含 167 行增加105 行删除
...@@ -103,4 +103,13 @@ public class AjhExerciseSituation { ...@@ -103,4 +103,13 @@ public class AjhExerciseSituation {
103 @Excel(name = "标识", width = 15) 103 @Excel(name = "标识", width = 15)
104 @ApiModelProperty(value = "标识") 104 @ApiModelProperty(value = "标识")
105 private Integer delFlag; 105 private Integer delFlag;
106 /**应急预案*/
107 @Excel(name = "应急预案", width = 15)
108 @ApiModelProperty(value = "应急预案")
109 @Dict(dictTable = "emergency_plan_database", dicCode="id", dicText = "doc_name")
110 private String emergencyPlan;
111 /**应急评估*/
112 @Excel(name = "应急评估", width = 15)
113 @ApiModelProperty(value = "应急评估")
114 private String exeAssessment;
106 } 115 }
......
...@@ -97,66 +97,32 @@ public class EmergencyAnalysisController { ...@@ -97,66 +97,32 @@ public class EmergencyAnalysisController {
97 97
98 98
99 /** 99 /**
100 * @param req 100 * 应急资源统计
101 * @param departId
101 * @return 102 * @return
102 */ 103 */
103 @AutoLog(value = "应急-应急资源统计") 104 @AutoLog(value = "应急-应急资源统计")
104 @ApiOperation(value = "应急-应急资源统计", notes = "应急-应急资源统计") 105 @ApiOperation(value = "应急-应急资源统计", notes = "应急-应急资源统计")
105 @GetMapping(value = "/resource") 106 @GetMapping(value = "/resource")
106 public Result resource( 107 public Result resource(String moduleType,String departId) {
107 HttpServletRequest req, String moduleType) {
108 Result result = new Result<>(); 108 Result result = new Result<>();
109 try { 109 try {
110 ArrayList<Object> resultList = new ArrayList<>(); 110 ArrayList<Object> resultList = new ArrayList<>();
111 // String moduleType = req.getParameter("moduleType");
112 QueryWrapper<EmergencyGoods> emergencyGoodsQueryWrapper = new QueryWrapper<EmergencyGoods>() 111 QueryWrapper<EmergencyGoods> emergencyGoodsQueryWrapper = new QueryWrapper<EmergencyGoods>()
113 .select("id,goods_type as goodsType,goods_name as goodsName,goods_unit as goodsUnit,sum(goods_num)as totalGoods") 112 .select("id,goods_type as goodsType,goods_name as goodsName,goods_unit as goodsUnit,sum(goods_num)as totalGoods")
114 .eq("del_flag", 1).groupBy("goods_name"); 113 .eq(StringUtils.isNotEmpty(moduleType),"module_type", moduleType)
115 114 .eq(StringUtils.isNotEmpty(departId),"depart_id", departId)
115 .eq("del_flag", 1)
116 .groupBy("goods_name");
116 List<Map<String, Object>> totalGoodsList = goodsService.listMaps(emergencyGoodsQueryWrapper); 117 List<Map<String, Object>> totalGoodsList = goodsService.listMaps(emergencyGoodsQueryWrapper);
117 //应急事件
118 QueryWrapper<EmergencyEvents> emergencyEventsQueryWrapper = new QueryWrapper<>();
119 emergencyEventsQueryWrapper.eq("del_flag", 1).isNotNull("process_instance_id");
120 List<EmergencyEvents> eventsList = emergencyEventsService.list(emergencyEventsQueryWrapper);
121 //待处理
122 List<EmergencyEvents> processEventsList = eventsList.stream().filter(events -> StringUtils.isNotBlank(events.getProcessInstanceId())).collect(Collectors.toList());
123 Set<String> processInstanceIdS = processEventsList.stream().map(events -> events.getProcessInstanceId()).collect(Collectors.toSet());
124 // Map<String,Map<String, String>> processStateMap = flowBusinessService.getProcessState(processInstanceIdS);
125 // for (EmergencyEvents events : eventsList) {
126 // events.setProcessState(processStateMap.get(events.getProcessInstanceId()).getOrDefault("state", "pending"));
127 // }
128 // //处理中事件
129 // List<EmergencyEvents> unfinishedEvents = eventsList.stream().filter(events -> "unfinished".equals(events.getProcessState())).collect(Collectors.toList());
130
131
132 QueryWrapper<EmergencyCarts> emergencyCartsQueryWrapper = new QueryWrapper<EmergencyCarts>().eq("del_flag", 1); 118 QueryWrapper<EmergencyCarts> emergencyCartsQueryWrapper = new QueryWrapper<EmergencyCarts>().eq("del_flag", 1);
133 int totalCarts = emergencyCartsService.count(emergencyCartsQueryWrapper); 119 int totalCarts = emergencyCartsService.count(emergencyCartsQueryWrapper);
134 for (Map<String, Object> goodsMap : totalGoodsList) { 120 for (Map<String, Object> goodsMap : totalGoodsList) {
135 Double inUseNum = 0.0; 121 Double inUseNum = 0.0;
136 // if (!CollectionUtils.isEmpty(unfinishedEvents)) {
137 // for (EmergencyEvents emergencyEvents : unfinishedEvents) {
138 // String eventId = emergencyEvents.getId();
139 // List<EmergencyEventsGoods> emergencyEventsGoods = emergencyEventsGoodsService.list(new QueryWrapper<EmergencyEventsGoods>().eq("event_id", eventId));
140 // if (!CollectionUtils.isEmpty(emergencyEventsGoods)) {
141 // for (EmergencyEventsGoods emergencyEventsGood : emergencyEventsGoods) {
142 // if (emergencyEventsGood.getGoodsId().equals(goodsMap.get("id"))) {
143 // inUseNum += emergencyEventsGood.getUseNum();
144 // }
145 // }
146 // }
147 // }
148 // }
149 goodsMap.put("inUseNum", inUseNum); 122 goodsMap.put("inUseNum", inUseNum);
150 goodsMap.put("freeNum", Double.parseDouble(String.valueOf(goodsMap.get("totalGoods"))) - inUseNum>0?Double.parseDouble(String.valueOf(goodsMap.get("totalGoods"))) - inUseNum:0); 123 goodsMap.put("freeNum", Double.parseDouble(String.valueOf(goodsMap.get("totalGoods"))) - inUseNum>0?Double.parseDouble(String.valueOf(goodsMap.get("totalGoods"))) - inUseNum:0);
151 } 124 }
152 int useCartNum = 0; 125 int useCartNum = 0;
153 // if (!CollectionUtils.isEmpty(unfinishedEvents)) {
154 // for (EmergencyEvents emergencyEvents : unfinishedEvents) {
155 // String eventId = emergencyEvents.getId();
156 // List<EmergencyEventsCart> emergencyEventsCarts = emergencyEventsCartService.list(new QueryWrapper<EmergencyEventsCart>().eq("event_id", eventId));
157 // useCartNum += emergencyEventsCarts.size();
158 // }
159 // }
160 HashMap<String, Object> map = new HashMap<>(); 126 HashMap<String, Object> map = new HashMap<>();
161 map.put("goodsName", "应急车辆"); 127 map.put("goodsName", "应急车辆");
162 map.put("goodsUnit", "辆"); 128 map.put("goodsUnit", "辆");
......
...@@ -79,11 +79,10 @@ public class EmergencyCommandLiaisonController { ...@@ -79,11 +79,10 @@ public class EmergencyCommandLiaisonController {
79 @AutoLog(value = "应急指挥联络图-树结构数据") 79 @AutoLog(value = "应急指挥联络图-树结构数据")
80 @ApiOperation(value="应急指挥联络图-树结构数据", notes="应急指挥联络图-树结构数据") 80 @ApiOperation(value="应急指挥联络图-树结构数据", notes="应急指挥联络图-树结构数据")
81 @GetMapping(value = "/queryTreeList") 81 @GetMapping(value = "/queryTreeList")
82 public Result<List<EmergencyCommandLiaisonTreeModel>> queryTreeList(EmergencyCommandLiaison emergencyCommandLiaison,HttpServletRequest request) { 82 public Result<List<EmergencyCommandLiaisonTreeModel>> queryTreeList(EmergencyCommandLiaison emergencyCommandLiaison) {
83 Result<List<EmergencyCommandLiaisonTreeModel>> result = new Result<>(); 83 Result<List<EmergencyCommandLiaisonTreeModel>> result = new Result<>();
84 try { 84 try {
85 85 List<EmergencyCommandLiaisonTreeModel> list = emergencyCommandLiaisonService.queryTreeList(emergencyCommandLiaison);
86 List<EmergencyCommandLiaisonTreeModel> list = emergencyCommandLiaisonService.queryTreeList( emergencyCommandLiaison);
87 result.setResult(list); 86 result.setResult(list);
88 result.setSuccess(true); 87 result.setSuccess(true);
89 } catch (Exception e) { 88 } catch (Exception e) {
......
...@@ -78,6 +78,26 @@ public class EmergencyPlanDatabaseController { ...@@ -78,6 +78,26 @@ public class EmergencyPlanDatabaseController {
78 } 78 }
79 79
80 /** 80 /**
81 * 下拉列表
82 * @param departId
83 * @return
84 */
85 @AutoLog(value = "应急预案资料库-下拉列表查询")
86 @ApiOperation(value = "应急预案资料库-下拉列表查询", notes = "应急预案资料库-下拉列表查询")
87 @GetMapping(value = "/get")
88 public Result<List<EmergencyPlanDatabase>> getList(String departId) {
89 Result<List<EmergencyPlanDatabase>> result = new Result<List<EmergencyPlanDatabase>>();
90 QueryWrapper<EmergencyPlanDatabase> queryWrapper = new QueryWrapper<>();
91 queryWrapper.eq("doc_type", "2");
92 queryWrapper.eq(StringUtils.isNotEmpty(departId), "depart_id", departId);
93 queryWrapper.orderByDesc("create_time");
94 List<EmergencyPlanDatabase> list = emergencyPlanDatabaseService.list(queryWrapper);
95 result.setSuccess(true);
96 result.setResult(list);
97 return result;
98 }
99
100 /**
81 * 列表查询 101 * 列表查询
82 * 102 *
83 * @param emergencyPlanDatabase 103 * @param emergencyPlanDatabase
......
...@@ -40,6 +40,15 @@ public class EmergencyCommandLiaison { ...@@ -40,6 +40,15 @@ public class EmergencyCommandLiaison {
40 @Excel(name = "地址", width = 15) 40 @Excel(name = "地址", width = 15)
41 @ApiModelProperty(value = "地址") 41 @ApiModelProperty(value = "地址")
42 private String address; 42 private String address;
43 /**所属厂区*/
44 @Excel(name = "所属厂区", width = 15)
45 @ApiModelProperty(value = "所属厂区")
46 private String departId;
47 /**版块类型:1-河道,2-污水厂,3-排水管网*/
48 @Excel(name = "版块类型:1-河道,2-污水厂,3-排水管网", width = 15)
49 @ApiModelProperty(value = "版块类型:1-河道,2-污水厂,3-排水管网")
50 @Dict(dicCode = "moduleType")
51 private String moduleType;
43 /**备注*/ 52 /**备注*/
44 @Excel(name = "备注", width = 15) 53 @Excel(name = "备注", width = 15)
45 @ApiModelProperty(value = "备注") 54 @ApiModelProperty(value = "备注")
...@@ -85,10 +94,4 @@ public class EmergencyCommandLiaison { ...@@ -85,10 +94,4 @@ public class EmergencyCommandLiaison {
85 @Excel(name = "attr4", width = 15) 94 @Excel(name = "attr4", width = 15)
86 @ApiModelProperty(value = "attr4") 95 @ApiModelProperty(value = "attr4")
87 private String attr4; 96 private String attr4;
88
89 /**版块类型:1-河道,2-污水厂,3-排水管网*/
90 @Excel(name = "版块类型:1-河道,2-污水厂,3-排水管网", width = 15)
91 @ApiModelProperty(value = "版块类型:1-河道,2-污水厂,3-排水管网")
92 @Dict(dicCode = "moduleType")
93 private String moduleType;
94 } 97 }
......
...@@ -90,6 +90,13 @@ public class EmergencyGoods { ...@@ -90,6 +90,13 @@ public class EmergencyGoods {
90 @ApiModelProperty(value = "联系方式") 90 @ApiModelProperty(value = "联系方式")
91 private String phoneNumber; 91 private String phoneNumber;
92 /** 92 /**
93 * 所属厂区
94 */
95 @Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
96 @Excel(name = "所属厂区", width = 15)
97 @ApiModelProperty(value = "所属厂区")
98 private String departId;
99 /**
93 * 创建人 100 * 创建人
94 */ 101 */
95 @Dict(dicCode = "id", dictTable = "sys_user", dicText = "realname") 102 @Dict(dicCode = "id", dictTable = "sys_user", dicText = "realname")
......
...@@ -69,6 +69,56 @@ public class EmergencyPlanDatabase{ ...@@ -69,6 +69,56 @@ public class EmergencyPlanDatabase{
69 @Excel(name = "备注", width = 15) 69 @Excel(name = "备注", width = 15)
70 @ApiModelProperty(value = "备注") 70 @ApiModelProperty(value = "备注")
71 private String remark; 71 private String remark;
72 /**发布时间*/
73 @Excel(name = "发布时间", width = 15)
74 @ApiModelProperty(value = "发布时间")
75 private String releaseTime;
76 /**有效时间*/
77 @Excel(name = "有效时间", width = 15)
78 @ApiModelProperty(value = "有效时间")
79 private String effectiveTime;
80 /**发布时间*/
81 @Excel(name = "发布时间", width = 15)
82 @ApiModelProperty(value = "发布时间")
83 private String isLocalFiling;
84 /**预案类型*/
85 @Excel(name = "预案类型", width = 15)
86 @ApiModelProperty(value = "预案类型")
87 @Dict(dicCode = "plan_type")
88 private String planType;
89 /**应用类型*/
90 @Excel(name = "应用类型", width = 15)
91 @ApiModelProperty(value = "应用类型")
92 @Dict(dicCode = "application_type")
93 private String applicationType;
94 /**版本号*/
95 @Excel(name = "版本号", width = 15)
96 @ApiModelProperty(value = "版本号")
97 private String fileVersion;
98 /**所属部门*/
99 @Excel(name = "所属部门", width = 15)
100 @ApiModelProperty(value = "所属部门")
101 private String fileDepart;
102 /**修订过程*/
103 @Excel(name = "修订过程", width = 15)
104 @ApiModelProperty(value = "修订过程")
105 private String updateHistory;
106 /**风险分布文件*/
107 @Excel(name = "riskFile", width = 15)
108 @ApiModelProperty(value = "riskFile")
109 private String riskFile;
110 /**图片1名称*/
111 @Excel(name = "图片1名称", width = 15)
112 @ApiModelProperty(value = "图片1名称")
113 private String riskFileName;
114 /**应急疏散线路文件*/
115 @Excel(name = "evacuateFile", width = 15)
116 @ApiModelProperty(value = "evacuateFile")
117 private String evacuateFile;
118 /**图片2名称*/
119 @Excel(name = "图片2名称", width = 15)
120 @ApiModelProperty(value = "图片2名称")
121 private String evacuateFileName;
72 /**上传人*/ 122 /**上传人*/
73 @Excel(name = "上传人", width = 15) 123 @Excel(name = "上传人", width = 15)
74 @ApiModelProperty(value = "上传人") 124 @ApiModelProperty(value = "上传人")
...@@ -102,40 +152,10 @@ public class EmergencyPlanDatabase{ ...@@ -102,40 +152,10 @@ public class EmergencyPlanDatabase{
102 @Excel(name = "delFlag", width = 15) 152 @Excel(name = "delFlag", width = 15)
103 @ApiModelProperty(value = "delFlag") 153 @ApiModelProperty(value = "delFlag")
104 private Integer delFlag; 154 private Integer delFlag;
105 /**release_time*/ 155 /**流程定义id */
106 @JsonFormat(pattern = "yyyy-MM-dd")
107 @DateTimeFormat(pattern="yyyy-MM-dd")
108 @ApiModelProperty(value = "发布时间")
109 private java.util.Date releaseTime;
110 /**attr2*/
111 @Excel(name = "attr2", width = 15)
112 @ApiModelProperty(value = "attr2")
113 private String attr2;
114 /**attr3*/
115 @Excel(name = "attr3", width = 15)
116 @ApiModelProperty(value = "attr3")
117 private String attr3;
118 /**attr4*/
119 @Excel(name = "attr4", width = 15)
120 @ApiModelProperty(value = "attr4")
121 private String attr4;
122 /**风险分布文件*/
123 @Excel(name = "riskFile", width = 15)
124 @ApiModelProperty(value = "riskFile")
125 private String riskFile;
126 /**应急疏散线路文件*/
127 @Excel(name = "evacuateFile", width = 15)
128 @ApiModelProperty(value = "evacuateFile")
129 private String evacuateFile;
130
131 /**
132 * 流程定义id
133 */
134 @TableField(exist = false) 156 @TableField(exist = false)
135 private String processDefinitionId; 157 private String processDefinitionId;
136 /** 158 /** 流程实例id*/
137 * 流程实例id
138 */
139 @TableField(exist = false) 159 @TableField(exist = false)
140 private String processInstanceId; 160 private String processInstanceId;
141 161
......
...@@ -95,10 +95,9 @@ public class EmergencyPlanDatabaseFlow extends FlowEntity{ ...@@ -95,10 +95,9 @@ public class EmergencyPlanDatabaseFlow extends FlowEntity{
95 @ApiModelProperty(value = "delFlag") 95 @ApiModelProperty(value = "delFlag")
96 private java.lang.Integer delFlag; 96 private java.lang.Integer delFlag;
97 /**release_time*/ 97 /**release_time*/
98 @JsonFormat(pattern = "yyyy-MM-dd") 98 @Excel(name = "发布时间", width = 15)
99 @DateTimeFormat(pattern="yyyy-MM-dd")
100 @ApiModelProperty(value = "发布时间") 99 @ApiModelProperty(value = "发布时间")
101 private java.util.Date releaseTime; 100 private String releaseTime;
102 /**attr2*/ 101 /**attr2*/
103 @Excel(name = "attr2", width = 15) 102 @Excel(name = "attr2", width = 15)
104 @ApiModelProperty(value = "attr2") 103 @ApiModelProperty(value = "attr2")
......
...@@ -19,6 +19,6 @@ public interface EmergencyCommandLiaisonMapper extends BaseMapper<EmergencyComma ...@@ -19,6 +19,6 @@ public interface EmergencyCommandLiaisonMapper extends BaseMapper<EmergencyComma
19 * 查询联络图所有 19 * 查询联络图所有
20 * @return 20 * @return
21 */ 21 */
22 List<EmergencyCommandLiaisonVO> findList(EmergencyCommandLiaison emergencyCommandLiaison); 22 List<EmergencyCommandLiaisonVO> findList(@Param("emergencyCommandLiaison") EmergencyCommandLiaison emergencyCommandLiaison);
23 23
24 } 24 }
......
...@@ -3,5 +3,8 @@ ...@@ -3,5 +3,8 @@
3 <mapper namespace="com.skua.modules.emergency.mapper.EmergencyCommandLiaisonMapper"> 3 <mapper namespace="com.skua.modules.emergency.mapper.EmergencyCommandLiaisonMapper">
4 <select id="findList" resultType="com.skua.modules.emergency.vo.EmergencyCommandLiaisonVO"> 4 <select id="findList" resultType="com.skua.modules.emergency.vo.EmergencyCommandLiaisonVO">
5 select * from emergency_command_liaison 5 select * from emergency_command_liaison
6 <if test="emergencyCommandLiaison.departId!=null and emergencyCommandLiaison.departId!=''">
7 where depart_id = #{emergencyCommandLiaison.departId}
8 </if>
6 </select> 9 </select>
7 </mapper> 10 </mapper>
......
...@@ -37,6 +37,9 @@ public class EmergencyCommandLiaisonTreeModel implements Serializable { ...@@ -37,6 +37,9 @@ public class EmergencyCommandLiaisonTreeModel implements Serializable {
37 /**地址*/ 37 /**地址*/
38 @ApiModelProperty(value = "地址") 38 @ApiModelProperty(value = "地址")
39 private java.lang.String address; 39 private java.lang.String address;
40 /**所属厂区*/
41 @ApiModelProperty(value = "所属厂区")
42 private java.lang.String departId;
40 /**备注*/ 43 /**备注*/
41 @ApiModelProperty(value = "备注") 44 @ApiModelProperty(value = "备注")
42 private java.lang.String remark; 45 private java.lang.String remark;
...@@ -85,6 +88,7 @@ public class EmergencyCommandLiaisonTreeModel implements Serializable { ...@@ -85,6 +88,7 @@ public class EmergencyCommandLiaisonTreeModel implements Serializable {
85 this.parentId = liaison.getParentId(); 88 this.parentId = liaison.getParentId();
86 this.emergencyName = liaison.getEmergencyName(); 89 this.emergencyName = liaison.getEmergencyName();
87 this.address = liaison.getAddress(); 90 this.address = liaison.getAddress();
91 this.departId = liaison.getDepartId();
88 this.remark = liaison.getRemark(); 92 this.remark = liaison.getRemark();
89 this.createBy = liaison.getCreateBy(); 93 this.createBy = liaison.getCreateBy();
90 this.createTime = liaison.getCreateTime(); 94 this.createTime = liaison.getCreateTime();
...@@ -166,6 +170,14 @@ public class EmergencyCommandLiaisonTreeModel implements Serializable { ...@@ -166,6 +170,14 @@ public class EmergencyCommandLiaisonTreeModel implements Serializable {
166 this.address = address; 170 this.address = address;
167 } 171 }
168 172
173 public String getDepartId() {
174 return departId;
175 }
176
177 public void setDepartId(String departId) {
178 this.departId = departId;
179 }
180
169 public String getRemark() { 181 public String getRemark() {
170 return remark; 182 return remark;
171 } 183 }
...@@ -268,6 +280,7 @@ public class EmergencyCommandLiaisonTreeModel implements Serializable { ...@@ -268,6 +280,7 @@ public class EmergencyCommandLiaisonTreeModel implements Serializable {
268 parentId.equals(that.parentId) && 280 parentId.equals(that.parentId) &&
269 emergencyName.equals(that.emergencyName) && 281 emergencyName.equals(that.emergencyName) &&
270 address.equals(that.address) && 282 address.equals(that.address) &&
283 departId.equals(that.departId) &&
271 remark.equals(that.remark) && 284 remark.equals(that.remark) &&
272 createBy.equals(that.createBy) && 285 createBy.equals(that.createBy) &&
273 createTime.equals(that.createTime) && 286 createTime.equals(that.createTime) &&
...@@ -283,6 +296,6 @@ public class EmergencyCommandLiaisonTreeModel implements Serializable { ...@@ -283,6 +296,6 @@ public class EmergencyCommandLiaisonTreeModel implements Serializable {
283 296
284 @Override 297 @Override
285 public int hashCode() { 298 public int hashCode() {
286 return Objects.hash(key, value, title, userList, isLeaf, id, parentId, emergencyName, address, remark, createBy, createTime, updateBy, updateTime, delFlag, attr1, attr2, attr3, attr4, children); 299 return Objects.hash(key, value, title, userList, isLeaf, id, parentId, emergencyName, address, departId, remark, createBy, createTime, updateBy, updateTime, delFlag, attr1, attr2, attr3, attr4, children);
287 } 300 }
288 } 301 }
......
...@@ -36,6 +36,10 @@ public class EmergencyCommandLiaisonVO { ...@@ -36,6 +36,10 @@ public class EmergencyCommandLiaisonVO {
36 @Excel(name = "地址", width = 15) 36 @Excel(name = "地址", width = 15)
37 @ApiModelProperty(value = "地址") 37 @ApiModelProperty(value = "地址")
38 private java.lang.String address; 38 private java.lang.String address;
39 /**所属厂区*/
40 @Excel(name = "所属厂区", width = 15)
41 @ApiModelProperty(value = "所属厂区")
42 private String departId;
39 /**备注*/ 43 /**备注*/
40 @Excel(name = "备注", width = 15) 44 @Excel(name = "备注", width = 15)
41 @ApiModelProperty(value = "备注") 45 @ApiModelProperty(value = "备注")
......
...@@ -91,10 +91,9 @@ public class EmergencyPlanDatabaseVO{ ...@@ -91,10 +91,9 @@ public class EmergencyPlanDatabaseVO{
91 @ApiModelProperty(value = "delFlag") 91 @ApiModelProperty(value = "delFlag")
92 private java.lang.Integer delFlag; 92 private java.lang.Integer delFlag;
93 /**release_time*/ 93 /**release_time*/
94 @JsonFormat(pattern = "yyyy-MM-dd") 94 @Excel(name = "发布时间", width = 15)
95 @DateTimeFormat(pattern="yyyy-MM-dd")
96 @ApiModelProperty(value = "发布时间") 95 @ApiModelProperty(value = "发布时间")
97 private java.util.Date releaseTime; 96 private String releaseTime;
98 /**attr2*/ 97 /**attr2*/
99 @Excel(name = "attr2", width = 15) 98 @Excel(name = "attr2", width = 15)
100 @ApiModelProperty(value = "attr2") 99 @ApiModelProperty(value = "attr2")
......
...@@ -87,7 +87,6 @@ public class EquipmentSparepartSuppliesController { ...@@ -87,7 +87,6 @@ public class EquipmentSparepartSuppliesController {
87 * @param equipmentSparepartSupplies 87 * @param equipmentSparepartSupplies
88 * @param pageNo 88 * @param pageNo
89 * @param pageSize 89 * @param pageSize
90 * @param req
91 * @return 90 * @return
92 * @author 开发者姓名, 开发时间 91 * @author 开发者姓名, 开发时间
93 * @Description: TODO(这里描述这个方法的需求变更情况) 92 * @Description: TODO(这里描述这个方法的需求变更情况)
...@@ -98,8 +97,7 @@ public class EquipmentSparepartSuppliesController { ...@@ -98,8 +97,7 @@ public class EquipmentSparepartSuppliesController {
98 @GetMapping(value = "/list") 97 @GetMapping(value = "/list")
99 public Result queryPageList(EquipmentSparepartSuppliesDTO equipmentSparepartSupplies, 98 public Result queryPageList(EquipmentSparepartSuppliesDTO equipmentSparepartSupplies,
100 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, 99 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
101 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, 100 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) throws Exception {
102 HttpServletRequest req) throws Exception {
103 Result result = new Result(); 101 Result result = new Result();
104 Set<String> sparepartTypeSet = new HashSet<>(); 102 Set<String> sparepartTypeSet = new HashSet<>();
105 if (StringUtils.isNotEmpty(equipmentSparepartSupplies.getSparepartType())) { 103 if (StringUtils.isNotEmpty(equipmentSparepartSupplies.getSparepartType())) {
...@@ -135,7 +133,6 @@ public class EquipmentSparepartSuppliesController { ...@@ -135,7 +133,6 @@ public class EquipmentSparepartSuppliesController {
135 .ge("storage_num", 0) 133 .ge("storage_num", 0)
136 .isNotNull("storage_num") 134 .isNotNull("storage_num")
137 ).stream().map(EquipmentSparepart::getSuppliesId).collect(Collectors.toSet()); 135 ).stream().map(EquipmentSparepart::getSuppliesId).collect(Collectors.toSet());
138
139 // 查询条件加入in条件 136 // 查询条件加入in条件
140 if (!sparepartSuppliesIdSet.isEmpty()&&sparepartSuppliesIdSet.size()>0) { 137 if (!sparepartSuppliesIdSet.isEmpty()&&sparepartSuppliesIdSet.size()>0) {
141 queryWrapper.in("id", sparepartSuppliesIdSet); 138 queryWrapper.in("id", sparepartSuppliesIdSet);
...@@ -148,9 +145,6 @@ public class EquipmentSparepartSuppliesController { ...@@ -148,9 +145,6 @@ public class EquipmentSparepartSuppliesController {
148 Page<EquipmentSparepartSupplies> page = new Page<EquipmentSparepartSupplies>(pageNo, pageSize); 145 Page<EquipmentSparepartSupplies> page = new Page<EquipmentSparepartSupplies>(pageNo, pageSize);
149 //添加库存预警查询 146 //添加库存预警查询
150 List<EquipmentSparepartSupplies> records = equipmentSparepartSuppliesService.list(queryWrapper); 147 List<EquipmentSparepartSupplies> records = equipmentSparepartSuppliesService.list(queryWrapper);
151 //Page<JSONObject> objectPage = new Page<>();
152 //BeanUtils.copyProperties(page, objectPage);
153 //List<EquipmentSparepartSupplies> records = pageList.getRecords();
154 List<EquipmentSparepartSuppliesVO> check = check(records, equipmentSparepartSupplies); 148 List<EquipmentSparepartSuppliesVO> check = check(records, equipmentSparepartSupplies);
155 //过滤库存量预警查询 149 //过滤库存量预警查询
156 if (!StringUtils.isEmpty(equipmentSparepartSupplies.getStorageWarn())) { 150 if (!StringUtils.isEmpty(equipmentSparepartSupplies.getStorageWarn())) {
...@@ -159,7 +153,6 @@ public class EquipmentSparepartSuppliesController { ...@@ -159,7 +153,6 @@ public class EquipmentSparepartSuppliesController {
159 List<JSONObject> jsonObjects = sysCommonDictService.translateListDictValue(check); 153 List<JSONObject> jsonObjects = sysCommonDictService.translateListDictValue(check);
160 // 计算总数 154 // 计算总数
161 long count = jsonObjects.size(); 155 long count = jsonObjects.size();
162
163 List list; 156 List list;
164 if (pageNo * pageSize <= jsonObjects.size()) { 157 if (pageNo * pageSize <= jsonObjects.size()) {
165 list = jsonObjects.subList(ConvertUtils.getInt((pageNo - 1) * pageSize), ConvertUtils.getInt(pageNo * pageSize)); 158 list = jsonObjects.subList(ConvertUtils.getInt((pageNo - 1) * pageSize), ConvertUtils.getInt(pageNo * pageSize));
......
...@@ -34,6 +34,13 @@ public class EquipmentSparepartSupplies { ...@@ -34,6 +34,13 @@ public class EquipmentSparepartSupplies {
34 @TableId(type = IdType.ID_WORKER_STR) 34 @TableId(type = IdType.ID_WORKER_STR)
35 @ApiModelProperty(value = "id") 35 @ApiModelProperty(value = "id")
36 private String id; 36 private String id;
37
38 /**所属厂区*/
39 @Excel(name = "所属厂区", width = 15)
40 @ApiModelProperty(value = "所属厂区")
41 @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name")
42 private String departId;
43
37 /** 44 /**
38 * 物料编号 45 * 物料编号
39 */ 46 */
...@@ -228,5 +235,16 @@ public class EquipmentSparepartSupplies { ...@@ -228,5 +235,16 @@ public class EquipmentSparepartSupplies {
228 @ApiModelProperty(value = "生成时间") 235 @ApiModelProperty(value = "生成时间")
229 private Date inventoryUpdateTime; 236 private Date inventoryUpdateTime;
230 237
238 /** 是否应急物资 */
239 @Excel(name = "是否应急物资", width = 15)
240 @ApiModelProperty(value = "是否应急物资")
241 @Dict(dicCode = "yn")
242 private String isEmergency;
243
244 /** 是否危化品 */
245 @Excel(name = "是否危化品", width = 15)
246 @ApiModelProperty(value = "是否危化品")
247 @Dict(dicCode = "yn")
248 private String isDangerous;
231 249
232 } 250 }
......
...@@ -62,6 +62,10 @@ public class EquipmentSparepartSuppliesVO { ...@@ -62,6 +62,10 @@ public class EquipmentSparepartSuppliesVO {
62 @Excel(name = "规格型号", width = 15) 62 @Excel(name = "规格型号", width = 15)
63 @ApiModelProperty(value = "规格型号") 63 @ApiModelProperty(value = "规格型号")
64 private String specification; 64 private String specification;
65 /**所属厂区*/
66 @ApiModelProperty(value = "所属厂区")
67 @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name")
68 private String departId;
65 /** 69 /**
66 * 生产厂商 70 * 生产厂商
67 */ 71 */
...@@ -216,4 +220,14 @@ public class EquipmentSparepartSuppliesVO { ...@@ -216,4 +220,14 @@ public class EquipmentSparepartSuppliesVO {
216 */ 220 */
217 @TableField(exist = false) 221 @TableField(exist = false)
218 private String storageWarn; 222 private String storageWarn;
223
224 /** 是否应急物资 */
225 @ApiModelProperty(value = "是否应急物资")
226 @Dict(dicCode = "yn")
227 private String isEmergency;
228
229 /** 是否危化品 */
230 @ApiModelProperty(value = "是否危化品")
231 @Dict(dicCode = "yn")
232 private String isDangerous;
219 } 233 }
......
...@@ -85,7 +85,7 @@ public class SysFactoryUserInfoController { ...@@ -85,7 +85,7 @@ public class SysFactoryUserInfoController {
85 if(StringUtils.isEmpty(sysFactoryUserInfo.getDepartId())&&StringUtils.isNotBlank(departIds)) { 85 if(StringUtils.isEmpty(sysFactoryUserInfo.getDepartId())&&StringUtils.isNotBlank(departIds)) {
86 queryWrapper.in("depart_id", departIdArray); 86 queryWrapper.in("depart_id", departIdArray);
87 } 87 }
88 88 queryWrapper.eq(StringUtils.isNotEmpty(sysFactoryUserInfo.getDepartId()),"depart_id",sysFactoryUserInfo.getDepartId());
89 Page<SysFactoryUserInfo> page = new Page<SysFactoryUserInfo>(pageNo, pageSize); 89 Page<SysFactoryUserInfo> page = new Page<SysFactoryUserInfo>(pageNo, pageSize);
90 IPage<SysFactoryUserInfo> pageList = sysFactoryUserInfoService.page(page, queryWrapper); 90 IPage<SysFactoryUserInfo> pageList = sysFactoryUserInfoService.page(page, queryWrapper);
91 result.setSuccess(true); 91 result.setSuccess(true);
......
...@@ -121,20 +121,16 @@ public class SysUserController { ...@@ -121,20 +121,16 @@ public class SysUserController {
121 * @param user 121 * @param user
122 * @param pageNo 122 * @param pageNo
123 * @param pageSize 123 * @param pageSize
124 * @param req
125 * @return 124 * @return
126 */ 125 */
127 @RequestMapping(value = "/list", method = RequestMethod.GET) 126 @RequestMapping(value = "/list", method = RequestMethod.GET)
128 public Result<IPage<SysUser>> queryPageList(SysUser user, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, 127 public Result<IPage<SysUser>> queryPageList(SysUser user, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
129 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { 128 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
130 Result<IPage<SysUser>> result = new Result<IPage<SysUser>>(); 129 Result<IPage<SysUser>> result = new Result<IPage<SysUser>>();
131 //QueryWrapper<SysUser> queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap());
132 List<String> factorys = new ArrayList<>(); 130 List<String> factorys = new ArrayList<>();
133 if (!BaseContextHandler.getUserLoginName().equals("superadmin")) { 131 if (!BaseContextHandler.getUserLoginName().equals("superadmin")) {
134 user.setIsSystemUser("0"); 132 user.setIsSystemUser("0");
135 List<String> departIds = sysUserDepartService.queryDepartIdsOfUserId(BaseContextHandler.getUserId()); 133 List<String> departIds = sysUserDepartService.queryDepartIdsOfUserId(BaseContextHandler.getUserId());
136 //List<String> userIds= sysUserDepartService.queryUserIdBydepartIds(departIds.toArray(new String[departIds.size()]));
137 //queryWrapper.in("id",userIds);
138 factorys.addAll(departIds); 134 factorys.addAll(departIds);
139 if (!StringUtils.isBlank(user.getAreaId())) { 135 if (!StringUtils.isBlank(user.getAreaId())) {
140 List<String> list = new ArrayList<>(); 136 List<String> list = new ArrayList<>();
...@@ -142,7 +138,6 @@ public class SysUserController { ...@@ -142,7 +138,6 @@ public class SysUserController {
142 List<String> list1 = sysUserDepartService.loopDepart(list); 138 List<String> list1 = sysUserDepartService.loopDepart(list);
143 factorys.addAll(list1); 139 factorys.addAll(list1);
144 } 140 }
145
146 if (!CollectionUtils.isEmpty(factorys)) { 141 if (!CollectionUtils.isEmpty(factorys)) {
147 user.setDepartIds(factorys.toArray(new String[factorys.size()])); 142 user.setDepartIds(factorys.toArray(new String[factorys.size()]));
148 } 143 }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!