Browse Source

作废、sop编辑修改

wangliang 1 năm trước cách đây
mục cha
commit
58c62843b8

+ 4 - 4
sop-business/src/main/java/com/qmth/sop/business/activiti/service/impl/ActivitiServiceImpl.java

@@ -776,13 +776,13 @@ public class ActivitiServiceImpl implements ActivitiService {
             if (tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW && tfFlowApprove.getSetup().intValue() >= 4
                     && tfFlowApprove.getSetup().intValue() < 8) {
                 FlowTaskResult flowTaskResultDeviceOut = tbSopInfoService.getFormProperties(tfCustomFlowEntity, 4);
-                tbDeviceDeliveryService.updateDeviceRelated(flowTaskResultDeviceOut, tfCustomFlowEntity.getCrmNo(),
-                        tfCustomFlowEntity.getCode(), null, sysUser.getId(), false);
+                tbDeviceDeliveryService.updateDeviceRelated(flowTaskResultDeviceOut, tfCustomFlowEntity.getCode(), null,
+                        sysUser.getId(), false);
             } else if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW
                     && tfFlowApprove.getSetup().intValue() >= 4) {
                 FlowTaskResult flowTaskResultDeviceOut = tbSopInfoService.getFormProperties(tfCustomFlowEntity, 4);
-                tbDeviceDeliveryService.updateDeviceRelated(flowTaskResultDeviceOut, tfCustomFlowEntity.getCrmNo(),
-                        tfCustomFlowEntity.getCode(), DeviceDeliveryStatusEnum.RECEIVE, sysUser.getId(), true);
+                tbDeviceDeliveryService.updateDeviceRelated(flowTaskResultDeviceOut, tfCustomFlowEntity.getCode(),
+                        DeviceDeliveryStatusEnum.RECEIVE, sysUser.getId(), true);
             }
 
             FlowResult flowResult = JSONObject.parseObject(tfCustomFlowEntity.getFlowProcessVar(), FlowResult.class);

+ 3 - 5
sop-business/src/main/java/com/qmth/sop/business/service/TBDeviceDeliveryService.java

@@ -140,22 +140,20 @@ public interface TBDeviceDeliveryService extends IService<TBDeviceDelivery> {
      * 根据sop表单信息更新状态
      *
      * @param flowTaskResult
-     * @param crmNo
      * @param status
      * @param userId
      */
-    void updateStatusBySop(FlowTaskResult flowTaskResult, String crmNo, DeviceDeliveryStatusEnum status, Long userId);
+    void updateStatusBySop(FlowTaskResult flowTaskResult, DeviceDeliveryStatusEnum status, Long userId);
 
     /**
      * 更新设备相关
      *
      * @param flowTaskResult
-     * @param crmNo
      * @param sopNo
      * @param status
      * @param userId
      * @param deviceDeliveryUpdate
      */
-    void updateDeviceRelated(FlowTaskResult flowTaskResult, String crmNo, String sopNo, DeviceDeliveryStatusEnum status,
-            Long userId, Boolean deviceDeliveryUpdate);
+    void updateDeviceRelated(FlowTaskResult flowTaskResult, String sopNo, DeviceDeliveryStatusEnum status, Long userId,
+            Boolean deviceDeliveryUpdate);
 }

+ 6 - 10
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBDeviceDeliveryServiceImpl.java

@@ -478,14 +478,12 @@ public class TBDeviceDeliveryServiceImpl extends ServiceImpl<TBDeviceDeliveryMap
      * 根据sop表单信息更新状态
      *
      * @param flowTaskResult
-     * @param crmNo
      * @param status
      * @param userId
      */
     @Override
     @Transactional
