维修接口bug修改

This commit is contained in:
bonus 2025-07-23 18:44:54 +08:00
parent b8add13440
commit ffca789f74
7 changed files with 75 additions and 19 deletions

View File

@ -178,6 +178,17 @@ public class BackApplyInfoController extends BaseController {
public AjaxResult getMachine(BackApplyInfo dto){
return backApplyInfoService.getMachine(dto);
}
/**
* app根据设备编码去检索退料工程
* @param dto
* @return
*/
@ApiOperation(value = "app编码退料任务建立")
// @RequiresPermissions("back:info:list")
@GetMapping("/getMachineByCode")
public AjaxResult getMachineByCode(BackApplyInfo dto){
return AjaxResult.success(backApplyInfoService.getMachineByCode(dto));
}
/**
* 导出退料任务列表

View File

@ -4,6 +4,7 @@ import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.material.back.domain.BackApplyDetails;
import com.bonus.material.back.domain.BackApplyInfo;
import com.bonus.material.back.domain.MaCodeDto;
@ -380,4 +381,6 @@ public interface BackApplyInfoMapper {
* @return
*/
List<Long> selectTypeIdList(Long userId);
AjaxResult getMachineByCode(BackApplyInfo dto);
}

View File

@ -165,5 +165,7 @@ public interface IBackApplyInfoService {
* @return
*/
AjaxResult deleteByApp(Long id);
AjaxResult getMachineByCode(BackApplyInfo dto);
}

View File

@ -1544,6 +1544,11 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
}
@Override
public AjaxResult getMachineByCode(BackApplyInfo dto) {
return backApplyInfoMapper.getMachineByCode(dto);
}
/**
* 关键字搜索

View File

@ -1019,4 +1019,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where
user_id = #{userId}
</select>
<select id="getMachineByCode" resultType="com.bonus.common.core.web.domain.AjaxResult">
SELECT mm.ma_id AS maId,
mm.ma_code AS maCode,
mm.ma_status AS maStatus,AAAAAAAAAAAAAAAAAAAAA
sd.dict_label AS maStatusName,
mt1.type_name AS typeName,
mm.type_id AS typeId,
mt.type_name AS typeModelName,
mt2.type_name AS materialType,
ba.unit_id AS unitId,
bu.unit_name AS unitName,
ba.project_id AS proId,
bp.pro_name AS proName,
ba.agreement_id AS agreementId
FROM slt_agreement_info sai
LEFT JOIN ma_machine mm ON sai.ma_id = mm.ma_id
LEFT JOIN ma_type mt ON mm.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'
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id
AND mt2.del_flag = '0'
LEFT JOIN bm_agreement_info ba ON sai.agreement_id = ba.agreement_id
LEFT JOIN bm_project bp on bp.pro_id = ba.project_id
AND bp.del_flag = '0'
LEFT JOIN bm_unit bu on bu.unit_id = ba.unit_id
LEFT JOIN sys_dict_data sd on sd.dict_value = mm.ma_status and sd.dict_type = "ma_machine_status"
AND bu.del_flag = '0'
WHERE sai.`status`=0 and mm.ma_status = '2'
and mm.ma_code = #{maCode}
GROUP BY mm.ma_id
</select>
</mapper>

View File

@ -120,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join ma_type mt3 ON mt2.parent_id = mt3.type_id and mt3.del_flag = '0'
left join ma_type mt4 ON mt3.parent_id = mt4.type_id and mt4.del_flag = '0'
<if test="userId != null">
JOIN ma_type_repair mtr ON mtr.type_id = rd.type_id AND mtr.user_id = #{userId}
JOIN ma_type_keeper mtr ON mtr.type_id = rd.type_id AND mtr.user_id = #{userId}
</if>
<where>
rd.create_time &gt;= '2025-07-19 00:00:00'
@ -180,7 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join ma_type mt3 ON mt1.parent_id = mt3.type_id and mt3.del_flag = '0'
left join ma_type mt4 ON mt3.parent_id = mt4.type_id and mt4.del_flag = '0'
<if test="userId != null">
JOIN ma_type_repair mtr ON mtr.type_id = rid.type_id AND mtr.user_id = #{userId}
JOIN ma_type_keeper mtr ON mtr.type_id = rid.type_id AND mtr.user_id = #{userId}
</if>
where rid.task_id = #{taskId}
<if test="keyWord != null and keyWord != ''">