|
@@ -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());
|