现场维修
This commit is contained in:
parent
21bee91a10
commit
bc8ce5ad71
|
|
@ -90,7 +90,7 @@ public class WsMaInfoController extends BaseController {
|
||||||
@SysLog(title = "获取出厂厂家", businessType = OperaType.DELETE, logType = 1, module = "获取出厂厂家")
|
@SysLog(title = "获取出厂厂家", businessType = OperaType.DELETE, logType = 1, module = "获取出厂厂家")
|
||||||
@PostMapping("/updateCheckTime")
|
@PostMapping("/updateCheckTime")
|
||||||
public AjaxResult updateCheckTime(@RequestBody WsMaInfo info) {
|
public AjaxResult updateCheckTime(@RequestBody WsMaInfo info) {
|
||||||
return service.updateCheckTime(info.getId());
|
return service.updateCheckTime(info.getMaCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,5 +92,5 @@ public interface WsMaInfoMapper {
|
||||||
*
|
*
|
||||||
* @return 条数
|
* @return 条数
|
||||||
*/
|
*/
|
||||||
int updateCheckTime(Integer id);
|
int updateCheckTime(String maCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,5 +84,5 @@ public interface WsMaInfoService {
|
||||||
*
|
*
|
||||||
* @return 条数
|
* @return 条数
|
||||||
*/
|
*/
|
||||||
AjaxResult updateCheckTime(Integer id);
|
AjaxResult updateCheckTime(String maCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -196,13 +196,13 @@ public class WsMaInfoServiceImpl implements WsMaInfoService {
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @param id
|
* @param maCode
|
||||||
* @return 条数
|
* @return 条数
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult updateCheckTime(Integer id) {
|
public AjaxResult updateCheckTime(String maCode) {
|
||||||
try {
|
try {
|
||||||
int i = mapper.updateCheckTime(id);
|
int i = mapper.updateCheckTime(maCode);
|
||||||
return i > 0 ? AjaxResult.success("更新成功") : AjaxResult.error("更新失败");
|
return i > 0 ? AjaxResult.success("更新成功") : AjaxResult.error("更新失败");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage());
|
log.error(e.getMessage());
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@
|
||||||
WHERE
|
WHERE
|
||||||
ma_code = #{maCode}
|
ma_code = #{maCode}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAll" resultMap="BaseResultMap" resultType="com.bonus.material.codeCollection.domain.WsMaInfo">
|
<select id="selectAll" resultMap="BaseResultMap" resultType="com.bonus.material.codeCollection.domain.WsMaInfo">
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM ws_ma_info
|
FROM ws_ma_info
|
||||||
|
|
@ -116,12 +117,22 @@
|
||||||
opt_time = #{optTime}
|
opt_time = #{optTime}
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<update id="updateCheckTime">
|
<update id="updateCheckTime">
|
||||||
|
<!-- 更新 ws_ma_info 表 -->
|
||||||
UPDATE 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)),
|
next_check_time = DATE(DATE_SUB(DATE_ADD(NOW(), INTERVAL 1 YEAR), INTERVAL 1 DAY)),
|
||||||
opt_time = DATE(now())
|
opt_time = NOW()
|
||||||
WHERE id = #{id}
|
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>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteById" parameterType="int">
|
<delete id="deleteById" parameterType="int">
|
||||||
|
|
|
||||||
|
|
@ -686,7 +686,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
sda.dict_label as maStatus,
|
sda.dict_label as maStatus,
|
||||||
ma.qr_code as qrCode,
|
ma.qr_code as qrCode,
|
||||||
ma.buy_price as buyPrice,
|
ma.buy_price as buyPrice,
|
||||||
ma.ma_vender as maVender,
|
msi.supplier as maVender,
|
||||||
ma.out_fac_time as outFacTime,
|
ma.out_fac_time as outFacTime,
|
||||||
ma.out_fac_code as outFacCode,
|
ma.out_fac_code as outFacCode,
|
||||||
ma.assets_code as assetsCode,
|
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'
|
and mt4.`level` = '1' and mt4.del_flag = '0'
|
||||||
LEFT JOIN sys_dict_data sda on sda.dict_value = ma.ma_status
|
LEFT JOIN sys_dict_data sda on sda.dict_value = ma.ma_status
|
||||||
and sda.dict_type = "ma_machine_status"
|
and sda.dict_type = "ma_machine_status"
|
||||||
|
LEFT JOIN ma_supplier_info msi ON msi.supplier_id = ma.ma_vender
|
||||||
where
|
where
|
||||||
1=1
|
1=1
|
||||||
<if test="maCode != null and maCode != ''">
|
<if test="maCode != null and maCode != ''">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue