This commit is contained in:
parent
82a72adb84
commit
ae7b4ac6ee
|
|
@ -155,8 +155,8 @@ public class Constants
|
||||||
|
|
||||||
/** 机具设备分公司*/
|
/** 机具设备分公司*/
|
||||||
public static final String JJ = "机具设备分公司";
|
public static final String JJ = "机具设备分公司";
|
||||||
/** 调试分公司*/
|
/** 变电施工二分公司*/
|
||||||
public static final String TS = "调试分公司";
|
public static final String TS = "变电施工二分公司";
|
||||||
|
|
||||||
/** 退库任务*/
|
/** 退库任务*/
|
||||||
public static final int BACK_TASK_TYPE = 36; //退料核查中
|
public static final int BACK_TASK_TYPE = 36; //退料核查中
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ public class CommonConstants {
|
||||||
public static final String AQGQJ = "安全工器具";
|
public static final String AQGQJ = "安全工器具";
|
||||||
/** 机具设备分公司*/
|
/** 机具设备分公司*/
|
||||||
public static final String JJ = "机具设备分公司";
|
public static final String JJ = "机具设备分公司";
|
||||||
/** 调试分公司*/
|
/** 变电施工二分公司*/
|
||||||
public static final String TS = "调试分公司";
|
public static final String TS = "变电施工二分公司";
|
||||||
|
|
||||||
/** 机具分公司审核通过状态*/
|
/** 机具分公司审核通过状态*/
|
||||||
public static final String MACHINERY_BRANCH_APPROVE_STATUS = "1";
|
public static final String MACHINERY_BRANCH_APPROVE_STATUS = "1";
|
||||||
|
|
|
||||||
|
|
@ -1287,7 +1287,8 @@
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||||
LEFT JOIN ma_machine mm ON mm.ma_id = bcd.ma_id
|
LEFT JOIN ma_machine mm ON mm.ma_id = bcd.ma_id
|
||||||
LEFT JOIN sys_user su ON su.user_id = baif.back_person
|
LEFT JOIN sys_user su ON su.user_id = baif.back_person
|
||||||
where 1=1
|
where
|
||||||
|
bcd.is_finished = 1
|
||||||
<if test="lotId != null">
|
<if test="lotId != null">
|
||||||
and bpl.lot_id = #{lotId}
|
and bpl.lot_id = #{lotId}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,16 @@ public class BackApplyController extends BaseController {
|
||||||
return backApplyService.getUseTypeTree(bean);
|
return backApplyService.getUseTypeTree(bean);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在用设备类型表
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "在用设备类型表")
|
||||||
|
@PostMapping("/getUseInfoList")
|
||||||
|
public AjaxResult getUseInfoList(@RequestBody BackApplyInfo bean) {
|
||||||
|
return backApplyService.getUseInfoList(bean);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 获取在用物料列表
|
* 获取在用物料列表
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -298,4 +298,7 @@ public class BackApplyInfo extends BaseEntity {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Integer pageSize;
|
private Integer pageSize;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "总在用数量")
|
||||||
|
private Integer totalUseNum;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -185,4 +185,11 @@ public interface BackApplyMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
BackApplyInfo getList(BackApplyInfo backApplyInfo);
|
BackApplyInfo getList(BackApplyInfo backApplyInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在用设备类型表
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<BackApplyInfo> getUseInfoList(BackApplyInfo bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -144,4 +144,11 @@ public interface BackApplyService {
|
||||||
* @param response
|
* @param response
|
||||||
*/
|
*/
|
||||||
void exportInfo(BackApplyInfo bean, HttpServletResponse response);
|
void exportInfo(BackApplyInfo bean, HttpServletResponse response);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在用设备类型表
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult getUseInfoList(BackApplyInfo bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -619,6 +619,17 @@ public class BackApplyServiceImpl implements BackApplyService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在用设备类型表
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult getUseInfoList(BackApplyInfo bean) {
|
||||||
|
// 根据协议id查询目前在用设备
|
||||||
|
return AjaxResult.success(backApplyMapper.getUseInfoList(bean));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出退料单
|
* 导出退料单
|
||||||
* @param response
|
* @param response
|
||||||
|
|
|
||||||
|
|
@ -584,6 +584,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
tt.task_status as taskStatus,
|
tt.task_status as taskStatus,
|
||||||
tta.agreement_id as agreementId,
|
tta.agreement_id as agreementId,
|
||||||
GROUP_CONCAT(DISTINCT bad.type_id) as typeId,
|
GROUP_CONCAT(DISTINCT bad.type_id) as typeId,
|
||||||
|
GROUP_CONCAT(DISTINCT mt2.type_id) as thirdTypeId,
|
||||||
GROUP_CONCAT(DISTINCT mt2.type_name) AS typeName,
|
GROUP_CONCAT(DISTINCT mt2.type_name) AS typeName,
|
||||||
GROUP_CONCAT(bad.status) AS status
|
GROUP_CONCAT(bad.status) AS status
|
||||||
FROM
|
FROM
|
||||||
|
|
@ -632,6 +633,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and bai.back_source =#{backSource}
|
and bai.back_source =#{backSource}
|
||||||
</if>
|
</if>
|
||||||
GROUP BY bai.task_id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time
|
GROUP BY bai.task_id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time
|
||||||
|
<if test="typeId != null and typeId != ''">
|
||||||
|
HAVING FIND_IN_SET(#{typeId}, thirdTypeId) > 0
|
||||||
|
</if>
|
||||||
ORDER BY bai.create_time desc
|
ORDER BY bai.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -1214,4 +1218,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and bcd.type_id = #{typeId}
|
and bcd.type_id = #{typeId}
|
||||||
GROUP By bcd.type_id
|
GROUP By bcd.type_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getUseInfoList" resultType="com.bonus.sgzb.material.domain.BackApplyInfo">
|
||||||
|
SELECT
|
||||||
|
mt.type_id AS typeId,
|
||||||
|
mt1.type_name AS typeName,
|
||||||
|
mt.type_name AS typeCode,
|
||||||
|
mt.unit_name AS unitNames,
|
||||||
|
mt.company_id AS companyId,
|
||||||
|
SUM( IFNULL( sai.num, 0 ) ) AS totalUseNum
|
||||||
|
FROM
|
||||||
|
ma_type mt
|
||||||
|
LEFT JOIN slt_agreement_info sai ON mt.type_id = sai.type_id
|
||||||
|
LEFT JOIN ma_type mt1 ON mt1.type_id = mt.parent_id
|
||||||
|
WHERE
|
||||||
|
sai.`status` = 0
|
||||||
|
AND sai.agreement_id = #{agreementId}
|
||||||
|
AND sai.num > 0
|
||||||
|
AND sai.end_time IS NULL
|
||||||
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
AND (mt1.type_name like concat('%', #{keyWord}, '%') or
|
||||||
|
mt.type_name like concat('%', #{keyWord}, '%'))
|
||||||
|
</if>
|
||||||
|
GROUP BY
|
||||||
|
mt.type_id
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -92,18 +92,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
mt2.type_name AS typeName,
|
mt2.type_name AS typeName,
|
||||||
mt.type_name AS typeModelName,
|
mt.type_name AS typeModelName,
|
||||||
mt.unit_name AS unit,
|
mt.unit_name AS unit,
|
||||||
SUM(IFNULL(bcd.back_num, 0)) backNum
|
SUM(IFNULL(sai.num, 0)) backNum
|
||||||
FROM back_check_details bcd
|
FROM slt_agreement_info sai
|
||||||
LEFT JOIN back_apply_info baif ON baif.id = bcd.parent_id
|
LEFT JOIN back_apply_info baif ON baif.id = sai.back_id
|
||||||
LEFT JOIN tm_task_agreement tta ON tta.task_id = baif.task_id
|
LEFT JOIN tm_task_agreement tta ON tta.task_id = baif.task_id
|
||||||
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
||||||
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bai.project_id
|
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bai.project_id
|
||||||
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
||||||
LEFT JOIN ma_type mt ON mt.type_id = bcd.type_id
|
LEFT JOIN ma_type mt ON mt.type_id = sai.type_id
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||||
LEFT JOIN ma_machine mm ON mm.ma_id = bcd.ma_id
|
LEFT JOIN ma_machine mm ON mm.ma_id = sai.ma_id
|
||||||
LEFT JOIN sys_user su ON su.user_id = baif.back_person
|
LEFT JOIN sys_user su ON su.user_id = baif.back_person
|
||||||
where 1=1
|
where sai.`status` = 1
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and (bai.agreement_code like concat('%',#{keyWord},'%') or
|
and (bai.agreement_code like concat('%',#{keyWord},'%') or
|
||||||
bui.unit_name like concat('%',#{keyWord},'%') or
|
bui.unit_name like concat('%',#{keyWord},'%') or
|
||||||
|
|
@ -126,7 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and mt.type_name like concat('%',#{typeModelName},'%')
|
and mt.type_name like concat('%',#{typeModelName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||||
AND bcd.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
AND sai.end_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||||
</if>
|
</if>
|
||||||
GROUP BY bai.agreement_id,
|
GROUP BY bai.agreement_id,
|
||||||
mt.type_id) AS subquery2 ON subquery1.type_id = subquery2.type_id
|
mt.type_id) AS subquery2 ON subquery1.type_id = subquery2.type_id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue