This commit is contained in:
parent
4ba06551dc
commit
11a5411d21
|
|
@ -127,7 +127,11 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
if (CollectionUtil.isEmpty(leaseApplyRequestVo.getLeaseApplyDetailsList())) {
|
||||
return AjaxResult.error("请先添加领用任务物资明细");
|
||||
}
|
||||
|
||||
// 根据单号查询此单号是否已经存在
|
||||
List<LeaseApplyInfo> codeInfo = tmTaskMapper.selectLeaseApplyInfoByTaskNo(leaseApplyRequestVo.getLeaseApplyInfo().getCode());
|
||||
if (CollectionUtil.isNotEmpty(codeInfo)) {
|
||||
return AjaxResult.error("此业务单号已经存在,请叉掉后重新提交");
|
||||
}
|
||||
LeaseApplyInfo leaseApplyInfo = leaseApplyRequestVo.getLeaseApplyInfo();
|
||||
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||
Date nowDate = DateUtils.getNowDate();
|
||||
|
|
@ -465,6 +469,10 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
}
|
||||
if(!deptName.equals("")){
|
||||
int thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_LEASE_APPLY.getTaskTypeId());
|
||||
int lzThisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId());
|
||||
if (StringUtils.isBlank(leaseDeptInfo.getCompanySX())) {
|
||||
thisMonthMaxOrder = Math.max(thisMonthMaxOrder, lzThisMonthMaxOrder);
|
||||
}
|
||||
taskCode = genderTaskCodeTwo(thisMonthMaxOrder,leaseDeptInfo.getCompanySX());
|
||||
leaseDeptInfo.setTaskCode(taskCode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.material.task.mapper;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
|
||||
import com.bonus.material.back.domain.BackApplyInfo;
|
||||
import com.bonus.material.basic.domain.BmUnit;
|
||||
|
|
@ -137,4 +138,11 @@ public interface TmTaskMapper {
|
|||
* @return
|
||||
*/
|
||||
BmUnit selectBmUnitInfo(BackApplyInfo backApplyInfo);
|
||||
|
||||
/**
|
||||
* 根据任务编号查询任务信息
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
List<LeaseApplyInfo> selectLeaseApplyInfoByTaskNo(String code);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -392,8 +392,8 @@
|
|||
case tt.task_status
|
||||
when 0 then '待审核'
|
||||
when 6 then '审核中'
|
||||
when 3 then '已驳回'
|
||||
when 2 then '已完成'
|
||||
when 3 then '已完成'
|
||||
when 2 then '已驳回'
|
||||
when 5 then '待提交'
|
||||
end as taskStatusName,
|
||||
IFNULL(sum(lad.pre_num),0) as preCountNum,
|
||||
|
|
|
|||
|
|
@ -215,4 +215,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
unit_id = #{unitId}
|
||||
</select>
|
||||
|
||||
<select id="selectLeaseApplyInfoByTaskNo" resultType="com.bonus.common.biz.domain.lease.LeaseApplyInfo">
|
||||
SELECT
|
||||
task_id as taskId,
|
||||
code as code
|
||||
FROM
|
||||
tm_task
|
||||
WHERE
|
||||
code = #{code}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue