Merge branch 'dev' of http://192.168.0.56:3000/bonus/devicesmgt into dev
This commit is contained in:
commit
e77c589cb9
|
|
@ -274,7 +274,7 @@ public class TmTaskController extends BaseController {
|
||||||
* 查询机具领料审核列表
|
* 查询机具领料审核列表
|
||||||
*
|
*
|
||||||
* @param task 筛选条件
|
* @param task 筛选条件
|
||||||
* @param souceBy app为1
|
* @param souceBy app为1 web为0
|
||||||
* @return 列表
|
* @return 列表
|
||||||
*/
|
*/
|
||||||
@Log(title = "查询机具领料审核列表", businessType = BusinessType.QUERY)
|
@Log(title = "查询机具领料审核列表", businessType = BusinessType.QUERY)
|
||||||
|
|
|
||||||
|
|
@ -49,4 +49,6 @@ public interface LeaseOutDetailsMapper {
|
||||||
String getTaskId(Integer parentId);
|
String getTaskId(Integer parentId);
|
||||||
|
|
||||||
int updateTaskStatus(@Param("taskId") String taskId,@Param("status")int status);
|
int updateTaskStatus(@Param("taskId") String taskId,@Param("status")int status);
|
||||||
|
|
||||||
|
String getMachineStatus(LeaseOutDetails record);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,10 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
||||||
if (StringUtils.isNull(record)) {
|
if (StringUtils.isNull(record)) {
|
||||||
return AjaxResult.error("领料出库失败,请检查参数是否填写完整!");
|
return AjaxResult.error("领料出库失败,请检查参数是否填写完整!");
|
||||||
}
|
}
|
||||||
|
String status = leaseOutDetailsMapper.getMachineStatus(record);
|
||||||
|
if (status.equals("16")){
|
||||||
|
return AjaxResult.error("领料出库失败,该设备不是在库状态!");
|
||||||
|
}
|
||||||
if (record.getOutNum() == null || record.getOutNum() < 0.1) {
|
if (record.getOutNum() == null || record.getOutNum() < 0.1) {
|
||||||
record.setOutNum(1.00);
|
record.setOutNum(1.00);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -410,10 +410,9 @@
|
||||||
WHERE tta.agreement_id = #{agreementId}
|
WHERE tta.agreement_id = #{agreementId}
|
||||||
and tt.task_type = '29'
|
and tt.task_type = '29'
|
||||||
and mt.`level`='4'
|
and mt.`level`='4'
|
||||||
|
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and mt.type_name like concat('%', #{keyWord}, '%') or
|
and (mt.type_name like concat('%', #{keyWord}, '%') or
|
||||||
and mt2.type_name like concat('%', #{keyWord}, '%')
|
mt2.type_name like concat('%', #{keyWord}, '%'))
|
||||||
</if>
|
</if>
|
||||||
GROUP BY mt.type_id
|
GROUP BY mt.type_id
|
||||||
) AS subquery1
|
) AS subquery1
|
||||||
|
|
@ -435,8 +434,8 @@
|
||||||
and tt.task_type = '36'
|
and tt.task_type = '36'
|
||||||
and mt.`level`='4'
|
and mt.`level`='4'
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and mt.type_name like concat('%', #{keyWord}, '%') or
|
and (mt.type_name like concat('%', #{keyWord}, '%') or
|
||||||
and mt2.type_name like concat('%', #{keyWord}, '%')
|
mt2.type_name like concat('%', #{keyWord}, '%'))
|
||||||
</if>
|
</if>
|
||||||
GROUP BY mt.type_id
|
GROUP BY mt.type_id
|
||||||
) AS subquery2
|
) AS subquery2
|
||||||
|
|
@ -448,18 +447,13 @@
|
||||||
<select id="view" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
<select id="view" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||||
SELECT
|
SELECT
|
||||||
mt.type_name typeCode,
|
mt.type_name typeCode,
|
||||||
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeName,
|
CONCAT_WS('/', IFNULL(mt2.type_name, '')) AS typeName,
|
||||||
bad.pre_num as num,
|
bad.pre_num as num
|
||||||
mm.ma_code as maCode
|
|
||||||
FROM
|
FROM
|
||||||
back_apply_details bad
|
back_apply_details bad
|
||||||
LEFT JOIN back_apply_info bai on bai.id=bad.parent_id
|
LEFT JOIN back_apply_info bai on bai.id=bad.parent_id
|
||||||
LEFT JOIN ma_type mt on mt.type_id=bad.type_id
|
LEFT JOIN ma_type mt on mt.type_id=bad.type_id
|
||||||
LEFT JOIN ma_type mt1 ON mt1.type_id=bad.type_id
|
LEFT JOIN ma_type mt2 ON mt2.type_id=mt.parent_id
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id=mt1.parent_id
|
|
||||||
LEFT JOIN ma_type mt3 ON mt3.type_id=mt2.parent_id
|
|
||||||
LEFT JOIN ma_type mt4 ON mt4.type_id=mt3.parent_id
|
|
||||||
LEFT JOIN ma_machine mm on mm.type_id=bad.type_id
|
|
||||||
WHERE
|
WHERE
|
||||||
bai.id=#{id}
|
bai.id=#{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -470,6 +464,7 @@
|
||||||
bai.phone,
|
bai.phone,
|
||||||
bpl.lot_name as lotName,
|
bpl.lot_name as lotName,
|
||||||
bui.unit_name as unitName,
|
bui.unit_name as unitName,
|
||||||
|
bai.back_time as backTime,
|
||||||
bagi.plan_start_time as planStartTime,
|
bagi.plan_start_time as planStartTime,
|
||||||
tt.task_status as taskStatus,
|
tt.task_status as taskStatus,
|
||||||
GROUP_CONCAT(DISTINCT bad.type_id) as typeId,
|
GROUP_CONCAT(DISTINCT bad.type_id) as typeId,
|
||||||
|
|
@ -490,20 +485,19 @@
|
||||||
WHERE
|
WHERE
|
||||||
bad.type_id is not null
|
bad.type_id is not null
|
||||||
GROUP BY bai.id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time
|
GROUP BY bai.id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time
|
||||||
|
ORDER BY bai.create_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="examineView" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
<select id="examineView" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||||
SELECT
|
SELECT
|
||||||
mt.type_name typeCode,
|
mt.type_name typeCode,
|
||||||
CONCAT_WS('/', IFNULL(mt2.type_name, '')) AS typeName,
|
CONCAT_WS('/', IFNULL(mt2.type_name, '')) AS typeName,
|
||||||
bad.pre_num as num,
|
bad.pre_num as num
|
||||||
mm.ma_code as maCode
|
|
||||||
FROM
|
FROM
|
||||||
back_apply_details bad
|
back_apply_details bad
|
||||||
LEFT JOIN back_apply_info bai on bai.id=bad.parent_id
|
LEFT JOIN back_apply_info bai on bai.id=bad.parent_id
|
||||||
LEFT JOIN ma_type mt on mt.type_id=bad.type_id
|
LEFT JOIN ma_type mt on mt.type_id=bad.type_id
|
||||||
LEFT JOIN ma_type mt1 ON mt1.type_id=bad.type_id
|
LEFT JOIN ma_type mt1 ON mt1.type_id=bad.type_id
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id=mt1.parent_id
|
LEFT JOIN ma_type mt2 ON mt2.type_id=mt1.parent_id
|
||||||
LEFT JOIN ma_machine mm on mm.type_id=bad.type_id
|
|
||||||
WHERE
|
WHERE
|
||||||
bai.id=#{id}
|
bai.id=#{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,11 @@
|
||||||
from lease_apply_info
|
from lease_apply_info
|
||||||
where id = #{parentId}
|
where id = #{parentId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getMachineStatus" resultType="java.lang.String">
|
||||||
|
select ma_status
|
||||||
|
from ma_machine
|
||||||
|
where ma_id = #{maId}
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="updateLeaseApplyDetailsOutNum">
|
<update id="updateLeaseApplyDetailsOutNum">
|
||||||
UPDATE
|
UPDATE
|
||||||
|
|
|
||||||
|
|
@ -339,9 +339,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE
|
WHERE
|
||||||
1=1
|
1=1
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and bai.`code` like concat('%', #{keyWord}, '%') or
|
and (bai.`code` like concat('%', #{keyWord}, '%') or
|
||||||
bai.back_person like concat('%', #{keyWord}, '%') or
|
bai.back_person like concat('%', #{keyWord}, '%') or
|
||||||
bai.phone like concat('%', #{keyWord}, '%')
|
bai.phone like concat('%', #{keyWord}, '%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="unitId != null and unitId != ''">
|
<if test="unitId != null and unitId != ''">
|
||||||
and bui.unit_id = #{unitId}
|
and bui.unit_id = #{unitId}
|
||||||
|
|
@ -391,8 +391,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and mt.`level`='4'
|
and mt.`level`='4'
|
||||||
|
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and mt.type_name like concat('%', #{keyWord}, '%') or
|
and (mt.type_name like concat('%', #{keyWord}, '%') or
|
||||||
mt2.type_name like concat('%', #{keyWord}, '%')
|
mt2.type_name like concat('%', #{keyWord}, '%'))
|
||||||
</if>
|
</if>
|
||||||
GROUP BY mt.type_id
|
GROUP BY mt.type_id
|
||||||
) AS subquery1
|
) AS subquery1
|
||||||
|
|
@ -416,8 +416,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and tt.task_type = '36'
|
and tt.task_type = '36'
|
||||||
and mt.`level`='4'
|
and mt.`level`='4'
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and mt.type_name like concat('%', #{keyWord}, '%') or
|
and (mt.type_name like concat('%', #{keyWord}, '%') or
|
||||||
mt2.type_name like concat('%', #{keyWord}, '%')
|
mt2.type_name like concat('%', #{keyWord}, '%'))
|
||||||
</if>
|
</if>
|
||||||
GROUP BY mt.type_id
|
GROUP BY mt.type_id
|
||||||
) AS subquery2
|
) AS subquery2
|
||||||
|
|
@ -454,6 +454,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||||
WHERE
|
WHERE
|
||||||
bai.id = #{id}
|
bai.id = #{id}
|
||||||
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
and (mt2.type_name like concat('%', #{keyWord}, '%') or
|
||||||
|
mt.type_name like concat('%', #{keyWord}, '%'))
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="getUseTypeTree" resultType="com.bonus.sgzb.material.domain.TypeTreeNode">
|
<select id="getUseTypeTree" resultType="com.bonus.sgzb.material.domain.TypeTreeNode">
|
||||||
WITH RECURSIVE cte AS (
|
WITH RECURSIVE cte AS (
|
||||||
|
|
@ -565,9 +569,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where
|
where
|
||||||
1=1
|
1=1
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and bai.`code` like concat('%', #{keyWord}, '%') or
|
and (bai.`code` like concat('%', #{keyWord}, '%') or
|
||||||
bai.back_person like concat('%', #{keyWord}, '%') or
|
bai.back_person like concat('%', #{keyWord}, '%') or
|
||||||
bai.phone like concat('%', #{keyWord}, '%')
|
bai.phone like concat('%', #{keyWord}, '%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="unitId != null and unitId != ''">
|
<if test="unitId != null and unitId != ''">
|
||||||
and bui.unit_id = #{unitId}
|
and bui.unit_id = #{unitId}
|
||||||
|
|
|
||||||
|
|
@ -337,8 +337,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN sys_user us on us.user_id = tt.update_by
|
LEFT JOIN sys_user us on us.user_id = tt.update_by
|
||||||
WHERE pcd.task_id = #{taskId}
|
WHERE pcd.task_id = #{taskId}
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and mt.pa_name like concat('%',#{keyWord},'%') or
|
and (mt.pa_name like concat('%',#{keyWord},'%') or
|
||||||
mt1.pa_name like concat('%',#{keyWord},'%')
|
mt1.pa_name like concat('%',#{keyWord},'%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="modelId != null and modelId != ''">
|
<if test="modelId != null and modelId != ''">
|
||||||
and mt1.pa_id = #{modelId}
|
and mt1.pa_id = #{modelId}
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@ public class TreeNode {
|
||||||
|
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
|
private float num;
|
||||||
|
|
||||||
private String modelCode;
|
private String modelCode;
|
||||||
|
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
unit_name AS unitName,
|
unit_name AS unitName,
|
||||||
company_id AS companyId,
|
company_id AS companyId,
|
||||||
code,
|
code,
|
||||||
|
num,
|
||||||
model_code modelCode
|
model_code modelCode
|
||||||
FROM ma_type
|
FROM ma_type
|
||||||
WHERE del_flag = '0'
|
WHERE del_flag = '0'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue