This commit is contained in:
parent
db80268cb9
commit
e86f1aa88d
|
|
@ -423,6 +423,17 @@ public class LeaseTaskController extends BaseController {
|
||||||
return success(listByMaType);
|
return success(listByMaType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领用申请领用物资类型连动式下拉框(专用)
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "获取领用物资类型连动式下拉框")
|
||||||
|
@GetMapping("/equipmentThreeTypeLease")
|
||||||
|
public AjaxResult equipmentThreeTypeLease() {
|
||||||
|
List<Type> listByMaType = service.getEquipmentThreeTypeLease();
|
||||||
|
return success(listByMaType);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领用申请撤回功能
|
* 领用申请撤回功能
|
||||||
* 将任务状态撤回到--待提交
|
* 将任务状态撤回到--待提交
|
||||||
|
|
|
||||||
|
|
@ -363,4 +363,10 @@ public interface LeaseTaskMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Type isRs(Long newTypeId);
|
Type isRs(Long newTypeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询领用申请三级分类
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Type> selectLeaseThreeTypeLease();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -178,5 +178,11 @@ public interface ILeaseTaskService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult getBusinessFormByCode(LeaseApplyInfo leaseApplyInfo);
|
AjaxResult getBusinessFormByCode(LeaseApplyInfo leaseApplyInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询领用申请3级--前端联动式下拉框
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Type> getEquipmentThreeTypeLease();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1516,6 +1516,27 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询领用申请3级
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Type> getEquipmentThreeTypeLease() {
|
||||||
|
List<Type> maTypes = mapper.selectLeaseThreeTypeLease();
|
||||||
|
List<Type> list = new ArrayList<>();
|
||||||
|
for (Type maType : maTypes) {
|
||||||
|
if (maType.getParentId() == 0) {
|
||||||
|
list.add(maType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//根据父节点获取对应的儿子节点
|
||||||
|
for (Type maType : list) {
|
||||||
|
List<Type> child = getChild(maTypes, maType.getTypeId());
|
||||||
|
maType.setChildren(child);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成发布批次任务
|
* 生成发布批次任务
|
||||||
* @param thisMonthMaxOrder
|
* @param thisMonthMaxOrder
|
||||||
|
|
|
||||||
|
|
@ -207,8 +207,7 @@ public class TypeController extends BaseController {
|
||||||
@ApiOperation(value = "获取领用物资类型连动式下拉框")
|
@ApiOperation(value = "获取领用物资类型连动式下拉框")
|
||||||
@GetMapping("/equipmentTypeLease")
|
@GetMapping("/equipmentTypeLease")
|
||||||
public AjaxResult equipmentTypeLease(@RequestParam(required = false) Long typeId, @RequestParam(required = false) String typeName) {
|
public AjaxResult equipmentTypeLease(@RequestParam(required = false) Long typeId, @RequestParam(required = false) String typeName) {
|
||||||
Long deptId = typeService.getUserDeptId();
|
List<Type> listByMaType = typeService.equipmentTypeLease(typeId, typeName);
|
||||||
List<Type> listByMaType = typeService.equipmentTypeLease(typeId, typeName, deptId);
|
|
||||||
return success(listByMaType);
|
return success(listByMaType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -286,5 +286,5 @@ public interface TypeMapper {
|
||||||
* @param typeName
|
* @param typeName
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Type> equipmentTypeLease(@Param("typeId") Long typeId, @Param("typeName") String typeName, @Param("companyId") Long companyId);
|
List<Type> equipmentTypeLease(@Param("typeId") Long typeId, @Param("typeName") String typeName);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -170,10 +170,9 @@ public interface ITypeService {
|
||||||
* 获取领用物资类型连动式下拉框
|
* 获取领用物资类型连动式下拉框
|
||||||
* @param typeId
|
* @param typeId
|
||||||
* @param typeName
|
* @param typeName
|
||||||
* @param deptId
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Type> equipmentTypeLease(Long typeId, String typeName, Long deptId);
|
List<Type> equipmentTypeLease(Long typeId, String typeName);
|
||||||
|
|
||||||
Long getUserDeptId();
|
Long getUserDeptId();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -356,8 +356,8 @@ public class TypeServiceImpl implements ITypeService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Type> equipmentTypeLease(Long typeId, String typeName, Long deptId) {
|
public List<Type> equipmentTypeLease(Long typeId, String typeName) {
|
||||||
List<Type> maTypes = typeMapper.equipmentTypeLease(typeId, typeName, deptId);
|
List<Type> maTypes = typeMapper.equipmentTypeLease(typeId, typeName);
|
||||||
List<Type> roots = maTypes.stream()
|
List<Type> roots = maTypes.stream()
|
||||||
.filter(t -> t.getParentId() == 0)
|
.filter(t -> t.getParentId() == 0)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="directAuditBy != null "> and lai.direct_audit_by = #{directAuditBy}</if>
|
<if test="directAuditBy != null "> and lai.direct_audit_by = #{directAuditBy}</if>
|
||||||
<if test="directAuditTime != null "> and lai.direct_audit_time = #{directAuditTime}</if>
|
<if test="directAuditTime != null "> and lai.direct_audit_time = #{directAuditTime}</if>
|
||||||
<if test="directAuditRemark != null and directAuditRemark != ''"> and lai.direct_audit_remark = #{directAuditRemark}</if>
|
<if test="directAuditRemark != null and directAuditRemark != ''"> and lai.direct_audit_remark = #{directAuditRemark}</if>
|
||||||
<if test="companyId != null "> and lai.company_id = #{companyId}</if>
|
<if test="companyId != null "> and mt.company_id = #{companyId}</if>
|
||||||
<!--<if test="statusList != null and statusList.size() > 0">
|
<!--<if test="statusList != null and statusList.size() > 0">
|
||||||
and tt.task_status in
|
and tt.task_status in
|
||||||
<foreach item="item" collection="statusList" open="(" separator="," close=")">
|
<foreach item="item" collection="statusList" open="(" separator="," close=")">
|
||||||
|
|
@ -612,7 +612,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<![CDATA[ AND DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
<![CDATA[ AND DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
<if test="companyId != null ">
|
<if test="companyId != null ">
|
||||||
AND lad.company_id = #{companyId}
|
AND mt.company_id = #{companyId}
|
||||||
</if>
|
</if>
|
||||||
GROUP BY
|
GROUP BY
|
||||||
lad.parent_id
|
lad.parent_id
|
||||||
|
|
|
||||||
|
|
@ -858,7 +858,7 @@
|
||||||
AND DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
|
AND DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="companyId != null ">
|
<if test="companyId != null ">
|
||||||
AND lai.company_id = #{companyId}
|
AND mt.company_id = #{companyId}
|
||||||
</if>
|
</if>
|
||||||
<if test="isApp != null and taskStatus==1">and (tt.task_status = 0 or tt.task_status = 1) </if>
|
<if test="isApp != null and taskStatus==1">and (tt.task_status = 0 or tt.task_status = 1) </if>
|
||||||
<if test="isApp != null and taskStatus==3">and (tt.task_status = 3 or tt.task_status = 4 or tt.task_status = 5)</if>
|
<if test="isApp != null and taskStatus==3">and (tt.task_status = 3 or tt.task_status = 4 or tt.task_status = 5)</if>
|
||||||
|
|
@ -1361,4 +1361,16 @@
|
||||||
WHERE
|
WHERE
|
||||||
type_id = #{newTypeId}
|
type_id = #{newTypeId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectLeaseThreeTypeLease" resultMap="TypeResult">
|
||||||
|
SELECT m.type_id,
|
||||||
|
m.type_name,
|
||||||
|
m.parent_id,
|
||||||
|
m.manage_type,
|
||||||
|
m.LEVEL,
|
||||||
|
m.type_id AS id,
|
||||||
|
m.type_name AS label
|
||||||
|
FROM ma_type m
|
||||||
|
WHERE m.del_flag = '0' and m.is_lease = 0
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -1524,9 +1524,6 @@
|
||||||
<if test="typeId != null and typeId !=''">
|
<if test="typeId != null and typeId !=''">
|
||||||
AND m.type_id = #{typeId}
|
AND m.type_id = #{typeId}
|
||||||
</if>
|
</if>
|
||||||
<if test="companyId != null and companyId !=''">
|
|
||||||
AND m.company_id=#{companyId}
|
|
||||||
</if>
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue