wwh 1 týždeň pred
rodič
commit
50191fd38f

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

@@ -75,7 +75,7 @@ public class BillPcrController {
                           @RequestParam(value = "picture1",required = false) MultipartFile picture1,
                           @RequestParam(value = "picture2",required = false) MultipartFile picture2,
                           @RequestParam(value = "picture3",required = false) MultipartFile picture3) throws ParseException, IOException {
-        return pcrService.editBatch(httpServletRequest, farmId,ids,date,result,img1,img2,img3,picture1,picture2,picture3);
+        return pcrService.editBatch(httpServletRequest,farmId,ids,date,result,img1,img2,img3,picture1,picture2,picture3);
     }
     @Autowired
     private IBillPcrService billPcrService;

+ 7 - 0
huimv-receive/src/main/java/com/huimv/receive/controller/BillPersonnelAdmissionController.java

@@ -248,7 +248,14 @@ public class BillPersonnelAdmissionController {
         String ids = paramsMap.get("ids");
         String[] split = ids.split(",");
         for (String s : split) {
+            BillPersonnelAdmission admission = admissionService.getById(s);
+            if (admission.getBillStatus() == 0 || admission.getBillStatus() == 3) {
+                return new Result(10001, "删除失败!入场申请未审批", true);
+            }
+            BaseProcess baseProcess = processService.getById(admission.getProcessId());
             admissionService.removeById(s);
+            processService.removeById(baseProcess);
+
         }
         return new Result(10000, "删除成功!", true);
     }

+ 6 - 0
huimv-receive/src/main/java/com/huimv/receive/entity/vo/FactoryDirectorVo.java

@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 
 import java.time.LocalDateTime;
+import java.util.Date;
 
 @Data
 public class FactoryDirectorVo {
@@ -29,4 +30,9 @@ public class FactoryDirectorVo {
     private Integer type;
     private Integer count;
     private Integer processId;
+    private String  passUserName;
+    private Integer passUserId;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm" ,timezone = "GMT+8")
+    private Date passDate;
+
 }

+ 2 - 0
huimv-receive/src/main/java/com/huimv/receive/entity/vo/ProcessVo.java

@@ -14,4 +14,6 @@ public class ProcessVo extends BaseProcess {
     private Date vistitDate;
 
     private Integer admissionId;
+
+    private String carNum;
 }

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

@@ -29,7 +29,7 @@ public interface IBillPcrService extends IService<BillPcr> {
                 MultipartFile img1, MultipartFile img2, MultipartFile img3, MultipartFile picture1, MultipartFile picture2, MultipartFile picture3) throws ParseException, IOException;
 
     //pcr批量修改
-    Result editBatch(HttpServletRequest httpServletRequest,String farmId, String ids, String date, String result,
+    Result editBatch(HttpServletRequest httpServletRequest,String farmId,String ids, String date, String result,
                      MultipartFile img1, MultipartFile img2, MultipartFile img3, MultipartFile picture1, MultipartFile picture2, MultipartFile picture3) throws ParseException, IOException;
     Result listPersonalPcr(HttpServletRequest httpServletRequest, Map<String, String> paramsMap);
 

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

@@ -136,7 +136,14 @@ public class BaseProcessServiceImpl extends ServiceImpl<BaseProcessMapper, BaseP
         BaseProcess baseProcess = baseProcessMapper.selectById(processId);
         baseProcess.setProcessType(3);
         String currentFlowId = baseProcess.getCurrentFlowId();
-
+        //入场申请未审核,直接结束流程
+        BillPersonnelAdmission admission = admissionMapper.selectOne(new QueryWrapper<BillPersonnelAdmission>().eq("process_id", processId));
+        if (admission.getBillStatus() == 0) {
+            admission.setBillStatus(2);
+            admissionMapper.updateById(admission);
+            baseProcessMapper.updateById(baseProcess);
+            return new Result(ResultCode.SUCCESS);
+        }
         int count = 0;
         char l = '0';
         for (int i = 0; i < currentFlowId.length(); i++) {
@@ -150,13 +157,6 @@ public class BaseProcessServiceImpl extends ServiceImpl<BaseProcessMapper, BaseP
         String ss2=allLocationId.substring(0, a) + '4' + allLocationId.substring(a + 1);
         baseProcess.setAllLocationStatus(ss2);
 
-        //入场申请未审核,直接结束流程
-        if (currentFlowId.length() == 1 && "0".equals(currentFlowId)) {
-            BillPersonnelAdmission admission = admissionMapper.selectOne(new QueryWrapper<BillPersonnelAdmission>().eq("process_id", processId));
-            admission.setBillStatus(2);
-            admissionMapper.updateById(admission);
-        }
-
         String s = currentFlowId.substring(currentFlowId.length() - 1);
         if ("1".equals(s)) {
             BillSampling billSampling = samplingMapper.selectOne(new QueryWrapper<BillSampling>()

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

@@ -20,6 +20,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import org.springframework.web.multipart.MultipartFile;
+import sun.applet.Main;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -1226,7 +1227,7 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                 String status1 = baseProcess.getAllLocationStatus();
                 System.out.println(status1);
                 StringBuilder sb = new StringBuilder(status1);
-                sb.setCharAt(i, '3');
+                sb.setCharAt(i-1, '3');
                 baseProcess.setAllLocationStatus(sb.toString());
 
                 cleanMapper.updateById(billClean);
@@ -1547,7 +1548,7 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                     int i = allLocationId.indexOf(billClean.getTestLocationId().toString());
                     String status1 = baseProcess.getAllLocationStatus();
                     StringBuilder sb = new StringBuilder(status1);
-                    sb.setCharAt(i, '3');
+                    sb.setCharAt(i-1, '3');
                     baseProcess.setAllLocationStatus(sb.toString());
 
                     processMapper.updateById(baseProcess);
@@ -1560,6 +1561,7 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
 
     }
 
+
     @Override
     public Result listCount(HttpServletRequest httpServletRequest, Map<String, String> paramsMap) {
         String farmId = paramsMap.get("farmId");

+ 356 - 122
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillPcrServiceImpl.java

@@ -475,26 +475,35 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                         if (billPcr.getVistitType() == 0) {
                             //人员隔离中心流程
                             if (billPcr.getMidId() == 16 || billPcr.getMidId() == 29 || billPcr.getMidId() == 41 || billPcr.getMidId() == 53) {
-                                DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "2"));
-                                PeopleList peopleList = new PeopleList();
-                                peopleList.setFarmId("2");
-                                peopleList.setDeviceCode(deviceList.getDeviceCode());
-                                peopleList.setUserId(billPcr.getProcessId().toString());
-                                peopleList.setUserName(billPcr.getAdmissionUserName());
-                                peopleList.setPassword("123456");
-                                peopleList.setType(0);
-                                peopleList.setCreateTime(new Date());
-                                Date now = new Date();
-                                Calendar calendar = Calendar.getInstance();
-                                calendar.setTime(now);
-                                calendar.add(Calendar.HOUR_OF_DAY, 4);
-                                Date date1 = calendar.getTime();
-                                peopleList.setOutTime(date1);
-                                SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
-                                peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
-                                peopleListMapper.insert(peopleList);
-                                if ("31".equals(farmId)) {
+                                if ("29".equals(farmId) && baseLocation.getId() == 46) {
+                                    //庙贝门禁单独的
+                                    DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "29"));
+                                    Date now = new Date();
+                                    Calendar calendar = Calendar.getInstance();
+                                    calendar.setTime(now);
+                                    calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                    Date date1 = calendar.getTime();
+                                    SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
+                                    PeopleList peopleList1 = new PeopleList();
+                                    peopleList1.setFarmId("29");
+                                    peopleList1.setDeviceCode(deviceList.getDeviceCode());
+                                    peopleList1.setUserId(billPcr.getProcessId().toString());
+                                    peopleList1.setUserName(billPcr.getAdmissionUserName());
+                                    peopleList1.setPassword("123456");
+                                    peopleList1.setType(0);
+                                    peopleList1.setCreateTime(new Date());
+                                    peopleList1.setOutTime(date1);
+                                    peopleList1.setImgUrl(sysAccountMultilevel.getImgUrl());
+                                    peopleListMapper.insert(peopleList1);
+                                } else if ("31".equals(farmId) && baseLocation.getId() == 46) {
                                     //凤行门禁单独的
+                                    DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "31"));
+                                    Date now = new Date();
+                                    Calendar calendar = Calendar.getInstance();
+                                    calendar.setTime(now);
+                                    calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                    Date date1 = calendar.getTime();
+                                    SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
                                     PeopleList peopleList1 = new PeopleList();
                                     peopleList1.setFarmId("31");
                                     peopleList1.setDeviceCode(deviceList.getDeviceCode());
@@ -503,9 +512,28 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                                     peopleList1.setPassword("123456");
                                     peopleList1.setType(0);
                                     peopleList1.setCreateTime(new Date());
+                                    peopleList1.setOutTime(date1);
+                                    peopleList1.setImgUrl(sysAccountMultilevel.getImgUrl());
+                                    peopleListMapper.insert(peopleList1);
+                                } else {
+                                    DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "2"));
+                                    PeopleList peopleList = new PeopleList();
+                                    peopleList.setFarmId("2");
+                                    peopleList.setDeviceCode(deviceList.getDeviceCode());
+                                    peopleList.setUserId(billPcr.getProcessId().toString());
+                                    peopleList.setUserName(billPcr.getAdmissionUserName());
+                                    peopleList.setPassword("123456");
+                                    peopleList.setType(0);
+                                    peopleList.setCreateTime(new Date());
+                                    Date now = new Date();
+                                    Calendar calendar = Calendar.getInstance();
+                                    calendar.setTime(now);
+                                    calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                    Date date1 = calendar.getTime();
                                     peopleList.setOutTime(date1);
+                                    SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
                                     peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
-                                    peopleListMapper.insert(peopleList1);
+                                    peopleListMapper.insert(peopleList);
                                 }
                             }
                             //人员基地外围
@@ -522,7 +550,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                                 Date now = new Date();
                                 Calendar calendar = Calendar.getInstance();
                                 calendar.setTime(now);
-                                calendar.add(Calendar.HOUR_OF_DAY, 4);
+                                calendar.add(Calendar.HOUR_OF_DAY, 6);
                                 Date date1 = calendar.getTime();
                                 peopleList.setOutTime(date1);
                                 SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
@@ -562,26 +590,35 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                             if (billPcr.getVistitType() == 0) {
                                 //人员隔离中心流程
                                 if (billPcr.getMidId() == 16 || billPcr.getMidId() == 29 || billPcr.getMidId() == 41 || billPcr.getMidId() == 53) {
-                                    DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "2"));
-                                    PeopleList peopleList = new PeopleList();
-                                    peopleList.setFarmId("2");
-                                    peopleList.setDeviceCode(deviceList.getDeviceCode());
-                                    peopleList.setUserId(billPcr.getProcessId().toString());
-                                    peopleList.setUserName(billPcr.getAdmissionUserName());
-                                    peopleList.setPassword("123456");
-                                    peopleList.setType(0);
-                                    peopleList.setCreateTime(new Date());
-                                    Date now = new Date();
-                                    Calendar calendar = Calendar.getInstance();
-                                    calendar.setTime(now);
-                                    calendar.add(Calendar.HOUR_OF_DAY, 4);
-                                    Date date1 = calendar.getTime();
-                                    peopleList.setOutTime(date1);
-                                    SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
-                                    peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
-                                    peopleListMapper.insert(peopleList);
-                                    if ("31".equals(farmId)) {
+                                    if ("29".equals(farmId) && baseLocation.getId() == 46) {
+                                        //庙贝门禁单独的
+                                        DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "29"));
+                                        Date now = new Date();
+                                        Calendar calendar = Calendar.getInstance();
+                                        calendar.setTime(now);
+                                        Date date1 = calendar.getTime();
+                                        calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                        SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
+                                        PeopleList peopleList1 = new PeopleList();
+                                        peopleList1.setFarmId("29");
+                                        peopleList1.setDeviceCode(deviceList.getDeviceCode());
+                                        peopleList1.setUserId(billPcr.getProcessId().toString());
+                                        peopleList1.setUserName(billPcr.getAdmissionUserName());
+                                        peopleList1.setPassword("123456");
+                                        peopleList1.setType(0);
+                                        peopleList1.setCreateTime(new Date());
+                                        peopleList1.setOutTime(date1);
+                                        peopleList1.setImgUrl(sysAccountMultilevel.getImgUrl());
+                                        peopleListMapper.insert(peopleList1);
+                                    } else if ("31".equals(farmId) && baseLocation.getId() == 46) {
                                         //凤行门禁单独的
+                                        DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "31"));
+                                        Date now = new Date();
+                                        Calendar calendar = Calendar.getInstance();
+                                        calendar.setTime(now);
+                                        calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                        Date date1 = calendar.getTime();
+                                        SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
                                         PeopleList peopleList1 = new PeopleList();
                                         peopleList1.setFarmId("31");
                                         peopleList1.setDeviceCode(deviceList.getDeviceCode());
@@ -590,10 +627,30 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                                         peopleList1.setPassword("123456");
                                         peopleList1.setType(0);
                                         peopleList1.setCreateTime(new Date());
+                                        peopleList1.setOutTime(date1);
+                                        peopleList1.setImgUrl(sysAccountMultilevel.getImgUrl());
+                                        peopleListMapper.insert(peopleList1);
+                                    } else {
+                                        DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "2"));
+                                        PeopleList peopleList = new PeopleList();
+                                        peopleList.setFarmId("2");
+                                        peopleList.setDeviceCode(deviceList.getDeviceCode());
+                                        peopleList.setUserId(billPcr.getProcessId().toString());
+                                        peopleList.setUserName(billPcr.getAdmissionUserName());
+                                        peopleList.setPassword("123456");
+                                        peopleList.setType(0);
+                                        peopleList.setCreateTime(new Date());
+                                        Date now = new Date();
+                                        Calendar calendar = Calendar.getInstance();
+                                        calendar.setTime(now);
+                                        calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                        Date date1 = calendar.getTime();
                                         peopleList.setOutTime(date1);
+                                        SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
                                         peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
-                                        peopleListMapper.insert(peopleList1);
+                                        peopleListMapper.insert(peopleList);
                                     }
+
                                 }
                                 //人员基地外围
                                 if (billPcr.getMidId() == 17 || billPcr.getMidId() == 30 || billPcr.getMidId() == 42 || billPcr.getMidId() == 54) {
@@ -609,7 +666,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                                     Date now = new Date();
                                     Calendar calendar = Calendar.getInstance();
                                     calendar.setTime(now);
-                                    calendar.add(Calendar.HOUR_OF_DAY, 4);
+                                    calendar.add(Calendar.HOUR_OF_DAY, 6);
                                     Date date1 = calendar.getTime();
                                     peopleList.setOutTime(date1);
                                     SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
@@ -749,26 +806,36 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                     if (billPcr.getVistitType() == 0) {
                         //人员隔离中心流程
                         if (billPcr.getMidId() == 16 || billPcr.getMidId() == 29 || billPcr.getMidId() == 41 || billPcr.getMidId() == 53) {
-                            DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "2"));
-                            PeopleList peopleList = new PeopleList();
-                            peopleList.setFarmId("2");
-                            peopleList.setDeviceCode(deviceList.getDeviceCode());
-                            peopleList.setUserId(billPcr.getProcessId().toString());
-                            peopleList.setUserName(billPcr.getAdmissionUserName());
-                            peopleList.setPassword("123456");
-                            peopleList.setType(0);
-                            peopleList.setCreateTime(new Date());
-                            Date now = new Date();
-                            Calendar calendar = Calendar.getInstance();
-                            calendar.setTime(now);
-                            calendar.add(Calendar.HOUR_OF_DAY, 4);
-                            Date date1 = calendar.getTime();
-                            peopleList.setOutTime(date1);
-                            SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
-                            peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
-                            peopleListMapper.insert(peopleList);
-                            if ("31".equals(farmId)) {
+                            if ("29".equals(farmId) && baseLocation.getId() == 46) {
+                                //庙贝门禁单独的
+                                DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "29"));
+                                Date now = new Date();
+                                Calendar calendar = Calendar.getInstance();
+                                calendar.setTime(now);
+                                calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                Date date1 = calendar.getTime();
+                                SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
+                                PeopleList peopleList1 = new PeopleList();
+                                peopleList1.setFarmId("29");
+                                peopleList1.setDeviceCode(deviceList.getDeviceCode());
+                                peopleList1.setUserId(billPcr.getProcessId().toString());
+                                peopleList1.setUserName(billPcr.getAdmissionUserName());
+                                peopleList1.setPassword("123456");
+                                peopleList1.setType(0);
+                                peopleList1.setCreateTime(new Date());
+                                peopleList1.setOutTime(date1);
+                                peopleList1.setImgUrl(sysAccountMultilevel.getImgUrl());
+                                peopleListMapper.insert(peopleList1);
+                            } else if ("31".equals(farmId) && baseLocation.getId() == 46) {
+
                                 //凤行门禁单独的
+                                DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "31"));
+                                Date now = new Date();
+                                Calendar calendar = Calendar.getInstance();
+                                calendar.setTime(now);
+                                calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                Date date1 = calendar.getTime();
+                                SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
                                 PeopleList peopleList1 = new PeopleList();
                                 peopleList1.setFarmId("31");
                                 peopleList1.setDeviceCode(deviceList.getDeviceCode());
@@ -777,9 +844,28 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                                 peopleList1.setPassword("123456");
                                 peopleList1.setType(0);
                                 peopleList1.setCreateTime(new Date());
+                                peopleList1.setOutTime(date1);
+                                peopleList1.setImgUrl(sysAccountMultilevel.getImgUrl());
+                                peopleListMapper.insert(peopleList1);
+                            } else {
+                                DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "2"));
+                                PeopleList peopleList = new PeopleList();
+                                peopleList.setFarmId("2");
+                                peopleList.setDeviceCode(deviceList.getDeviceCode());
+                                peopleList.setUserId(billPcr.getProcessId().toString());
+                                peopleList.setUserName(billPcr.getAdmissionUserName());
+                                peopleList.setPassword("123456");
+                                peopleList.setType(0);
+                                peopleList.setCreateTime(new Date());
+                                Date now = new Date();
+                                Calendar calendar = Calendar.getInstance();
+                                calendar.setTime(now);
+                                calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                Date date1 = calendar.getTime();
                                 peopleList.setOutTime(date1);
+                                SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
                                 peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
-                                peopleListMapper.insert(peopleList1);
+                                peopleListMapper.insert(peopleList);
                             }
                         }
                         //人员基地外围
@@ -796,7 +882,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                             Date now = new Date();
                             Calendar calendar = Calendar.getInstance();
                             calendar.setTime(now);
-                            calendar.add(Calendar.HOUR_OF_DAY, 4);
+                            calendar.add(Calendar.HOUR_OF_DAY, 6);
                             Date date1 = calendar.getTime();
                             peopleList.setOutTime(date1);
                             SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
@@ -881,6 +967,27 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
 
                 processMapper.updateById(baseProcess);
                 pcrMapper.updateById(billPcr);
+                if (billPcr.getVistitType() == 3 && billPcr.getFarmId() == 31 && billPcr.getTestLocationId() == 45) {
+                    //风行下发单独的饲料车流程门禁
+                    DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "31"));
+                    PeopleList peopleList = new PeopleList();
+                    peopleList.setFarmId("31");
+                    peopleList.setDeviceCode(deviceList.getDeviceCode());
+                    peopleList.setUserId(billPcr.getProcessId().toString());
+                    peopleList.setUserName(billPcr.getAdmissionUserName());
+                    peopleList.setPassword("123456");
+                    peopleList.setType(0);
+                    peopleList.setCreateTime(new Date());
+                    Date now = new Date();
+                    Calendar calendar = Calendar.getInstance();
+                    calendar.setTime(now);
+                    calendar.add(Calendar.HOUR_OF_DAY, 4);
+                    Date date1 = calendar.getTime();
+                    peopleList.setOutTime(date1);
+                    SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
+                    peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
+                    peopleListMapper.insert(peopleList);
+                }
                 return new Result(10000, "修改成功!", true);
             } else {
                 billPcr.setBillStatus(2);
@@ -1050,24 +1157,66 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                             if (billPcr.getVistitType() == 0) {
                                 //人员隔离中心流程
                                 if (billPcr.getMidId() == 16 || billPcr.getMidId() == 29 || billPcr.getMidId() == 41 || billPcr.getMidId() == 53) {
-                                    DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "2"));
-                                    PeopleList peopleList = new PeopleList();
-                                    peopleList.setFarmId("2");
-                                    peopleList.setDeviceCode(deviceList.getDeviceCode());
-                                    peopleList.setUserId(billPcr.getProcessId().toString());
-                                    peopleList.setUserName(billPcr.getAdmissionUserName());
-                                    peopleList.setPassword("123456");
-                                    peopleList.setType(0);
-                                    peopleList.setCreateTime(new Date());
-                                    Date now = new Date();
-                                    Calendar calendar = Calendar.getInstance();
-                                    calendar.setTime(now);
-                                    calendar.add(Calendar.HOUR_OF_DAY, 4);
-                                    Date date1 = calendar.getTime();
-                                    peopleList.setOutTime(date1);
-                                    SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
-                                    peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
-                                    peopleListMapper.insert(peopleList);
+                                    if ("29".equals(farmId) && baseLocation.getId() == 46) {
+                                        //庙贝门禁单独的
+                                        DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "29"));
+                                        Date now = new Date();
+                                        Calendar calendar = Calendar.getInstance();
+                                        calendar.setTime(now);
+                                        calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                        Date date1 = calendar.getTime();
+                                        SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
+                                        PeopleList peopleList1 = new PeopleList();
+                                        peopleList1.setFarmId("29");
+                                        peopleList1.setDeviceCode(deviceList.getDeviceCode());
+                                        peopleList1.setUserId(billPcr.getProcessId().toString());
+                                        peopleList1.setUserName(billPcr.getAdmissionUserName());
+                                        peopleList1.setPassword("123456");
+                                        peopleList1.setType(0);
+                                        peopleList1.setCreateTime(new Date());
+                                        peopleList1.setOutTime(date1);
+                                        peopleList1.setImgUrl(sysAccountMultilevel.getImgUrl());
+                                        peopleListMapper.insert(peopleList1);
+                                    } else  if ("31".equals(farmId) && baseLocation.getId() == 46) {
+                                        //凤行门禁单独的
+                                        DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "31"));
+                                        Date now = new Date();
+                                        Calendar calendar = Calendar.getInstance();
+                                        calendar.setTime(now);
+                                        calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                        Date date1 = calendar.getTime();
+                                        SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
+                                        PeopleList peopleList1 = new PeopleList();
+                                        peopleList1.setFarmId("31");
+                                        peopleList1.setDeviceCode(deviceList.getDeviceCode());
+                                        peopleList1.setUserId(billPcr.getProcessId().toString());
+                                        peopleList1.setUserName(billPcr.getAdmissionUserName());
+                                        peopleList1.setPassword("123456");
+                                        peopleList1.setType(0);
+                                        peopleList1.setCreateTime(new Date());
+                                        peopleList1.setOutTime(date1);
+                                        peopleList1.setImgUrl(sysAccountMultilevel.getImgUrl());
+                                        peopleListMapper.insert(peopleList1);
+                                    } else {
+                                        DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "2"));
+                                        PeopleList peopleList = new PeopleList();
+                                        peopleList.setFarmId("2");
+                                        peopleList.setDeviceCode(deviceList.getDeviceCode());
+                                        peopleList.setUserId(billPcr.getProcessId().toString());
+                                        peopleList.setUserName(billPcr.getAdmissionUserName());
+                                        peopleList.setPassword("123456");
+                                        peopleList.setType(0);
+                                        peopleList.setCreateTime(new Date());
+                                        Date now = new Date();
+                                        Calendar calendar = Calendar.getInstance();
+                                        calendar.setTime(now);
+                                        calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                        Date date1 = calendar.getTime();
+                                        peopleList.setOutTime(date1);
+                                        SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
+                                        peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
+                                        peopleListMapper.insert(peopleList);
+                                    }
                                 }
                                 //人员基地外围
                                 if (billPcr.getMidId() == 17 || billPcr.getMidId() == 30 || billPcr.getMidId() == 42 || billPcr.getMidId() == 54) {
@@ -1083,7 +1232,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                                     Date now = new Date();
                                     Calendar calendar = Calendar.getInstance();
                                     calendar.setTime(now);
-                                    calendar.add(Calendar.HOUR_OF_DAY, 4);
+                                    calendar.add(Calendar.HOUR_OF_DAY, 6);
                                     Date date1 = calendar.getTime();
                                     peopleList.setOutTime(date1);
                                     SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
@@ -1123,24 +1272,67 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                                 if (billPcr.getVistitType() == 0) {
                                     //人员隔离中心流程
                                     if (billPcr.getMidId() == 16 || billPcr.getMidId() == 29 || billPcr.getMidId() == 41 || billPcr.getMidId() == 53) {
-                                        DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "2"));
-                                        PeopleList peopleList = new PeopleList();
-                                        peopleList.setFarmId("2");
-                                        peopleList.setDeviceCode(deviceList.getDeviceCode());
-                                        peopleList.setUserId(billPcr.getProcessId().toString());
-                                        peopleList.setUserName(billPcr.getAdmissionUserName());
-                                        peopleList.setPassword("123456");
-                                        peopleList.setType(0);
-                                        peopleList.setCreateTime(new Date());
-                                        Date now = new Date();
-                                        Calendar calendar = Calendar.getInstance();
-                                        calendar.setTime(now);
-                                        calendar.add(Calendar.HOUR_OF_DAY, 4);
-                                        Date date1 = calendar.getTime();
-                                        peopleList.setOutTime(date1);
-                                        SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
-                                        peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
-                                        peopleListMapper.insert(peopleList);
+                                        if ("29".equals(farmId) && baseLocation.getId() == 46) {
+                                            //庙贝门禁单独的
+                                            DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "29"));
+                                            Date now = new Date();
+                                            Calendar calendar = Calendar.getInstance();
+                                            calendar.setTime(now);
+                                            calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                            Date date1 = calendar.getTime();
+                                            SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
+                                            PeopleList peopleList1 = new PeopleList();
+                                            peopleList1.setFarmId("29");
+                                            peopleList1.setDeviceCode(deviceList.getDeviceCode());
+                                            peopleList1.setUserId(billPcr.getProcessId().toString());
+                                            peopleList1.setUserName(billPcr.getAdmissionUserName());
+                                            peopleList1.setPassword("123456");
+                                            peopleList1.setType(0);
+                                            peopleList1.setCreateTime(new Date());
+                                            peopleList1.setOutTime(date1);
+                                            peopleList1.setImgUrl(sysAccountMultilevel.getImgUrl());
+                                            peopleListMapper.insert(peopleList1);
+                                        } else  if ("31".equals(farmId) && baseLocation.getId() == 46) {
+                                            //凤行门禁单独的
+                                            DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "31"));
+                                            Date now = new Date();
+                                            Calendar calendar = Calendar.getInstance();
+                                            calendar.setTime(now);
+                                            calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                            Date date1 = calendar.getTime();
+                                            SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
+                                            PeopleList peopleList1 = new PeopleList();
+                                            peopleList1.setFarmId("31");
+                                            peopleList1.setDeviceCode(deviceList.getDeviceCode());
+                                            peopleList1.setUserId(billPcr.getProcessId().toString());
+                                            peopleList1.setUserName(billPcr.getAdmissionUserName());
+                                            peopleList1.setPassword("123456");
+                                            peopleList1.setType(0);
+                                            peopleList1.setCreateTime(new Date());
+                                            peopleList1.setOutTime(date1);
+                                            peopleList1.setImgUrl(sysAccountMultilevel.getImgUrl());
+                                            peopleListMapper.insert(peopleList1);
+                                        } else {
+                                            DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "2"));
+                                            PeopleList peopleList = new PeopleList();
+                                            peopleList.setFarmId("2");
+                                            peopleList.setDeviceCode(deviceList.getDeviceCode());
+                                            peopleList.setUserId(billPcr.getProcessId().toString());
+                                            peopleList.setUserName(billPcr.getAdmissionUserName());
+                                            peopleList.setPassword("123456");
+                                            peopleList.setType(0);
+                                            peopleList.setCreateTime(new Date());
+                                            Date now = new Date();
+                                            Calendar calendar = Calendar.getInstance();
+                                            calendar.setTime(now);
+                                            calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                            Date date1 = calendar.getTime();
+                                            peopleList.setOutTime(date1);
+                                            SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
+                                            peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
+                                            peopleListMapper.insert(peopleList);
+                                        }
+
                                     }
                                     //人员基地外围
                                     if (billPcr.getMidId() == 17 || billPcr.getMidId() == 30 || billPcr.getMidId() == 42 || billPcr.getMidId() == 54) {
@@ -1156,7 +1348,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                                         Date now = new Date();
                                         Calendar calendar = Calendar.getInstance();
                                         calendar.setTime(now);
-                                        calendar.add(Calendar.HOUR_OF_DAY, 4);
+                                        calendar.add(Calendar.HOUR_OF_DAY, 6);
                                         Date date1 = calendar.getTime();
                                         peopleList.setOutTime(date1);
                                         SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
@@ -1296,24 +1488,66 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                         if (billPcr.getVistitType() == 0) {
                             //人员隔离中心流程
                             if (billPcr.getMidId() == 16 || billPcr.getMidId() == 29 || billPcr.getMidId() == 41 || billPcr.getMidId() == 53) {
-                                DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "2"));
-                                PeopleList peopleList = new PeopleList();
-                                peopleList.setFarmId("2");
-                                peopleList.setDeviceCode(deviceList.getDeviceCode());
-                                peopleList.setUserId(billPcr.getProcessId().toString());
-                                peopleList.setUserName(billPcr.getAdmissionUserName());
-                                peopleList.setPassword("123456");
-                                peopleList.setType(0);
-                                peopleList.setCreateTime(new Date());
-                                Date now = new Date();
-                                Calendar calendar = Calendar.getInstance();
-                                calendar.setTime(now);
-                                calendar.add(Calendar.HOUR_OF_DAY, 4);
-                                Date date1 = calendar.getTime();
-                                peopleList.setOutTime(date1);
-                                SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
-                                peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
-                                peopleListMapper.insert(peopleList);
+                                if ("29".equals(farmId) && baseLocation.getId() == 46) {
+                                    //庙贝门禁单独的
+                                    DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "29"));
+                                    Date now = new Date();
+                                    Calendar calendar = Calendar.getInstance();
+                                    calendar.setTime(now);
+                                    calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                    Date date1 = calendar.getTime();
+                                    SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
+                                    PeopleList peopleList1 = new PeopleList();
+                                    peopleList1.setFarmId("29");
+                                    peopleList1.setDeviceCode(deviceList.getDeviceCode());
+                                    peopleList1.setUserId(billPcr.getProcessId().toString());
+                                    peopleList1.setUserName(billPcr.getAdmissionUserName());
+                                    peopleList1.setPassword("123456");
+                                    peopleList1.setType(0);
+                                    peopleList1.setCreateTime(new Date());
+                                    peopleList1.setOutTime(date1);
+                                    peopleList1.setImgUrl(sysAccountMultilevel.getImgUrl());
+                                    peopleListMapper.insert(peopleList1);
+                                } else if ("31".equals(farmId) && baseLocation.getId() == 46) {
+                                    //凤行门禁单独的
+                                    DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "31"));
+                                    Date now = new Date();
+                                    Calendar calendar = Calendar.getInstance();
+                                    calendar.setTime(now);
+                                    calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                    Date date1 = calendar.getTime();
+                                    SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
+                                    PeopleList peopleList1 = new PeopleList();
+                                    peopleList1.setFarmId("31");
+                                    peopleList1.setDeviceCode(deviceList.getDeviceCode());
+                                    peopleList1.setUserId(billPcr.getProcessId().toString());
+                                    peopleList1.setUserName(billPcr.getAdmissionUserName());
+                                    peopleList1.setPassword("123456");
+                                    peopleList1.setType(0);
+                                    peopleList1.setCreateTime(new Date());
+                                    peopleList1.setOutTime(date1);
+                                    peopleList1.setImgUrl(sysAccountMultilevel.getImgUrl());
+                                    peopleListMapper.insert(peopleList1);
+                                } else {
+                                    DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "2"));
+                                    PeopleList peopleList = new PeopleList();
+                                    peopleList.setFarmId("2");
+                                    peopleList.setDeviceCode(deviceList.getDeviceCode());
+                                    peopleList.setUserId(billPcr.getProcessId().toString());
+                                    peopleList.setUserName(billPcr.getAdmissionUserName());
+                                    peopleList.setPassword("123456");
+                                    peopleList.setType(0);
+                                    peopleList.setCreateTime(new Date());
+                                    Date now = new Date();
+                                    Calendar calendar = Calendar.getInstance();
+                                    calendar.setTime(now);
+                                    calendar.add(Calendar.HOUR_OF_DAY, 6);
+                                    Date date1 = calendar.getTime();
+                                    peopleList.setOutTime(date1);
+                                    SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
+                                    peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
+                                    peopleListMapper.insert(peopleList);
+                                }
                             }
                             //人员基地外围
                             if (billPcr.getMidId() == 17 || billPcr.getMidId() == 30 || billPcr.getMidId() == 42 || billPcr.getMidId() == 54) {
@@ -1329,7 +1563,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                                 Date now = new Date();
                                 Calendar calendar = Calendar.getInstance();
                                 calendar.setTime(now);
-                                calendar.add(Calendar.HOUR_OF_DAY, 4);
+                                calendar.add(Calendar.HOUR_OF_DAY, 6);
                                 Date date1 = calendar.getTime();
                                 peopleList.setOutTime(date1);
                                 SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
@@ -1414,7 +1648,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
 
                     processMapper.updateById(baseProcess);
                     pcrMapper.updateById(billPcr);
-                    if (billPcr.getVistitType() == 3 && billPcr.getFarmId() == 31 || billPcr.getTestLocationId() == 45) {
+                    if (billPcr.getVistitType() == 3 && billPcr.getFarmId() == 31 && billPcr.getTestLocationId() == 45) {
                         //风行下发单独的饲料车流程门禁
                         DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "31"));
                         PeopleList peopleList = new PeopleList();
@@ -1428,7 +1662,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                         Date now = new Date();
                         Calendar calendar = Calendar.getInstance();
                         calendar.setTime(now);
-                        calendar.add(Calendar.HOUR_OF_DAY, 4);
+                        calendar.add(Calendar.HOUR_OF_DAY, 6);
                         Date date1 = calendar.getTime();
                         peopleList.setOutTime(date1);
                         SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());

+ 15 - 23
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillPersonnelAdmissionServiceImpl.java

@@ -115,10 +115,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
         if (!PhoneNumberValidator.isValidPhoneNumber(phone)) {
             return new Result(10001, "手机号格式错误!", false);
         }
-        if (papersType.equals("0")) {
-//            if (!IDCardValidator.isValidIDCard(papersCode)) {
-//                return new Result(10001, "身份证号格式错误!", false);
-//            }
+        if (admissionType.equals("1")) {
+            return new Result(10001, "紧急入场申请暂未开启!请按正常入场流程申请", false);
         }
         BaseWashoutPoint baseWashoutPoint1 = baseWashoutPointMapper.selectOne(new QueryWrapper<BaseWashoutPoint>().lambda()
                 .eq(BaseWashoutPoint::getLocationId, departureId).like(BaseWashoutPoint::getFarmIds, farmId)
@@ -312,10 +310,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
         if (!PhoneNumberValidator.isValidPhoneNumber(phone)) {
             return new Result(10001, "手机号格式错误!", false);
         }
-        if (papersType.equals("0")) {
-//            if (!IDCardValidator.isValidIDCard(papersCode)) {
-//                return new Result(10001, "身份证号格式错误!", false);
-//            }
+        if (admissionType.equals("1")) {
+            return new Result(10001, "紧急入场申请暂未开启!请按正常入场流程申请", false);
         }
         BaseWashoutPoint baseWashoutPoint1 = baseWashoutPointMapper.selectOne(new QueryWrapper<BaseWashoutPoint>()
                 .lambda().eq(BaseWashoutPoint::getLocationId, departureId).like(BaseWashoutPoint::getFarmIds, farmId)
@@ -590,7 +586,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                 Date now = new Date();
                 Calendar calendar = Calendar.getInstance();
                 calendar.setTime(now);
-                calendar.add(Calendar.HOUR_OF_DAY, 4);
+                calendar.add(Calendar.HOUR_OF_DAY, 6);
                 Date date1 = calendar.getTime();
                 peopleList.setOutTime(date1);
                 SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPersonnelAdmission.getAdmissionUserId());
@@ -599,11 +595,10 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
 
                 billPersonnelAdmission.setBillStatus(1);
                 baseProcess.setProcessType(1);
-                baseProcess.setCurrentStatus("2");
                 String status = baseProcess.getAllLocationStatus();
-                String[] split1 = status.split(",");
-                split1[0] = "2";
-                baseProcess.setAllLocationStatus(split1[0] + status.substring(1));
+                String replace = status.replace("0", "2");
+                baseProcess.setCurrentStatus(replace);
+                baseProcess.setAllLocationStatus(replace);
                 baseProcessMapper.updateById(baseProcess);
                 billPersonnelAdmissionMapper.updateById(billPersonnelAdmission);
                 //如果有物资,则把物资的申请单给结束
@@ -1263,10 +1258,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
         if (!PhoneNumberValidator.isValidPhoneNumber(phone)) {
             return new Result(10001, "手机号格式错误!", false);
         }
-        if (papersType.equals("0")) {
-//            if (!IDCardValidator.isValidIDCard(papersCode)) {
-//                return new Result(10001, "身份证号格式错误!", false);
-//            }
+        if (admissionType.equals("1")) {
+            return new Result(10001, "紧急入场申请暂未开启!请按正常入场流程申请", false);
         }
         String picUrl = null;
 
@@ -1524,7 +1517,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                     Date now = new Date();
                     Calendar calendar = Calendar.getInstance();
                     calendar.setTime(now);
-                    calendar.add(Calendar.HOUR_OF_DAY, 4);
+                    calendar.add(Calendar.HOUR_OF_DAY, 6);
                     Date date1 = calendar.getTime();
                     peopleList.setOutTime(date1);
                     SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPersonnelAdmission.getAdmissionUserId());
@@ -1533,11 +1526,10 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
 
                     billPersonnelAdmission.setBillStatus(1);
                     baseProcess.setProcessType(1);
-                    baseProcess.setCurrentStatus("2");
                     String status = baseProcess.getAllLocationStatus();
-                    String[] split1 = status.split(",");
-                    split1[0] = "2";
-                    baseProcess.setAllLocationStatus(split1[0] + status.substring(1));
+                    String replace = status.replace("0", "2");
+                    baseProcess.setCurrentStatus(replace);
+                    baseProcess.setAllLocationStatus(replace);
                     baseProcessMapper.updateById(baseProcess);
                     billPersonnelAdmissionMapper.updateById(billPersonnelAdmission);
                     //如果有物资,则把物资的申请单给结束
@@ -2033,7 +2025,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                         FlowUtil flowUtil = new FlowUtil();
                         Object entity = flowUtil.getEntity(Integer.parseInt(split[1]), billPcr.getVistitType(), billPcr.getDestName()
                                 , billPcr.getDestId(), billPcr.getAdmissionUserId(), billPcr.getAdmissionUserName(), billPcr.getPhone(),
-                                billPcr.getVistitDate(), location.getId(), location.getLocationName(), Integer.parseInt(farmId)
+                                billPcr.getVistitDate(), location.getId(), location.getLocationName(), billPcr.getFarmId()
                                 , baseProcess.getId(), billPcr.getDepartureName(), billPcr.getDepartureId()
                                 , billPcr.getMidId(), billPcr.getMidName(),billPcr.getFarmName());
                         if (Integer.parseInt(split[1]) == 1) {

+ 1 - 1
huimv-receive/src/main/resources/com/huimv/receive/mapper/BaseProcessMapper.xml

@@ -61,7 +61,7 @@
     </select>
 
     <select id="listAll" resultType="com.huimv.receive.entity.vo.ProcessVo">
-        SELECT a.*,b.vistit_type vistitType,b.vistit_date vistitDate,b.id admissionId from base_process a INNER JOIN bill_personnel_admission b
+        SELECT a.*,b.vistit_type vistitType,b.vistit_date vistitDate,b.id admissionId,b.car_num carNum from base_process a INNER JOIN bill_personnel_admission b
 on a.id=b.process_id
   ${ew.customSqlSegment}
     </select>

+ 4 - 4
huimv-receive/src/main/resources/com/huimv/receive/mapper/BillCleanMapper.xml

@@ -51,7 +51,7 @@
     </select>
 
     <select id="CleanAndDry" resultType="com.huimv.receive.entity.vo.CleanAndDryVo2">
-        select *,null,1 AS 'type' from bill_clean where farm_id=#{farmId} and vistit_type=#{type}
+        select id,vistit_Type,test_location,admission_user_name,car_num,clean_time,null as 'dryTime',check_date,sub_date,bill_status,img_status,1 AS 'type' from bill_clean where farm_id=#{farmId} and vistit_type=#{type}
         and test_location_id in
         <foreach collection="locations" item="location" separator="," open="(" close=")">
             #{location}
@@ -61,7 +61,7 @@
             #{statu}
         </foreach>
         union all
-        select *,2 AS 'type' from bill_dry where farm_id=#{farmId} and vistit_type=#{type}
+        select id,vistit_Type,test_location,admission_user_name,car_num,null as 'cleanTime',dry_time,check_date,sub_date,bill_status,img_status,2 AS 'type' from bill_dry where farm_id=#{farmId} and vistit_type=#{type}
         and test_location_id in
         <foreach collection="locations" item="location" separator="," open="(" close=")">
             #{location}
@@ -73,7 +73,7 @@
         ORDER BY sub_date DESC
     </select>
     <select id="CleanAndDryNo" resultType="com.huimv.receive.entity.vo.CleanAndDryVo2">
-        select *,null,1 AS 'type' from bill_clean where  vistit_type=#{type}
+        select id,vistit_Type,test_location,admission_user_name,car_num,clean_time,null as 'dryTime',check_date,sub_date,bill_status,img_status,1 AS 'type' from bill_clean where  vistit_type=#{type}
         and test_location_id in
         <foreach collection="locations" item="location" separator="," open="(" close=")">
             #{location}
@@ -83,7 +83,7 @@
             #{statu}
         </foreach>
         union all
-        select *,2 AS 'type' from bill_dry where  vistit_type=#{type}
+        select id,vistit_Type,test_location,admission_user_name,car_num,null as 'cleanTime',dry_time,check_date,sub_date,bill_status,img_status,2 AS 'type' from bill_dry where  vistit_type=#{type}
         and test_location_id in
         <foreach collection="locations" item="location" separator="," open="(" close=")">
             #{location}

+ 27 - 0
huimv-receive/src/main/resources/com/huimv/receive/mapper/BillPersonnelAdmissionMapper.xml

@@ -28,21 +28,33 @@
     </resultMap>
     <select id="listAll" resultType="com.huimv.receive.entity.vo.FactoryDirectorVo">
         SELECT id,admission_user_name AS 'userName',process_id processId, bill_status, isolate_location, isolate_start_date AS check_date, isolate_start_date AS 'startTime', isolate_end_date AS 'endTime', NULL AS test_location, NULL AS vistit_type, NULL AS dest_name, NULL AS vistit_date,3 AS 'type',sub_date
+        ,   pass_date,
+   pass_user_name,
+    pass_user_id
 FROM bill_isolate WHERE farm_id = #{farmId} AND vistit_type = '7'
 
 UNION ALL
 
 SELECT id,admission_user_name AS 'userName',process_id processId, bill_status, test_location, check_date, NULL, NULL, NULL, vistit_type, NULL, NULL,2 AS 'type',sub_date
+,   pass_date,
+   pass_user_name,
+    pass_user_id
 FROM bill_clean WHERE farm_id = #{farmId} AND vistit_type = '7'
 
 UNION ALL
 
 SELECT id,admission_user_name AS 'userName',process_id processId, bill_status, test_location, check_date, NULL, NULL, NULL, vistit_type, NULL, NULL,1 AS 'type',sub_date
+,   pass_date,
+   pass_user_name,
+    pass_user_id
 FROM bill_pcr WHERE farm_id = #{farmId} AND vistit_type = '7'
 
 UNION ALL
 
 SELECT  id,admission_user_name AS 'userName',process_id processId, bill_status, NULL, NULL, NULL, NULL, NULL, vistit_type, dest_name, vistit_date,0 AS 'type',sub_date
+,   pass_date,
+   pass_user_name,
+    pass_user_id
 FROM bill_personnel_admission WHERE farm_id = #{farmId} AND vistit_type = #{type}
 ORDER BY sub_date DESC
     </select>
@@ -50,26 +62,41 @@ ORDER BY sub_date DESC
 
     <select id="listCarAll" resultType="com.huimv.receive.entity.vo.FactoryDirectorVo">
 SELECT id,admission_user_name AS 'userName',process_id processId,car_num, bill_status, isolate_location, isolate_start_date AS check_date, isolate_start_date AS 'startTime', isolate_end_date AS 'endTime', NULL AS test_location, NULL AS vistit_type, NULL AS dest_name, NULL AS vistit_date,3 AS 'type',sub_date
+,   pass_date,
+   pass_user_name,
+    pass_user_id
 FROM bill_isolate WHERE farm_id = #{farmId} AND vistit_type = '7'
 
 UNION ALL
 
 SELECT id,admission_user_name AS 'userName',process_id processId,car_num, bill_status, test_location, check_date, NULL, NULL, NULL, vistit_type, NULL, NULL,4 AS 'type',sub_date
+,   pass_date,
+   pass_user_name,
+    pass_user_id
 FROM bill_dry WHERE farm_id = #{farmId} AND vistit_type = '7' AND img_status = 1
 
 UNION ALL
 
 SELECT id,admission_user_name AS 'userName',process_id processId,car_num, bill_status, test_location, check_date, NULL, NULL, NULL, vistit_type, NULL, NULL,2 AS 'type',sub_date
+,   pass_date,
+   pass_user_name,
+    pass_user_id
 FROM bill_clean WHERE farm_id = #{farmId} AND vistit_type = '7' AND img_status = 1
 
 UNION ALL
 
 SELECT id,admission_user_name AS 'userName',process_id processId,car_num, bill_status, test_location, check_date, NULL, NULL, NULL, vistit_type, NULL, NULL,1 AS 'type',sub_date
+,   pass_date,
+   pass_user_name,
+    pass_user_id
 FROM bill_pcr WHERE farm_id = #{farmId} AND vistit_type = '7'
 
 UNION ALL
 
 SELECT id,admission_user_name AS 'userName',process_id processId,car_num, bill_status, NULL, NULL, NULL, NULL, NULL, vistit_type, dest_name, vistit_date,0 AS 'type',sub_date
+,   pass_date,
+   pass_user_name,
+    pass_user_id
 FROM bill_personnel_admission WHERE farm_id = #{farmId} AND vistit_type = #{type}
 ORDER BY sub_date DESC
     </select>