维修接口bug修改
This commit is contained in:
parent
b8add13440
commit
ffca789f74
|
|
@ -37,7 +37,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
|
||||
/**
|
||||
* 退料任务Controller
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出退料任务列表
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -15,14 +16,14 @@ import org.apache.ibatis.annotations.Param;
|
|||
|
||||
/**
|
||||
* 退料任务Mapper接口
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
public interface BackApplyInfoMapper {
|
||||
/**
|
||||
* 查询退料任务
|
||||
*
|
||||
*
|
||||
* @param id 退料任务主键
|
||||
* @return 退料任务
|
||||
*/
|
||||
|
|
@ -30,7 +31,7 @@ public interface BackApplyInfoMapper {
|
|||
|
||||
/**
|
||||
* 查询退料任务列表
|
||||
*
|
||||
*
|
||||
* @param backApplyInfo 退料任务
|
||||
* @return 退料任务集合
|
||||
*/
|
||||
|
|
@ -38,7 +39,7 @@ public interface BackApplyInfoMapper {
|
|||
|
||||
/**
|
||||
* 新增退料任务
|
||||
*
|
||||
*
|
||||
* @param backApplyInfo 退料任务
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -46,7 +47,7 @@ public interface BackApplyInfoMapper {
|
|||
|
||||
/**
|
||||
* 修改退料任务
|
||||
*
|
||||
*
|
||||
* @param backApplyInfo 退料任务
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -54,7 +55,7 @@ public interface BackApplyInfoMapper {
|
|||
|
||||
/**
|
||||
* 删除退料任务
|
||||
*
|
||||
*
|
||||
* @param id 退料任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -380,4 +381,6 @@ public interface BackApplyInfoMapper {
|
|||
* @return
|
||||
*/
|
||||
List<Long> selectTypeIdList(Long userId);
|
||||
|
||||
AjaxResult getMachineByCode(BackApplyInfo dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,14 +13,14 @@ import com.bonus.material.back.domain.vo.BackApplyVo;
|
|||
|
||||
/**
|
||||
* 退料任务Service接口
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
public interface IBackApplyInfoService {
|
||||
/**
|
||||
* 查询退料任务
|
||||
*
|
||||
*
|
||||
* @param id 退料任务主键
|
||||
* @return 退料任务
|
||||
*/
|
||||
|
|
@ -28,7 +28,7 @@ public interface IBackApplyInfoService {
|
|||
|
||||
/**
|
||||
* 查询退料任务列表
|
||||
*
|
||||
*
|
||||
* @param backApplyInfo 退料任务
|
||||
* @return 退料任务集合
|
||||
*/
|
||||
|
|
@ -41,7 +41,7 @@ public interface IBackApplyInfoService {
|
|||
|
||||
/**
|
||||
* 新增退料任务
|
||||
*
|
||||
*
|
||||
* @param dto 退料任务
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -49,7 +49,7 @@ public interface IBackApplyInfoService {
|
|||
|
||||
/**
|
||||
* 修改退料任务
|
||||
*
|
||||
*
|
||||
* @param dto 退料任务
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -57,7 +57,7 @@ public interface IBackApplyInfoService {
|
|||
|
||||
/**
|
||||
* 删除退料任务信息
|
||||
*
|
||||
*
|
||||
* @param id 退料任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -165,5 +165,7 @@ public interface IBackApplyInfoService {
|
|||
* @return
|
||||
*/
|
||||
AjaxResult deleteByApp(Long id);
|
||||
|
||||
AjaxResult getMachineByCode(BackApplyInfo dto);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 关键字搜索
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
order by rad.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectRepairAuditDetailsById" parameterType="Long" resultMap="RepairAuditDetailsResult">
|
||||
<include refid="selectRepairAuditDetailsVo"/>
|
||||
where id = #{id}
|
||||
|
|
@ -220,7 +220,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertRepairAuditDetails" parameterType="com.bonus.material.repair.domain.RepairAuditDetails" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into repair_audit_details
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -300,7 +300,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<delete id="deleteRepairAuditDetailsByIds" parameterType="String">
|
||||
delete from repair_audit_details where id in
|
||||
delete from repair_audit_details where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
|
@ -747,4 +747,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
GROUP BY
|
||||
rar.repair_type
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -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 >= '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 != ''">
|
||||
|
|
|
|||
Loading…
Reference in New Issue