소스 검색

bug修改 pcr流程有变动 其他暂时不动

wwh 1 년 전
부모
커밋
b8f6d61186

+ 4 - 2
huimv-receive/src/main/java/com/huimv/receive/controller/BaseWashoutPointController.java

@@ -6,6 +6,7 @@ import com.huimv.receive.common.utils.Result;
 import com.huimv.receive.common.utils.ResultCode;
 import com.huimv.receive.common.utils.ResultCode;
 import com.huimv.receive.entity.BaseWashoutPoint;
 import com.huimv.receive.entity.BaseWashoutPoint;
 import com.huimv.receive.entity.dto.GetWashoutPointDto;
 import com.huimv.receive.entity.dto.GetWashoutPointDto;
+import com.huimv.receive.entity.vo.WashOutVo;
 import com.huimv.receive.service.IBaseWashoutPointService;
 import com.huimv.receive.service.IBaseWashoutPointService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.CrossOrigin;
@@ -35,8 +36,9 @@ public class BaseWashoutPointController {
     private IBaseWashoutPointService washoutPointService;
     private IBaseWashoutPointService washoutPointService;
 
 
     @RequestMapping("/add")
     @RequestMapping("/add")
-    public Result add(HttpServletRequest httpServletRequest, @RequestBody List<GetWashoutPointDto> list) {
-        return washoutPointService.add(httpServletRequest, list);
+    public Result add(HttpServletRequest httpServletRequest,
+                      @RequestBody WashOutVo washOutVo) {
+        return washoutPointService.add(httpServletRequest, washOutVo);
     }
     }
 
 
     @RequestMapping("/list")
     @RequestMapping("/list")

+ 1 - 1
huimv-receive/src/main/java/com/huimv/receive/controller/LoginController.java

@@ -387,7 +387,7 @@ public class LoginController {
                                @RequestParam("openId") String openId) throws IOException {
                                @RequestParam("openId") String openId) throws IOException {
         String remoteHost = req.getRemoteHost();
         String remoteHost = req.getRemoteHost();
         QueryWrapper<SysAccountMultilevel> queryWrapper = new QueryWrapper<>();
         QueryWrapper<SysAccountMultilevel> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("phone", phone).or().eq("papers_code", papersCode).eq("type",7);
+        queryWrapper.eq("type",7).and(i->i.eq("phone", phone).or().eq("papers_code", papersCode));
         if (ObjectUtil.isNotEmpty(accountMultilevelService.getOne(queryWrapper))) {
         if (ObjectUtil.isNotEmpty(accountMultilevelService.getOne(queryWrapper))) {
             return new Result(10001, "该手机号或身份证号已被使用!", false);
             return new Result(10001, "该手机号或身份证号已被使用!", false);
         }
         }

+ 12 - 0
huimv-receive/src/main/java/com/huimv/receive/entity/vo/WashOutVo.java

@@ -0,0 +1,12 @@
+package com.huimv.receive.entity.vo;
+
+import com.huimv.receive.entity.dto.GetWashoutPointDto;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class WashOutVo {
+    private String farmId;
+    private List<GetWashoutPointDto> washoutPointDtos;
+}

+ 2 - 1
huimv-receive/src/main/java/com/huimv/receive/service/IBaseWashoutPointService.java

@@ -4,6 +4,7 @@ import com.huimv.receive.common.utils.Result;
 import com.huimv.receive.entity.BaseWashoutPoint;
 import com.huimv.receive.entity.BaseWashoutPoint;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.huimv.receive.entity.dto.GetWashoutPointDto;
 import com.huimv.receive.entity.dto.GetWashoutPointDto;
+import com.huimv.receive.entity.vo.WashOutVo;
 
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import java.util.List;
 import java.util.List;
@@ -20,7 +21,7 @@ import java.util.Map;
 public interface IBaseWashoutPointService extends IService<BaseWashoutPoint> {
 public interface IBaseWashoutPointService extends IService<BaseWashoutPoint> {
     Result list(HttpServletRequest httpServletRequest,Map<String,String> paramsMap);
     Result list(HttpServletRequest httpServletRequest,Map<String,String> paramsMap);
 
 
-    Result add(HttpServletRequest httpServletRequest, List<GetWashoutPointDto> washoutPointDtos);
+    Result add(HttpServletRequest httpServletRequest, WashOutVo washOutVo);
 
 
     Result delete(HttpServletRequest httpServletRequest,Map<String,String> paramsMap);
     Result delete(HttpServletRequest httpServletRequest,Map<String,String> paramsMap);
 
 

+ 8 - 8
huimv-receive/src/main/java/com/huimv/receive/service/impl/BaseWashoutPointServiceImpl.java

@@ -14,6 +14,7 @@ import com.huimv.receive.entity.dto.GetFlowListDto;
 import com.huimv.receive.entity.dto.GetWashoutPointDto;
 import com.huimv.receive.entity.dto.GetWashoutPointDto;
 import com.huimv.receive.entity.dto.WashListDto;
 import com.huimv.receive.entity.dto.WashListDto;
 import com.huimv.receive.entity.vo.DestVo;
 import com.huimv.receive.entity.vo.DestVo;
+import com.huimv.receive.entity.vo.WashOutVo;
 import com.huimv.receive.mapper.BaseProcessMapper;
 import com.huimv.receive.mapper.BaseProcessMapper;
 import com.huimv.receive.mapper.BaseVisitingMapper;
 import com.huimv.receive.mapper.BaseVisitingMapper;
 import com.huimv.receive.mapper.BaseWashoutPointMapper;
 import com.huimv.receive.mapper.BaseWashoutPointMapper;
@@ -60,7 +61,7 @@ public class BaseWashoutPointServiceImpl extends ServiceImpl<BaseWashoutPointMap
             for (BaseVisiting visiting : visitings) {
             for (BaseVisiting visiting : visitings) {
                 Integer type = visiting.getId();
                 Integer type = visiting.getId();
                 List<BaseWashoutPoint> list = washoutPointMapper.selectList(new QueryWrapper<BaseWashoutPoint>()
                 List<BaseWashoutPoint> list = washoutPointMapper.selectList(new QueryWrapper<BaseWashoutPoint>()
-                        .like("farm_ids", farmId).eq("visiting_type", type));
+                        .eq("farm_ids", farmId).eq("visiting_type", type));
                 List<WashListDto> washListDtos = new ArrayList<>();
                 List<WashListDto> washListDtos = new ArrayList<>();
                 if (list.size() != 0) {
                 if (list.size() != 0) {
                     for (BaseWashoutPoint point : list) {
                     for (BaseWashoutPoint point : list) {
@@ -84,13 +85,12 @@ public class BaseWashoutPointServiceImpl extends ServiceImpl<BaseWashoutPointMap
     }
     }
 
 
     @Override
     @Override
-    public Result add(HttpServletRequest httpServletRequest, List<GetWashoutPointDto> washoutPointDtos) {
-        Integer id = TokenSign.getMemberIdByJwtToken(httpServletRequest);
-        SysAccountMultilevel multilevel = accountMultilevelMapper.selectById(id);
-        String farmIds = multilevel.getLastFarmId().toString();
+    public Result add(HttpServletRequest httpServletRequest, WashOutVo washOutVo) {
+        List<GetWashoutPointDto> washoutPointDtos = washOutVo.getWashoutPointDtos();
+        String farmId = washOutVo.getFarmId();
         //如果当前存在进行中流程,则初始化流程配置不能修改或删除
         //如果当前存在进行中流程,则初始化流程配置不能修改或删除
         QueryWrapper<BaseProcess> processQueryWrapper = new QueryWrapper<>();
         QueryWrapper<BaseProcess> processQueryWrapper = new QueryWrapper<>();
-        processQueryWrapper.eq("farm_id", farmIds);
+        processQueryWrapper.eq("farm_id", farmId);
         List<BaseProcess> processes = processMapper.selectList(processQueryWrapper);
         List<BaseProcess> processes = processMapper.selectList(processQueryWrapper);
         if (processes.size() > 0) {
         if (processes.size() > 0) {
             return new Result(10001, "当前存在进行中流程,无法修改", true);
             return new Result(10001, "当前存在进行中流程,无法修改", true);
@@ -98,7 +98,7 @@ public class BaseWashoutPointServiceImpl extends ServiceImpl<BaseWashoutPointMap
 
 
         //访问类型集合
         //访问类型集合
         QueryWrapper<BaseWashoutPoint> queryWrapper = new QueryWrapper<>();
         QueryWrapper<BaseWashoutPoint> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("farm_ids",farmIds);
+        queryWrapper.eq("farm_ids",farmId);
         washoutPointMapper.delete(queryWrapper);
         washoutPointMapper.delete(queryWrapper);
         for (GetWashoutPointDto washoutPointDto : washoutPointDtos) {
         for (GetWashoutPointDto washoutPointDto : washoutPointDtos) {
             //流程集合
             //流程集合
@@ -113,7 +113,7 @@ public class BaseWashoutPointServiceImpl extends ServiceImpl<BaseWashoutPointMap
                 washoutPoint.setPcrTime(washListDto.getPcrTime());
                 washoutPoint.setPcrTime(washListDto.getPcrTime());
                 washoutPoint.setVisitingType(washoutPointDto.getVisitingType());
                 washoutPoint.setVisitingType(washoutPointDto.getVisitingType());
                 washoutPoint.setTailLocationName(washListDto.getNextName());
                 washoutPoint.setTailLocationName(washListDto.getNextName());
-                washoutPoint.setFarmIds(farmIds);
+                washoutPoint.setFarmIds(farmId);
                 washoutPoint.setPointLevel(i);
                 washoutPoint.setPointLevel(i);
                 washoutPointMapper.insert(washoutPoint);
                 washoutPointMapper.insert(washoutPoint);
                 i++;
                 i++;

+ 50 - 25
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillPcrServiceImpl.java

@@ -305,7 +305,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
         Page<BillPcr> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
         Page<BillPcr> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
         BaseLocation baseLocation = locationMapper.selectById(TokenSign.getWorkIdByJwtToken(httpServletRequest));
         BaseLocation baseLocation = locationMapper.selectById(TokenSign.getWorkIdByJwtToken(httpServletRequest));
         QueryWrapper<BillPcr> queryWrapper = new QueryWrapper<>();
         QueryWrapper<BillPcr> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("test_location_id",baseLocation.getId()).orderByDesc("sub_date");
+        queryWrapper.eq("test_location_id", baseLocation.getId()).orderByDesc("sub_date");
         if ("0".equals(type)) {
         if ("0".equals(type)) {
             queryWrapper.in("bill_status", 0, 1, 2, 3);
             queryWrapper.in("bill_status", 0, 1, 2, 3);
         }
         }
@@ -319,7 +319,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
             queryWrapper.in("bill_status", 2, 3);
             queryWrapper.in("bill_status", 2, 3);
         }
         }
         QueryWrapper<BillPcr> queryWrapper2 = new QueryWrapper<>();
         QueryWrapper<BillPcr> queryWrapper2 = new QueryWrapper<>();
-        queryWrapper2.eq("test_location_id",baseLocation.getId()).orderByDesc("sub_date");
+        queryWrapper2.eq("test_location_id", baseLocation.getId()).orderByDesc("sub_date");
         queryWrapper2.eq("bill_status", 0);
         queryWrapper2.eq("bill_status", 0);
         return new Result(ResultCode.SUCCESS, pcrMapper.selectPage(page, queryWrapper), pcrMapper.selectCount(queryWrapper2));
         return new Result(ResultCode.SUCCESS, pcrMapper.selectPage(page, queryWrapper), pcrMapper.selectCount(queryWrapper2));
     }
     }
@@ -418,13 +418,17 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                 if (nextId == 0) {
                 if (nextId == 0) {
                     if (split.length == 1) {
                     if (split.length == 1) {
                         baseProcess.setProcessType(1);
                         baseProcess.setProcessType(1);
-                        if (allLocationId.length() > 9) {
-                            baseProcess.setAllLocationStatus("2,2,2,2,2,2,2");
-                        } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
-                            baseProcess.setAllLocationStatus("2,2,2,2,2");
-                        } else {
-                            baseProcess.setAllLocationStatus("2,2,2");
+                        String[] strings = allLocationId.split(",");
+                        String ss2 = "";
+                        for (int i = 0; i < strings.length; i++) {
+                            strings[i].replaceAll(strings[i], "2");
+                            if (i == strings.length - 1) {
+                                ss2 = ss2 + strings[i].replaceAll(strings[i], "2");
+                            } else {
+                                ss2 = strings[i].replaceAll(strings[i], "2") + "," + ss2;
+                            }
                         }
                         }
+                        baseProcess.setAllLocationStatus(ss2);
                     } else {
                     } else {
                         String[] strings = allLocationId.split(",");
                         String[] strings = allLocationId.split(",");
                         Integer index = 0;
                         Integer index = 0;
@@ -513,8 +517,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                                 before.setRemark(billPcr.getRemark());
                                 before.setRemark(billPcr.getRemark());
                             }
                             }
                             beforeMapper.insert(before);
                             beforeMapper.insert(before);
-                        }
-                        else if (Integer.parseInt(split[1]) == 7) {
+                        } else if (Integer.parseInt(split[1]) == 7) {
                             //新增洗澡前拍照
                             //新增洗澡前拍照
                             BillGoodsInventory before = (BillGoodsInventory) entity;
                             BillGoodsInventory before = (BillGoodsInventory) entity;
                             if (billPcr.getVistitType() != 0) {
                             if (billPcr.getVistitType() != 0) {
@@ -528,15 +531,22 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                             inventoryMapper.insert(before);
                             inventoryMapper.insert(before);
                         }
                         }
                         baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
                         baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
-                        if (allLocationId.length() > 9) {
-                            if (index == 1) {
-                                baseProcess.setAllLocationStatus("2,2,2,1,0,0,0");
+
+                        Integer locationId = billPcr.getTestLocationId();
+                        int indexOf = allLocationId.indexOf(locationId);//当前位置在所有流程位置中的下标
+                        String substring = baseProcess.getAllLocationStatus().substring(0, indexOf + 3);//截取已经过的位置状态
+                        String[] split1 = substring.split(",");
+                        String sb2 = "";
+                        for (int i = 0; i < split1.length; i++) {
+                            if (i == split1.length - 1) {
+                                sb2 = sb2 + split1[i].replaceAll(split1[i], "2");
                             } else {
                             } else {
-                                baseProcess.setAllLocationStatus("2,2,2,2,2,1,0");
+                                sb2 = split1[i].replaceAll(split1[i], "2") + "," + sb2;
                             }
                             }
-                        } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
-                            baseProcess.setAllLocationStatus("2,2,2,1,0");
                         }
                         }
+                        sb2 = sb2 + baseProcess.getAllLocationStatus().substring(indexOf + 3);
+                        baseProcess.setAllLocationStatus(sb2);
+
                     }
                     }
                 } else if (nextId == 1) {
                 } else if (nextId == 1) {
                     //新增采样
                     //新增采样
@@ -616,8 +626,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                     }
                     }
                     beforeMapper.insert(before);
                     beforeMapper.insert(before);
                     baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                     baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
-                }
-                else if (nextId == 7) {
+                } else if (nextId == 7) {
                     //新增洗澡前拍照
                     //新增洗澡前拍照
                     BillGoodsInventory before = (BillGoodsInventory) newObject;
                     BillGoodsInventory before = (BillGoodsInventory) newObject;
                     if (billPcr.getVistitType() != 0) {
                     if (billPcr.getVistitType() != 0) {
@@ -731,7 +740,23 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
     }
     }
 
 
     public static void main(String[] args) {
     public static void main(String[] args) {
-        String s = "0,1,0,2,0";
+        String s = "0,1,0,2,0,3,0";
+        String a = "1,1,1,1,1,1,1";
+        String s1 = "3";
+        String s3 = a.substring(0, s.indexOf(s1) + 3);
+//        System.out.println(s.indexOf(s1));
+        String[] split = s3.split(",");
+        String s2 = "";
+        for (int i = 0; i < split.length; i++) {
+            if (i == split.length - 1) {
+                s2 = s2 + split[i].replaceAll(split[i], "2");
+            } else {
+                s2 = split[i].replaceAll(split[i], "2") + "," + s2;
+            }
+        }
+        System.out.println(s2);
+        s2 = s2 + s.substring(s.indexOf(s1) + 3);
+        System.out.println(s2);
 //        String[] split = s.split(",");
 //        String[] split = s.split(",");
 //        Integer index = 0;
 //        Integer index = 0;
 //        for (int i = 0; i < split.length; i++) {
 //        for (int i = 0; i < split.length; i++) {
@@ -746,12 +771,12 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
 //        sb.setCharAt(a,'0');
 //        sb.setCharAt(a,'0');
 //        System.out.println(sb.toString());
 //        System.out.println(sb.toString());
 
 
-        String s1 = "2,0,0";
-        System.out.println(s1.indexOf("2"));
-        StringBuilder sb = new StringBuilder(s1);
-        sb.setCharAt(2, '1');
-        sb.setCharAt(4, '1');
-        System.out.println(sb.toString());
+//        String s1 = "2,0,0";
+//        System.out.println(s1.indexOf("2"));
+//        StringBuilder sb = new StringBuilder(s1);
+//        sb.setCharAt(2, '1');
+//        sb.setCharAt(4, '1');
+//        System.out.println(sb.toString());
 
 
     }
     }
 
 

+ 2 - 2
huimv-receive/src/main/java/com/huimv/receive/service/impl/LoginServiceImpl.java

@@ -30,7 +30,7 @@ public class LoginServiceImpl implements ILoginService {
     public Result loginMultilevel(String accountName, String password) {
     public Result loginMultilevel(String accountName, String password) {
 
 
         QueryWrapper<SysAccountMultilevel> wrapper = new QueryWrapper<>();
         QueryWrapper<SysAccountMultilevel> wrapper = new QueryWrapper<>();
-        wrapper.eq("account",accountName).eq("password",password);
+        wrapper.eq("account",accountName).eq("password",password).ne("type",7);
         SysAccountMultilevel accountMultilevel = accountMultilevelMapper.selectOne(wrapper);
         SysAccountMultilevel accountMultilevel = accountMultilevelMapper.selectOne(wrapper);
 
 
         if (ObjectUtil.isEmpty(accountMultilevel)){
         if (ObjectUtil.isEmpty(accountMultilevel)){
@@ -48,7 +48,7 @@ public class LoginServiceImpl implements ILoginService {
     @Override
     @Override
     public Result loginMultilevelClient(String accountName, String password) {
     public Result loginMultilevelClient(String accountName, String password) {
         QueryWrapper<SysAccountMultilevel> wrapper = new QueryWrapper<>();
         QueryWrapper<SysAccountMultilevel> wrapper = new QueryWrapper<>();
-        wrapper.eq("account",accountName).eq("password",password);
+        wrapper.eq("account",accountName).eq("password",password).ne("type",7);
         SysAccountMultilevel accountMultilevel = accountMultilevelMapper.selectOne(wrapper);
         SysAccountMultilevel accountMultilevel = accountMultilevelMapper.selectOne(wrapper);
 
 
         if (ObjectUtil.isEmpty(accountMultilevel)){
         if (ObjectUtil.isEmpty(accountMultilevel)){

+ 2 - 2
huimv-receive/src/main/resources/application-prod.yml

@@ -12,8 +12,8 @@ spring:
 
 
   servlet:
   servlet:
     multipart:
     multipart:
-      max-request-size: 100MB
-      max-file-size: 10MB
+      max-request-size: 200MB
+      max-file-size: 20MB
 
 
   datasource:
   datasource:
     druid:
     druid: