|
|
|
@ -230,14 +230,37 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
return depositoryRecordMapper.insertApplicationOutRecord(map); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据id删除出库记录 |
|
|
|
* @return 受影响的行数 |
|
|
|
* @param id |
|
|
|
*/ |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Override |
|
|
|
public Integer deleteApplicationOutRecordById(Integer id) { |
|
|
|
return depositoryRecordMapper.deleteApplicationOutRecordById(id); |
|
|
|
// 删除主单
|
|
|
|
Integer integer = depositoryRecordMapper.deleteApplicationOutRecordById(id); |
|
|
|
// 开启一个线程去删除子订单
|
|
|
|
new Thread(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
depositoryRecordMapper.deleteApplicationOutRecordMinById(id); |
|
|
|
} |
|
|
|
}).start(); |
|
|
|
return integer; |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Override |
|
|
|
public Integer deleteApplicationOutRecordByIds(List<Integer> list) { |
|
|
|
return depositoryRecordMapper.deleteApplicationOutRecordByIds(list); |
|
|
|
Integer integer = depositoryRecordMapper.deleteApplicationOutRecordByIds(list); |
|
|
|
new Thread(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
depositoryRecordMapper.deleteApplicationOutRecordMinByIds(list); |
|
|
|
} |
|
|
|
}).start(); |
|
|
|
return integer; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -1813,6 +1836,16 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 判断当前出库记录运行状态 |
|
|
|
* @param id |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public boolean judgeApplicationOutRecordStatus(Integer id) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 转移申请 |
|
|
|
* |
|
|
|
@ -2974,7 +3007,18 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
String applyTime = (String) map.get("applyTime"); |
|
|
|
map.put("applicantTime", DateUtil.DateTimeByDayToTimeStamp(applyTime)); |
|
|
|
} |
|
|
|
List<ApplicationOutRecordP> list = depositoryRecordMapper.findApplicationOutRecordPByCondition(map); |
|
|
|
List<RoleAndDepository> depositoryAndRole = roleService.findDepositoryAndRole(userByPort.getId()); |
|
|
|
List<Integer> depositoryIdList = new ArrayList<>(); |
|
|
|
for (RoleAndDepository depository: depositoryAndRole |
|
|
|
) { |
|
|
|
depositoryIdList.add(depository.getDepositoryId()); |
|
|
|
} |
|
|
|
if(depositoryIdList.size() == 0){ |
|
|
|
depositoryIdList = null; |
|
|
|
} |
|
|
|
map.put("depositoryIdList",depositoryIdList); |
|
|
|
map.put("applicantId",userByPort.getId()); |
|
|
|
List<ApplicationOutRecordP> list = depositoryRecordMapper.findApplicationOutRecordPByUser(map); |
|
|
|
for (ApplicationOutRecordP recordP : list) { |
|
|
|
UserByPort userByPortById = LinkInterfaceUtil.FindUserById(recordP.getApplicantId(), userByPort); |
|
|
|
String time = DateUtil.TimeStampToDateTime(Long.valueOf(recordP.getApplicantTime())); |
|
|
|
@ -2992,7 +3036,22 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public Integer findApplicationOutRecordPCountByUser(UserByPort userByPort, Map<String, Object> map) { |
|
|
|
return null; |
|
|
|
if (map.containsKey("applyTime")) { |
|
|
|
String applyTime = (String) map.get("applyTime"); |
|
|
|
map.put("applicantTime", DateUtil.DateTimeByDayToTimeStamp(applyTime)); |
|
|
|
} |
|
|
|
List<RoleAndDepository> depositoryAndRole = roleService.findDepositoryAndRole(userByPort.getId()); |
|
|
|
List<Integer> depositoryIdList = new ArrayList<>(); |
|
|
|
for (RoleAndDepository depository: depositoryAndRole |
|
|
|
) { |
|
|
|
depositoryIdList.add(depository.getDepositoryId()); |
|
|
|
} |
|
|
|
if(depositoryIdList.size() == 0){ |
|
|
|
depositoryIdList = null; |
|
|
|
} |
|
|
|
map.put("depositoryIdList",depositoryIdList); |
|
|
|
map.put("applicantId",userByPort.getId()); |
|
|
|
return depositoryRecordMapper.findApplicationOutRecordPCountByUser(map); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|