diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/enums/TmTaskTypeEnum.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/enums/TmTaskTypeEnum.java index 7d824132..e9f96f8c 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/enums/TmTaskTypeEnum.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/enums/TmTaskTypeEnum.java @@ -29,7 +29,9 @@ public enum TmTaskTypeEnum { //安全工器具领料任务 TM_TASK_SAFE_LEASE(17, "安全工器具领料任务"), // 宏源领料领料任务 - TM_TASK_HY_LEASE(18, "宏源领料任务"); + TM_TASK_HY_LEASE(18, "宏源领料任务"), + // 领用任务 + TM_TASK_LEASE_APPLY(19, "领用任务"); diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java index c7e39d0f..839d29bb 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java @@ -49,6 +49,9 @@ public class LeaseApplyDetails extends BaseEntity { @ApiModelProperty(value = "规格型号id") private Long typeId; + @ApiModelProperty(value = "三级id") + private Long thirdTypeId; + @ApiModelProperty(value = "规格型号id") private Long taskId; diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java index e10215ed..31d47f5d 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java @@ -120,9 +120,9 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService { } else { taskStatus = LeaseTaskStatusEnum.LEASE_TASK_SUBMIT.getStatus(); } - int thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId()); + int thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_LEASE_APPLY.getTaskTypeId()); String taskCode = leaseApplyRequestVo.getLeaseApplyInfo().getCode(); - TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId(), + TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_LEASE_APPLY.getTaskTypeId(), taskStatus, leaseApplyRequestVo.getLeaseApplyInfo().getCompanyId(),thisMonthMaxOrder + 1, taskCode); tmTask.setCreateTime(DateUtils.getNowDate()); @@ -278,7 +278,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService { leaseDeptInfo = mapper.getDeptIdByParentId(parentIdTemp); } if(!deptName.equals("")){ - int thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId()); + int thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_LEASE_APPLY.getTaskTypeId()); taskCode = genderTaskCodeTwo(thisMonthMaxOrder,leaseDeptInfo.getCompanySX()); leaseDeptInfo.setTaskCode(taskCode); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java index 71d4011e..c547c702 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java @@ -137,8 +137,8 @@ public class TypeController extends BaseController { @ApiOperation(value = "根据物资类型ID-查询子级下拉列表") @RequiresPermissions("ma:type:list") @GetMapping("/selectMaTypeListByTypeId") - public AjaxResult selectMaTypeListByTypeId(@NotNull(message = "物资类型ID不能为空") Long typeId) { - List list = typeService.getMaTypeSelectVoListByParentId(typeId); + public AjaxResult selectMaTypeListByTypeId(Type type) { + List list = typeService.getMaTypeSelectVoListByParentId(type.getTypeId()); return success(list); } diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml index 0d67f26e..9c9584be 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml @@ -101,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and lai.lease_type = #{leaseType} and lai.estimate_lease_time = #{estimateLeaseTime} and lai.cost_bearing_party = #{costBearingParty} - and tt.task_status != '0' + and tt.task_type = '2' GROUP BY lai.id ORDER BY tt.task_status,tt.create_time desc diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml index c5100b1d..2d5fc734 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml @@ -329,7 +329,7 @@ and sda.dict_type = 'lease_task_status' left join ma_type mt on lad.type_id = mt.type_id and mt.del_flag = '0' left join ma_type mt1 on mt.parent_id = mt1.type_id and mt1.del_flag = '0' - where 1=1 + where tt.task_type = '19' and lai.code = #{code} and lai.task_id = #{taskId} and lai.lease_person = #{leasePerson} @@ -642,6 +642,7 @@ lad.parent_id AS parentId, mt.type_id AS typeId, mt.type_name AS typeName, + mt2.type_id AS thirdTypeId, mt2.type_name AS maTypeName, CASE mt.manage_type @@ -721,8 +722,8 @@ and sda.dict_type = 'lease_task_status' left join ma_type mt on lad.type_id = mt.type_id and mt.del_flag = '0' left join ma_type mt1 on mt.parent_id = mt1.type_id and mt1.del_flag = '0' - where - tt.task_status = '1' + where tt.task_type = '19' + and tt.task_status = '1' and lai.task_id = #{taskId} and tt.task_status in