-    public void updateStatusBySop(FlowTaskResult flowTaskResult, String crmNo, DeviceDeliveryStatusEnum status,
-            Long userId) {
+    public void updateStatusBySop(FlowTaskResult flowTaskResult, DeviceDeliveryStatusEnum status, Long userId) {
         List<FlowFormWidgetResult> flowFormWidgetResultList = flowTaskResult.getFormProperty();
         List<String> deviceSerialNoList = new ArrayList<>();
         for (FlowFormWidgetResult t : flowFormWidgetResultList) {
@@ -500,8 +498,8 @@ public class TBDeviceDeliveryServiceImpl extends ServiceImpl<TBDeviceDeliveryMap
             }
         }
         List<TBDeviceDelivery> tbDeviceDeliveryList = this.list(
-                new QueryWrapper<TBDeviceDelivery>().lambda().eq(TBDeviceDelivery::getCrmNo, crmNo)
-                        .eq(TBDeviceDelivery::getEffect, true).in(TBDeviceDelivery::getSerialNo, deviceSerialNoList));
+                new QueryWrapper<TBDeviceDelivery>().lambda().eq(TBDeviceDelivery::getEffect, true)
+                        .in(TBDeviceDelivery::getSerialNo, deviceSerialNoList));
         if (!CollectionUtils.isEmpty(tbDeviceDeliveryList)) {
             for (TBDeviceDelivery t : tbDeviceDeliveryList) {
                 t.setStatus(status);
@@ -517,7 +515,6 @@ public class TBDeviceDeliveryServiceImpl extends ServiceImpl<TBDeviceDeliveryMap
      * 更新设备相关
      *
      * @param flowTaskResult
-     * @param crmNo
      * @param sopNo
      * @param status
      * @param userId
@@ -525,8 +522,8 @@ public class TBDeviceDeliveryServiceImpl extends ServiceImpl<TBDeviceDeliveryMap
      */
     @Override
     @Transactional
-    public void updateDeviceRelated(FlowTaskResult flowTaskResult, String crmNo, String sopNo,
-            DeviceDeliveryStatusEnum status, Long userId, Boolean deviceDeliveryUpdate) {
+    public void updateDeviceRelated(FlowTaskResult flowTaskResult, String sopNo, DeviceDeliveryStatusEnum status,
+            Long userId, Boolean deviceDeliveryUpdate) {
         List<FlowFormWidgetResult> flowFormWidgetResultList = flowTaskResult.getFormProperty();
         List<String> deviceSerialNoList = new ArrayList<>();
         for (FlowFormWidgetResult t : flowFormWidgetResultList) {
@@ -559,8 +556,7 @@ public class TBDeviceDeliveryServiceImpl extends ServiceImpl<TBDeviceDeliveryMap
         }
         if (deviceDeliveryUpdate) {
             List<TBDeviceDelivery> tbDeviceDeliveryList = this.list(
-                    new QueryWrapper<TBDeviceDelivery>().lambda().eq(TBDeviceDelivery::getCrmNo, crmNo)
-                            .eq(TBDeviceDelivery::getEffect, true)
+                    new QueryWrapper<TBDeviceDelivery>().lambda().eq(TBDeviceDelivery::getEffect, true)
                             .in(TBDeviceDelivery::getSerialNo, deviceSerialNoList));
             if (!CollectionUtils.isEmpty(tbDeviceDeliveryList)) {
                 for (TBDeviceDelivery t : tbDeviceDeliveryList) {

+ 4 - 4
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -1017,8 +1017,8 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
 
                     //现场环境测试后,设备发货管理里的设备通过序列号匹配更新为签收
                     FlowTaskResult flowTaskResultDeviceOut = this.getFormProperties(tfCustomFlowEntity, 4);
-                    tbDeviceDeliveryService.updateStatusBySop(flowTaskResultDeviceOut, tfCustomFlowEntity.getCrmNo(),
-                            DeviceDeliveryStatusEnum.RECEIVE, sysUser.getId());
+                    tbDeviceDeliveryService.updateStatusBySop(flowTaskResultDeviceOut, DeviceDeliveryStatusEnum.RECEIVE,
+                            sysUser.getId());
                 } else if (tfFlowApprove.getSetup().intValue() == 7) {//校验收尾
                     FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 2);
                     processLimitedTime = this.getProcessLimitedTime(flowTaskResult,
@@ -1258,8 +1258,8 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
                 tbSopInfoService.sopDeviceInOutSave(map, 4);
                 if (tfFlowApprove.getSetup().intValue() > 5) {
                     FlowTaskResult flowTaskResultDeviceOut = this.getFormProperties(tfCustomFlowEntity, 4);
-                    tbDeviceDeliveryService.updateStatusBySop(flowTaskResultDeviceOut, tfCustomFlowEntity.getCrmNo(),
-                            DeviceDeliveryStatusEnum.RECEIVE, sysUser.getId());
+                    tbDeviceDeliveryService.updateStatusBySop(flowTaskResultDeviceOut, DeviceDeliveryStatusEnum.RECEIVE,
+                            sysUser.getId());
                 }
             }