|
@@ -120,26 +120,37 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
baseProcess.setCurrentStatus("0");
|
|
|
|
|
|
QueryWrapper<BaseLocation> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("vistit_type", vistitType).eq("farm_id", farmId).orderByAsc("id");
|
|
|
+ queryWrapper.eq("vistit_type", vistitType).eq("farm_id", farmId).orderByAsc("location_type");
|
|
|
List<BaseLocation> baseLocations = baseLocationMapper.selectList(queryWrapper);
|
|
|
- String allLocation = "";
|
|
|
- String allLocationId = "";
|
|
|
- String allLocationStatus = "";
|
|
|
- for (BaseLocation baseLocation : baseLocations) {
|
|
|
- if (baseLocation.getId() < Integer.parseInt(destId)) {
|
|
|
- allLocation = allLocation + baseLocation.getLocationName() + ",";
|
|
|
- allLocationId = allLocationId + baseLocation.getId() + ",";
|
|
|
- allLocationStatus = allLocationStatus + "0" + ",";
|
|
|
- }
|
|
|
- if (baseLocation.getId() == Integer.parseInt(destId)) {
|
|
|
- allLocation = allLocation + baseLocation.getLocationName();
|
|
|
- allLocationId = allLocationId + baseLocation.getId();
|
|
|
- allLocationStatus = allLocationStatus + "0";
|
|
|
+ if (admissionType.equals("1")) {
|
|
|
+ baseProcess.setAllLocation("场外," + destName);
|
|
|
+ QueryWrapper<BaseLocation> queryWrapper1 = new QueryWrapper<>();
|
|
|
+ queryWrapper1.eq("farm_id", farmId).eq("vistit_type", vistitType).eq("location_type", 0);
|
|
|
+ baseProcess.setCurrentLocationId(baseLocationMapper.selectOne(queryWrapper1).getId() + "," + destId);
|
|
|
+ baseProcess.setAllLocationStatus("1,0");
|
|
|
+ } else {
|
|
|
+ String allLocation = "";
|
|
|
+ String allLocationId = "";
|
|
|
+ String allLocationStatus = "";
|
|
|
+ for (BaseLocation baseLocation : baseLocations) {
|
|
|
+ if (baseLocation.getId() < Integer.parseInt(destId)) {
|
|
|
+ allLocation = allLocation + baseLocation.getLocationName() + ",";
|
|
|
+ allLocationId = allLocationId + baseLocation.getId() + ",";
|
|
|
+ allLocationStatus = allLocationStatus + "0" + ",";
|
|
|
+ }
|
|
|
+ if (baseLocation.getId() == Integer.parseInt(destId)) {
|
|
|
+ allLocation = allLocation + baseLocation.getLocationName();
|
|
|
+ allLocationId = allLocationId + baseLocation.getId();
|
|
|
+ allLocationStatus = allLocationStatus + "0";
|
|
|
+ }
|
|
|
}
|
|
|
+ baseProcess.setAllLocation(allLocation);
|
|
|
+ baseProcess.setAllLocationId(allLocationId);
|
|
|
+ String[] split = allLocationStatus.split(",");
|
|
|
+ split[0] = "1";
|
|
|
+ baseProcess.setAllLocationStatus(split[0] + allLocationStatus.substring(1));
|
|
|
}
|
|
|
- baseProcess.setAllLocation(allLocation);
|
|
|
- baseProcess.setAllLocationId(allLocationId);
|
|
|
- baseProcess.setAllLocationStatus(allLocationStatus);
|
|
|
+
|
|
|
|
|
|
//获取位置
|
|
|
BaseLocation baseLocation;
|
|
@@ -322,6 +333,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
// SendSMS.sendSMS(phoneList,"通过入场申请测试");
|
|
|
} else {
|
|
|
baseProcess.setCurrentStatus("1");
|
|
|
+ baseProcess.setProcessType(1);
|
|
|
+ baseProcess.setAllLocationStatus("2,2");
|
|
|
// baseProcess.setCurrentLocation(baseProcess.getCurrentLocation()+","+baseLocation.getLocationName());
|
|
|
// baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId() +","+baseLocation.getId());
|
|
|
//TODO 紧急入场通过先不处理
|