|
@@ -141,24 +141,20 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
baseProcess.setAdmissionUserId(userId);
|
|
|
baseProcess.setAdmissionUserName(userName);
|
|
|
baseProcess.setSubDate(DateTime.now());
|
|
|
+ baseProcess.setUpdateDate(LocalDateTime.now().format(dateTimeFormatter));
|
|
|
+ baseProcess.setCurrentStatus("0");
|
|
|
|
|
|
- String allLocation = "";
|
|
|
- String allLocationId = "";
|
|
|
- String allLocationStatus = "";
|
|
|
+ String allLocation = "场外";
|
|
|
+ String allLocationId = "0";
|
|
|
+ String allLocationStatus = "0";
|
|
|
String allFlowId = "";
|
|
|
List<BaseWashoutPoint> baseWashoutPoints = baseWashoutPointMapper.selectList(new QueryWrapper<BaseWashoutPoint>().lambda().eq(BaseWashoutPoint::getVisitingType, vistitType).like(BaseWashoutPoint::getFarmIds, farmId).orderByAsc(BaseWashoutPoint::getPointLevel));
|
|
|
for (BaseWashoutPoint baseWashoutPoint : baseWashoutPoints) {
|
|
|
- if (ObjectUtil.isEmpty(allLocation)){
|
|
|
- allLocation = baseLocationMapper.selectById(baseWashoutPoint.getLocationId()).getLocationName();
|
|
|
- allLocationId = baseWashoutPoint.getLocationId().toString();
|
|
|
- allLocationStatus = "0";
|
|
|
- allFlowId = baseWashoutPoint.getFlowList();
|
|
|
- }else {
|
|
|
- allLocation = allLocation + "," + baseLocationMapper.selectById(baseWashoutPoint.getLocationId()).getLocationName();
|
|
|
- allLocationId = allLocationId + "," + baseWashoutPoint.getLocationId();
|
|
|
- allLocationStatus = allLocationStatus + "," + "0";
|
|
|
- allFlowId = allFlowId + "0" + baseWashoutPoint.getFlowList();
|
|
|
- }
|
|
|
+ allLocation = allLocation + "," + baseLocationMapper.selectById(baseWashoutPoint.getLocationId()).getLocationName();
|
|
|
+ allLocationId = allLocationId + "," + baseWashoutPoint.getLocationId();
|
|
|
+ allLocationStatus = allLocationStatus + "," + "0";
|
|
|
+ allFlowId = allFlowId + "0" + baseWashoutPoint.getFlowList();
|
|
|
+
|
|
|
allLocation = allLocation + "," + baseWashoutPoint.getTailLocationName();
|
|
|
allLocationId = allLocationId + "," + "0";
|
|
|
allLocationStatus = allLocationStatus + "," + "0";
|
|
@@ -168,19 +164,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
baseProcess.setAllLocationStatus(allLocationStatus);
|
|
|
baseProcess.setAllFlowId(allFlowId);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- //获取位置
|
|
|
- BaseWashoutPoint baseWashoutPoint = baseWashoutPointMapper.selectOne(new QueryWrapper<BaseWashoutPoint>().lambda().eq(BaseWashoutPoint::getVisitingType, vistitType).eq(BaseWashoutPoint::getPointLevel, 1));
|
|
|
- Integer locationId = baseWashoutPoint.getLocationId();
|
|
|
-
|
|
|
- BaseLocation baseLocation = baseLocationMapper.selectById(locationId);
|
|
|
-// if (ObjectUtil.isEmpty(baseLocation)) {
|
|
|
-// TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
-// return new Result(10001, "该来访类型位置不存在", false);
|
|
|
-// }
|
|
|
- baseProcess.setCurrentLocation(baseLocation.getLocationName());
|
|
|
- baseProcess.setCurrentLocationId(baseLocation.getId().toString());
|
|
|
+ baseProcess.setCurrentLocation("场外");
|
|
|
+ baseProcess.setCurrentLocationId("0");
|
|
|
baseProcess.setFarmId(Integer.parseInt(farmId));
|
|
|
baseProcessMapper.insert(baseProcess);
|
|
|
billPersonnelAdmission.setProcessId(baseProcess.getId());
|
|
@@ -300,19 +285,15 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + LocalDateTime.now().format(dateTimeFormatter));
|
|
|
}
|
|
|
if (type.equals("0")) {
|
|
|
- String[] split = baseProcess.getCurrentStatus().split(",");
|
|
|
- split[split.length - 1] = "2";
|
|
|
//拒绝
|
|
|
billPersonnelAdmission.setBillStatus(2);
|
|
|
baseProcess.setProcessType(2);
|
|
|
- baseProcess.setCurrentStatus(String.join(",", split));
|
|
|
+ baseProcess.setCurrentStatus("2");
|
|
|
String status = baseProcess.getAllLocationStatus();
|
|
|
String[] split1 = status.split(",");
|
|
|
split1[0] = "3";
|
|
|
baseProcess.setAllLocationStatus(split1[0] + status.substring(1));
|
|
|
-// SendSMS.sendSMS(phoneList,"拒绝入场申请测试");
|
|
|
} else {
|
|
|
-
|
|
|
if (billPersonnelAdmission.getBillStatus() != 0) {
|
|
|
return new Result(10001, "该订单已通过,无需再次点击!", false);
|
|
|
}
|
|
@@ -363,7 +344,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
} else {
|
|
|
baseProcess.setCurrentStatus("1");
|
|
|
baseProcess.setProcessType(1);
|
|
|
- baseProcess.setAllLocationStatus("2,2");
|
|
|
+ baseProcess.setAllLocationStatus("2"+);
|
|
|
// baseProcess.setCurrentLocation(baseProcess.getCurrentLocation()+","+baseLocation.getLocationName());
|
|
|
// baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId() +","+baseLocation.getId());
|
|
|
//TODO 紧急入场通过先不处理
|