|
|
@@ -1278,8 +1278,35 @@ public class BusinessDeliveryStorageNoticeServiceImpl implements BusinessDeliver
|
|
1278
|
1278
|
businessDeliveryStorageNoticeMapper.insert(businessDeliveryStorageNotice);
|
|
1279
|
1279
|
returnMap.put("id",businessDeliveryStorageNotice.getId());
|
|
1280
|
1280
|
|
|
|
1281
|
+ // 流程任务类型.
|
|
|
1282
|
+ TaskType taskType = null;
|
|
|
1283
|
+ try {
|
|
|
1284
|
+ if ("1".equals(businessDeliveryStorageNotice.getBillType())) {
|
|
|
1285
|
+ // 入库
|
|
|
1286
|
+ taskType = TaskType.storageNotice;
|
|
|
1287
|
+ // 入库通知单枚举id,出入库系统使用.
|
|
|
1288
|
+ businessDeliveryStorageNotice.setBillTypeId(STORAGENOTICEENUMID);
|
|
|
1289
|
+ // 设置通知单编号.
|
|
|
1290
|
+ //businessDeliveryStorageNotice.setBillNumber(basicCodeRuleService.getCode(CodeRuleType.storageNotice, depotInfo.getOrgId()));
|
|
|
1291
|
+ } else if ("3".equals(businessDeliveryStorageNotice.getBillType())) {
|
|
|
1292
|
+ // 出库
|
|
|
1293
|
+ taskType = TaskType.deliveryNotice;
|
|
|
1294
|
+ // 出库通知单枚举id,出入库系统使用.
|
|
|
1295
|
+ businessDeliveryStorageNotice.setBillTypeId(DELIVERYNOTICEENUMID);
|
|
|
1296
|
+ // 设置通知单编号.
|
|
|
1297
|
+ //businessDeliveryStorageNotice.setBillNumber(basicCodeRuleService.getCode(CodeRuleType.deliveryNotice, depotInfo.getOrgId()));
|
|
|
1298
|
+ } else {
|
|
|
1299
|
+ throw new RuntimeException("通知单类型有误,保存失败!");
|
|
|
1300
|
+ }
|
|
|
1301
|
+ } catch (Exception e) {
|
|
|
1302
|
+ e.printStackTrace();
|
|
|
1303
|
+ returnMap.put("error", e.getMessage());
|
|
|
1304
|
+ return returnMap;
|
|
|
1305
|
+ }
|
|
|
1306
|
+
|
|
|
1307
|
+
|
|
1281
|
1308
|
// ProcessInstance processInstance = actTaskService.startProcess(TaskType.contract.getTaskType(), contract.getId().toString(), name, userId.toString(), depotInfo.getOrgId().toString());
|
|
1282
|
|
- String startProcess1 = actTaskService.startProcessNew(TaskType.contract.getTaskType(), businessDeliveryStorageNotice.getId().toString(), name, userId.toString(), depotInfoOrgId.toString());
|
|
|
1309
|
+ String startProcess1 = actTaskService.startProcessNew(taskType.getTaskType(), businessDeliveryStorageNotice.getId().toString(), name, userId.toString(), depotInfoOrgId.toString());
|
|
1283
|
1310
|
JSONObject jsStr = JSONObject.parseObject(startProcess1);
|
|
1284
|
1311
|
String processInstanceId = jsStr.getString("processInstanceId");
|
|
1285
|
1312
|
String processDefinitionId = jsStr.getString("processDefinitionId");
|