This commit is contained in:
parent
7eb024869a
commit
ff6e83188f
|
|
@ -956,8 +956,8 @@ public class ClzSltAgreementInfoController extends BaseController {
|
|||
list.add("计量单位");
|
||||
list.add("租赁单价");
|
||||
list.add("租赁数量");
|
||||
list.add("领料日期");
|
||||
list.add("归还日期");
|
||||
list.add("租赁开始日期");
|
||||
list.add("租赁结束日期");
|
||||
list.add("租赁天数");
|
||||
list.add("出场日期");
|
||||
list.add("超期日期");
|
||||
|
|
@ -970,8 +970,8 @@ public class ClzSltAgreementInfoController extends BaseController {
|
|||
list.add("计量单位");
|
||||
list.add("租赁单价");
|
||||
list.add("租赁数量");
|
||||
list.add("领料日期");
|
||||
list.add("归还日期");
|
||||
list.add("租赁开始日期");
|
||||
list.add("租赁结束日期");
|
||||
list.add("租赁天数");
|
||||
list.add("出场日期");
|
||||
list.add("超期日期");
|
||||
|
|
|
|||
|
|
@ -207,7 +207,8 @@ public class TypeController extends BaseController {
|
|||
@ApiOperation(value = "获取领用物资类型连动式下拉框")
|
||||
@GetMapping("/equipmentTypeLease")
|
||||
public AjaxResult equipmentTypeLease(@RequestParam(required = false) Long typeId, @RequestParam(required = false) String typeName) {
|
||||
List<Type> listByMaType = typeService.equipmentTypeLease(typeId, typeName);
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
List<Type> listByMaType = typeService.equipmentTypeLease(typeId, typeName, deptId);
|
||||
return success(listByMaType);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -286,5 +286,5 @@ public interface TypeMapper {
|
|||
* @param typeName
|
||||
* @return
|
||||
*/
|
||||
List<Type> equipmentTypeLease(@Param("typeId") Long typeId, @Param("typeName") String typeName);
|
||||
List<Type> equipmentTypeLease(@Param("typeId") Long typeId, @Param("typeName") String typeName, @Param("companyId") Long companyId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,9 +170,10 @@ public interface ITypeService {
|
|||
* 获取领用物资类型连动式下拉框
|
||||
* @param typeId
|
||||
* @param typeName
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
List<Type> equipmentTypeLease(Long typeId, String typeName);
|
||||
List<Type> equipmentTypeLease(Long typeId, String typeName, Long deptId);
|
||||
|
||||
Long getUserDeptId();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -356,8 +356,8 @@ public class TypeServiceImpl implements ITypeService {
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Type> equipmentTypeLease(Long typeId, String typeName) {
|
||||
List<Type> maTypes = typeMapper.equipmentTypeLease(typeId, typeName);
|
||||
public List<Type> equipmentTypeLease(Long typeId, String typeName, Long deptId) {
|
||||
List<Type> maTypes = typeMapper.equipmentTypeLease(typeId, typeName, deptId);
|
||||
List<Type> roots = maTypes.stream()
|
||||
.filter(t -> t.getParentId() == 0)
|
||||
.collect(Collectors.toList());
|
||||
|
|
|
|||
|
|
@ -63,7 +63,12 @@
|
|||
WHEN bp.actual_end_date is not null THEN '1'
|
||||
ELSE '0'
|
||||
END as isFinish,
|
||||
bp.actual_end_date as actualEndDate
|
||||
bp.actual_end_date as actualEndDate,
|
||||
mt.jiju_type as jijuType,
|
||||
CASE
|
||||
WHEN bu.type_id = 1731 THEN '0'
|
||||
ELSE '1'
|
||||
END as isTeam
|
||||
FROM
|
||||
bm_agreement_info bai
|
||||
LEFT JOIN slt_agreement_info sai ON sai.agreement_id = bai.agreement_id
|
||||
|
|
@ -118,6 +123,16 @@
|
|||
<if test="isSlt != null and isSlt != ''">
|
||||
and sai.is_slt = #{isSlt}
|
||||
</if>
|
||||
<if test="jijuType != null and jijuType != '' ">
|
||||
and mt.jiju_type = #{jijuType}
|
||||
</if>
|
||||
<if test="isTeam != null">
|
||||
and bu.type_id
|
||||
<choose>
|
||||
<when test="isTeam == 0">= 1731</when>
|
||||
<when test="isTeam == 1">!= 1731</when>
|
||||
</choose>
|
||||
</if>
|
||||
GROUP BY
|
||||
bai.agreement_id,
|
||||
mt.type_id
|
||||
|
|
|
|||
|
|
@ -261,6 +261,7 @@
|
|||
<if test="samplingRatio != null">sampling_ratio,</if>
|
||||
<if test="isEnter != null">is_enter,</if>
|
||||
<if test="jiJuType != null">jiJu_type,</if>
|
||||
<if test="companyId != null">company_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="typeName != null and typeName != ''">#{typeName},</if>
|
||||
|
|
@ -298,6 +299,7 @@
|
|||
<if test="samplingRatio != null">#{samplingRatio},</if>
|
||||
<if test="isEnter != null">#{isEnter},</if>
|
||||
<if test="jiJuType != null">#{jiJuType},</if>
|
||||
<if test="companyId != null">#{companyId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -1522,6 +1524,9 @@
|
|||
<if test="typeId != null and typeId !=''">
|
||||
AND m.type_id = #{typeId}
|
||||
</if>
|
||||
<if test="companyId != null and companyId !=''">
|
||||
AND m.company_id=#{companyId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue