|
@@ -138,12 +138,16 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
baseProcess.setCurrentStatus("0");
|
|
|
//获取位置
|
|
|
BaseLocation baseLocation;
|
|
|
- if (Integer.parseInt(destId) <= 47){
|
|
|
- baseLocation = baseLocationMapper.selectOne(new QueryWrapper<BaseLocation>().eq("farm_id", farmId).eq("vistit_type", vistitType).eq("parent_id", 0));
|
|
|
- }else if (Integer.parseInt(destId) <= 50){
|
|
|
- baseLocation = baseLocationMapper.selectOne(new QueryWrapper<BaseLocation>().eq("farm_id", farmId).eq("vistit_type", vistitType).eq("location_type", 2).eq("parent_id",1));
|
|
|
+ if (vistitType.equals("5")){
|
|
|
+ if (Integer.parseInt(destId) <= 47){
|
|
|
+ baseLocation = baseLocationMapper.selectOne(new QueryWrapper<BaseLocation>().eq("farm_id", farmId).eq("vistit_type", vistitType).eq("parent_id", 0));
|
|
|
+ }else if (Integer.parseInt(destId) <= 50){
|
|
|
+ baseLocation = baseLocationMapper.selectOne(new QueryWrapper<BaseLocation>().eq("farm_id", farmId).eq("vistit_type", vistitType).eq("location_type", 2).eq("parent_id",1));
|
|
|
+ }else {
|
|
|
+ baseLocation = baseLocationMapper.selectOne(new QueryWrapper<BaseLocation>().eq("farm_id", farmId).eq("vistit_type", vistitType).eq("location_type", 3).eq("parent_id",1));
|
|
|
+ }
|
|
|
}else {
|
|
|
- baseLocation = baseLocationMapper.selectOne(new QueryWrapper<BaseLocation>().eq("farm_id", farmId).eq("vistit_type", vistitType).eq("location_type", 3).eq("parent_id",1));
|
|
|
+ baseLocation = baseLocationMapper.selectOne(new QueryWrapper<BaseLocation>().eq("farm_id", farmId).eq("vistit_type", vistitType).eq("parent_id", 0));
|
|
|
}
|
|
|
if (ObjectUtil.isEmpty(baseLocation)) {
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
@@ -156,12 +160,11 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
billPersonnelAdmission.setProcessId(baseProcess.getId());
|
|
|
billPersonnelAdmissionMapper.insert(billPersonnelAdmission);
|
|
|
ArrayList<String> phoneList = new ArrayList<>();
|
|
|
- List<SysAccountMultilevel> factory = sysAccountMultilevelMapper.selectList(new QueryWrapper<SysAccountMultilevel>().eq("farm_ids", farmId).eq("type", 1));
|
|
|
- for (SysAccountMultilevel sysAccountMultilevel : factory) {
|
|
|
+ List<SysAccountMultilevel> safe = sysAccountMultilevelMapper.selectList(new QueryWrapper<SysAccountMultilevel>().eq("farm_ids", farmId).eq("type", 3));
|
|
|
+ for (SysAccountMultilevel sysAccountMultilevel : safe) {
|
|
|
phoneList.add(sysAccountMultilevel.getPhone());
|
|
|
}
|
|
|
-// SendSMS.sendSMS(phoneList,TokenSign.getUserNameByJwtToken(httpServletRequest)+"入场申请测试");
|
|
|
- SendSMS.sendSMS(phoneList,"污渍正在进场!");
|
|
|
+ SendSMS.sendSMS(phoneList,TokenSign.getUserNameByJwtToken(httpServletRequest)+"入场申请测试");
|
|
|
if (ObjectUtil.isNotEmpty(goods)){
|
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
|
List<BillGoodsInventory> admissionAndGoods = objectMapper.readValue(goods, new TypeReference<List<BillGoodsInventory>>() {});
|
|
@@ -266,8 +269,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
billPersonnelAdmission.setBillStatus(2);
|
|
|
baseProcess.setProcessType(2);
|
|
|
baseProcess.setCurrentStatus(String.join(",",split));
|
|
|
-// SendSMS.sendSMS(phoneList,"拒绝入场申请测试");
|
|
|
- SendSMS.sendSMS(phoneList,"污渍倒了");
|
|
|
+ SendSMS.sendSMS(phoneList,"拒绝入场申请测试");
|
|
|
+// SendSMS.sendSMS(phoneList,"污渍倒了");
|
|
|
} else {
|
|
|
//通过
|
|
|
billPersonnelAdmission.setBillStatus(1);
|
|
@@ -310,7 +313,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
billPcr.setTestLocation(baseLocation.getLocationName());
|
|
|
billPcr.setTestLocationId(baseLocation.getId());
|
|
|
billPcrMapper.insert(billPcr);
|
|
|
- SendSMS.sendSMS(phoneList,"污渍,永远滴神!");
|
|
|
+ SendSMS.sendSMS(phoneList,"通过入场申请测试");
|
|
|
+// SendSMS.sendSMS(phoneList,"污渍,永远滴神!");
|
|
|
}
|
|
|
} else {
|
|
|
baseProcess.setCurrentStatus("1");
|