|
|
@@ -11,6 +11,7 @@ import com.unissoft.dto.ProcessToBeDone;
|
|
11
|
11
|
import com.unissoft.dto.SendNoticeVO;
|
|
12
|
12
|
import com.unissoft.dto.SysNoticeVO;
|
|
13
|
13
|
import com.unissoft.dto.ToBeDoneCallbackVO;
|
|
|
14
|
+import com.unissoft.equipmentStroe.service.EquipmentStroeService;
|
|
14
|
15
|
import com.unissoft.feign.MessageFeign;
|
|
15
|
16
|
import com.unissoft.feign.SystemFeign;
|
|
16
|
17
|
import com.unissoft.mapper.*;
|
|
|
@@ -69,6 +70,9 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
69
|
70
|
|
|
70
|
71
|
@Autowired
|
|
71
|
72
|
private RestTemplate restTemplate;
|
|
|
73
|
+
|
|
|
74
|
+ @Autowired
|
|
|
75
|
+ private EquipmentStroeService quipmentStroeServicee;
|
|
72
|
76
|
|
|
73
|
77
|
|
|
74
|
78
|
@Override
|
|
|
@@ -175,6 +179,16 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
175
|
179
|
processAudit.setProcessId(uuId); //多条数据时,流程标识取第一条的
|
|
176
|
180
|
}
|
|
177
|
181
|
processAuditMapper.insert(processAudit);
|
|
|
182
|
+ if(type.equals("sbwx") || type.equals("sbbf")){
|
|
|
183
|
+ //修改器材库的状态
|
|
|
184
|
+ EquipmentStroe entity = new EquipmentStroe();
|
|
|
185
|
+ if(type.equals("sbwx")){
|
|
|
186
|
+ entity.setState(1);
|
|
|
187
|
+ }else if(type.equals("sbbf")){
|
|
|
188
|
+ entity.setState(2);
|
|
|
189
|
+ }
|
|
|
190
|
+ quipmentStroeServicee.updateById(entity);
|
|
|
191
|
+ }
|
|
178
|
192
|
}
|
|
179
|
193
|
|
|
180
|
194
|
/*
|
|
|
@@ -279,23 +293,25 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
279
|
293
|
|
|
280
|
294
|
if("" != equipmentId+""){
|
|
281
|
295
|
ew.eq("equipment_id", equipmentId);
|
|
282
|
|
- }
|
|
283
|
|
- if (StringUtils.isNotBlank(object.optString("type"))) {
|
|
284
|
|
- if(object.optString("type").equals("xz") || object.optString("type").equals("sswx") || object.optString("type").equals("sbly")){
|
|
285
|
|
- ew.like("type",object.optString("type"));
|
|
286
|
|
- ew.eq("result", 1);//取第一条数据
|
|
287
|
|
- }else{
|
|
288
|
|
- ew.eq("type", object.optString("type"));
|
|
289
|
|
- if(object.optString("type").equals("yjbg")){//药剂保管
|
|
290
|
|
- ew.eq("result", 2);//药剂保管d第一条数据
|
|
291
|
|
- }else{
|
|
292
|
|
- ew.eq("result", 1);//取第一条数据
|
|
293
|
|
- }
|
|
294
|
|
- }
|
|
295
|
|
-
|
|
296
|
296
|
}else{
|
|
297
|
|
- ew.eq("result", 1);//取第一条数据
|
|
|
297
|
+ if (StringUtils.isNotBlank(object.optString("type"))) {
|
|
|
298
|
+ if(object.optString("type").equals("xz") || object.optString("type").equals("sswx") || object.optString("type").equals("sbly")){
|
|
|
299
|
+ ew.like("type",object.optString("type"));
|
|
|
300
|
+ ew.eq("result", 1);//取第一条数据
|
|
|
301
|
+ }else{
|
|
|
302
|
+ ew.eq("type", object.optString("type"));
|
|
|
303
|
+ if(object.optString("type").equals("yjbg")){//药剂保管
|
|
|
304
|
+ ew.eq("result", 2);//药剂保管d第一条数据
|
|
|
305
|
+ }else{
|
|
|
306
|
+ ew.eq("result", 1);//取第一条数据
|
|
|
307
|
+ }
|
|
|
308
|
+ }
|
|
|
309
|
+
|
|
|
310
|
+ }else{
|
|
|
311
|
+ ew.eq("result", 1);//取第一条数据
|
|
|
312
|
+ }
|
|
298
|
313
|
}
|
|
|
314
|
+
|
|
299
|
315
|
if (StringUtils.isNotBlank(object.optString("houseId"))) {
|
|
300
|
316
|
ew.eq("house_id", object.optString("houseId"));
|
|
301
|
317
|
}
|
|
|
@@ -1699,6 +1715,8 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
1699
|
1715
|
Integer depotId = jsStr.optInt("depotId");//库id
|
|
1700
|
1716
|
Integer auditState = jsStr.optInt("auditState");//状态
|
|
1701
|
1717
|
JSONArray jsonArray = jsStr.optJSONArray("subList");//子流程数据
|
|
|
1718
|
+ Integer equipmentId = jsStr.optInt("equipmentId");//状态
|
|
|
1719
|
+ String equipmentNameCode = jsStr.optString("equipmentNameCode");//状态
|
|
1702
|
1720
|
JSONObject row = null;
|
|
1703
|
1721
|
for (int i = 0; i < jsonArray.length(); i++) {
|
|
1704
|
1722
|
row = jsonArray.getJSONObject(i);
|
|
|
@@ -1734,6 +1752,11 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
1734
|
1752
|
}else{//第一次新增
|
|
1735
|
1753
|
//第一条数据新增
|
|
1736
|
1754
|
ProcessAudit processAudit = new ProcessAudit();
|
|
|
1755
|
+ if(type.equals("sbtz")){
|
|
|
1756
|
+ processAudit.setWorkName(EnumProcessModel.sbtz.getName());
|
|
|
1757
|
+ }else if(type.equals("sbdwgl")){
|
|
|
1758
|
+ processAudit.setWorkName(EnumProcessModel.sbdwgl.getName());
|
|
|
1759
|
+ }
|
|
1737
|
1760
|
processAudit.setType(type);
|
|
1738
|
1761
|
processAudit.setSubData(subData);
|
|
1739
|
1762
|
processAudit.setSubId(subId);
|
|
|
@@ -1746,6 +1769,8 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
1746
|
1769
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
1747
|
1770
|
String dateString = formatter.format(date);
|
|
1748
|
1771
|
processAudit.setApplyTime(dateString);
|
|
|
1772
|
+ processAudit.setEquipmentId(equipmentId);
|
|
|
1773
|
+ processAudit.setEquipmentNameCode(equipmentNameCode);
|
|
1749
|
1774
|
processAuditMapper.insert(processAudit);
|
|
1750
|
1775
|
}
|
|
1751
|
1776
|
|