Kaynağa Gözat

外部报验功能-派单不用校验检验员

wangming 1 yıl önce
ebeveyn
işleme
f85119e7bd

+ 7 - 7
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxOutsideInspectionItpServiceImpl.java

@@ -209,7 +209,7 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
             /* 取消 */
             if ("10".equals(operType)) {
                 //监理检验员只能操作自己的数据
-                if(!dispatchDo.getSupervisionuserid().equals(user.getId())){
+                if(!user.getId().equals(dispatchDo.getSupervisionuserid())){
                     sb.append("单据号:"+inspectioncode+"已被改派,不能取消,请刷新数据查看<br>");
                     continue;
                 }
@@ -228,7 +228,7 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
                 dispatchDo.setDispatchstatus("30");
                 inspectionItpDo.setInspectionstatus("40");
             } else if ("20".equals(operType)) {
-                if(!dispatchDo.getSupervisionuserid().equals(user.getId())){
+                if(!user.getId().equals(dispatchDo.getSupervisionuserid())){
                     sb.append("单据号:"+inspectioncode+"已被改派,不能拒收,请刷新数据查看<br>");
                     continue;
                 }
@@ -239,10 +239,10 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
                 inspectionItpDo.setInspectionstatus("30");
             } else if (Arrays.asList("30", "40").contains(operType)) {
                 //监理检验员只能操作自己的数据
-                if(!dispatchDo.getSupervisionuserid().equals(user.getId())){
-                    sb.append("单据号:"+inspectioncode+"已被改派,不能取消,请刷新数据查看<br>");
-                    continue;
-                }
+//                if(!user.getId().equals(dispatchDo.getSupervisionuserid())){
+//                    sb.append("单据号:"+inspectioncode+"已被改派,不能取消,请刷新数据查看<br>");
+//                    continue;
+//                }
                 if ("30".equals(operType) && hasDispatch) {
                     //return "该报验单已派单";
                     sb.append("单据号:"+inspectioncode+"已派单<br>");
@@ -260,7 +260,7 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
             } else {
                 /* 接收/有条件接收 */
                 //不是本人的数据无法接收 Inspectionstatus=40代表取消
-                if(!dispatchDo.getSupervisionuserid().equals(user.getId())){
+                if(!user.getId().equals(dispatchDo.getSupervisionuserid())){
                     sb.append("单据号:"+inspectioncode+"已被改派,不能接收,请刷新数据查看<br>");
                     continue;
                 }

+ 3 - 0
business-server/src/main/java/com/rongwei/bsserver/controller/ZhcxOperOutsideInspectionController.java

@@ -5,6 +5,7 @@ import com.rongwei.bscommon.sys.service.ZhcxOutsideInspectionItpService;
 import com.rongwei.bscommon.sys.utils.LockUtils;
 import com.rongwei.bsentity.vo.OperOutsideInspectionVo;
 import com.rongwei.rwcommon.base.R;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -14,6 +15,7 @@ import java.util.List;
 
 @RestController
 @RequestMapping("/zhcxOperOutsideInspection")
+@Slf4j
 public class ZhcxOperOutsideInspectionController {
     @Autowired
     private ZhcxOutsideInspectionItpService inspectionService;
@@ -30,6 +32,7 @@ public class ZhcxOperOutsideInspectionController {
             R r = inspectionService.operInspectionStatus(vo);
             return r;
         } catch (Exception e) {
+            log.error("操作失败, {}", e);
             return R.errorWithMsg("操作失败");
         }finally {
             for(OperOutsideInspectionVo inspectionVo : vo){