现场维修

This commit is contained in:
jiang 2025-07-28 18:41:33 +08:00
parent 21bee91a10
commit bc8ce5ad71
6 changed files with 65 additions and 53 deletions

View File

@ -90,7 +90,7 @@ public class WsMaInfoController extends BaseController {
@SysLog(title = "获取出厂厂家", businessType = OperaType.DELETE, logType = 1, module = "获取出厂厂家")
@PostMapping("/updateCheckTime")
public AjaxResult updateCheckTime(@RequestBody WsMaInfo info) {
return service.updateCheckTime(info.getId());
return service.updateCheckTime(info.getMaCode());
}

View File

@ -92,5 +92,5 @@ public interface WsMaInfoMapper {
*
* @return 条数
*/
int updateCheckTime(Integer id);
int updateCheckTime(String maCode);
}

View File

@ -84,5 +84,5 @@ public interface WsMaInfoService {
*
* @return 条数
*/
AjaxResult updateCheckTime(Integer id);
AjaxResult updateCheckTime(String maCode);
}

View File

@ -196,13 +196,13 @@ public class WsMaInfoServiceImpl implements WsMaInfoService {
/**
* 更新时间
*
* @param id
* @param maCode
* @return 条数
*/
@Override
public AjaxResult updateCheckTime(Integer id) {
public AjaxResult updateCheckTime(String maCode) {
try {
int i = mapper.updateCheckTime(id);
int i = mapper.updateCheckTime(maCode);
return i > 0 ? AjaxResult.success("更新成功") : AjaxResult.error("更新失败");
} catch (Exception e) {
log.error(e.getMessage());

View File

@ -74,6 +74,7 @@
WHERE
ma_code = #{maCode}
</select>
<select id="selectAll" resultMap="BaseResultMap" resultType="com.bonus.material.codeCollection.domain.WsMaInfo">
SELECT *
FROM ws_ma_info
@ -116,12 +117,22 @@
opt_time = #{optTime}
WHERE id = #{id}
</update>
<update id="updateCheckTime">
<!-- 更新 ws_ma_info 表 -->
UPDATE ws_ma_info
SET this_check_time = DATE(now()),
SET this_check_time = NOW(),
next_check_time = DATE(DATE_SUB(DATE_ADD(NOW(), INTERVAL 1 YEAR), INTERVAL 1 DAY)),
opt_time = DATE(now())
WHERE id = #{id}
opt_time = NOW()
WHERE ma_code = #{maCode};
<!-- 更新 ma_machine 表 -->
UPDATE ma_machine
SET this_check_time = NOW(),
next_check_time = DATE(DATE_SUB(DATE_ADD(NOW(), INTERVAL 1 YEAR), INTERVAL 1 DAY)),
update_time = NOW()
WHERE ma_code = #{maCode}
</update>
<delete id="deleteById" parameterType="int">

View File

@ -686,7 +686,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sda.dict_label as maStatus,
ma.qr_code as qrCode,
ma.buy_price as buyPrice,
ma.ma_vender as maVender,
msi.supplier as maVender,
ma.out_fac_time as outFacTime,
ma.out_fac_code as outFacCode,
ma.assets_code as assetsCode,
@ -719,6 +719,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and mt4.`level` = '1' and mt4.del_flag = '0'
LEFT JOIN sys_dict_data sda on sda.dict_value = ma.ma_status
and sda.dict_type = "ma_machine_status"
LEFT JOIN ma_supplier_info msi ON msi.supplier_id = ma.ma_vender
where
1=1
<if test="maCode != null and maCode != ''">