电子标签查询修改

This commit is contained in:
bonus 2025-08-29 18:32:55 +08:00
parent 9ebd493f87
commit b0468de806
5 changed files with 62 additions and 0 deletions

View File

@ -195,6 +195,21 @@ public class MachineController extends BaseController {
return error("系统错误, " + e.getMessage());
}
}
/**
* 电子标签编码查询接口
*
* @param machine
* @return
*/
@ApiOperation(value = "电子标签编码查询接口")
@GetMapping("/getNewByMaCode")
public AjaxResult getNewByMaCode(Machine machine) {
try {
return success(machineService.getNewByMaCode(machine));
} catch (Exception e) {
return error("系统错误, " + e.getMessage());
}
}
/**
* 根据标签信息查询出库单

View File

@ -225,4 +225,6 @@ public interface MachineMapper
int editMachineStatus(Machine machine);
int updateMaStatus(BoxBindWarehouseDto boxMa);
List<Machine> getNewByMaCode(Machine machine);
}

View File

@ -142,4 +142,6 @@ public interface IMachineService
AjaxResult getHisByCodeNew(Machine machine);
AjaxResult editMachineStatus(Machine machine);
List<Machine> getNewByMaCode(Machine machine);
}

View File

@ -582,6 +582,11 @@ public class MachineServiceImpl implements IMachineService
return error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
}
@Override
public List<Machine> getNewByMaCode(Machine machine) {
return machineMapper.getNewByMaCode(machine);
}
/**
* 编码铭牌信息
* @param machine

View File

@ -994,4 +994,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateMaStatus">
update ma_machine set ma_status = 1 where ma_id = #{maId}
</update>
<select id="getNewByMaCode" resultMap="MachineResult">
SELECT
mi.id as maId,
mi.ma_name as materialName,
mi.ma_model as materialModel,
mi.ma_code as maCode,
LEFT(mi.this_check_time, 10) AS thisCheckTime,
LEFT(mi.next_check_time, 10) AS nextCheckTime,
mi.repair_man as repairMan,
mi.check_man as checkMan,
mi.phone,
mi.result,null AS reportCode,null AS reportUrl,
mi.type,
'1' as devType
FROM
ws_ma_info mi
WHERE mi.ma_code LIKE CONCAT('%',#{maCode},'%') and mi.is_active = 1
UNION
SELECT
mm.ma_id AS id,
mt2.type_name as maName,
mt.type_name as maModel,
mm.ma_code as maCode,
LEFT(mm.this_check_time, 10) AS thisCheckTime,
LEFT(mm.next_check_time, 10) AS nextCheckTime,
mm.check_man as repairMan,
ifnull(mm.inspect_man,"高民") as checkMan,
"0551-63703966" as phone,
"合格" as result,mm.ex_code AS reportCode,mm.ex_url AS reportUrl,
is_jj as type,
mt.jiju_type as devType
FROM ma_machine mm
LEFT JOIN ma_type mt on mm.type_id = mt.type_id
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
WHERE mm.ma_code LIKE CONCAT('%',#{maCode},'%') and mt.MANAGE_TYPE =0
</select>
</mapper>