设备档案 详情修改关联 维修工单 保养工单

This commit is contained in:
shih
2026-04-09 16:38:18 +08:00
parent 7bbdecf009
commit 308a2c0a41
5 changed files with 71 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import com.lideeyunji.core.framework.service.IByglByfaService;
import com.lideeyunji.tool.framework.common.constant.lideeYunJiBaseConstant; import com.lideeyunji.tool.framework.common.constant.lideeYunJiBaseConstant;
import com.lideeyunji.tool.framework.constants.FrameErrorCodeConstants; import com.lideeyunji.tool.framework.constants.FrameErrorCodeConstants;
import com.lideeyunji.tool.framework.yunji.model.global.BaseWebResult; import com.lideeyunji.tool.framework.yunji.model.global.BaseWebResult;
import com.lideeyunji.tool.framework.yunji.utils.FuncBase;
import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils; import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@@ -14,6 +15,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
@Tag(name = "保养管理-保养方案") @Tag(name = "保养管理-保养方案")
@@ -36,4 +39,20 @@ public class ByglController extends BaseController {
} }
@PostMapping("/getByWxXx")
public BaseWebResult getByWxXx(@RequestBody Map<String,Object> model) {
String dev_code = lideeYunJiUtils.getMap2Str(model, "dev_code");
String dev_type = lideeYunJiUtils.getMap2Str(model, "dev_type");
if (FuncBase.isEmpty(dev_code) || FuncBase.isEmpty(dev_type)) {
return BaseWebResult.successNull();
}
List<Map<String,Object>> by = byglByfaService.getByXx(dev_type, dev_code);
List<Map<String,Object>> wx = byglByfaService.getWxXx(dev_type, dev_code);
Map<String , List<Map<String,Object>>> map = new HashMap<>();
map.put("by",by);
map.put("wx",wx);
return BaseWebResult.success(map);
}
} }

View File

@@ -3,6 +3,9 @@ package com.lideeyunji.core.framework.mapper;
import com.baomidou.dynamic.datasource.annotation.Master; import com.baomidou.dynamic.datasource.annotation.Master;
import java.util.List;
import java.util.Map;
/** /**
*保养管理-保养方案 *保养管理-保养方案
*/ */
@@ -10,4 +13,8 @@ import com.baomidou.dynamic.datasource.annotation.Master;
public interface ByglByfaMapper { public interface ByglByfaMapper {
int changeFaState(String id, String state); int changeFaState(String id, String state);
List<Map<String, Object>> getByXx(String dev_type, String dev_code);
List<Map<String, Object>> getWxXx(String dev_type, String dev_code);
} }

View File

@@ -1,10 +1,17 @@
package com.lideeyunji.core.framework.service; package com.lideeyunji.core.framework.service;
import java.util.List;
import java.util.Map;
/** /**
* 保养管理-保养方案 * 保养管理-保养方案
*/ */
public interface IByglByfaService { public interface IByglByfaService {
int changeFaState(String id, String state); int changeFaState(String id, String state);
List<Map<String, Object>> getByXx(String dev_type, String dev_code);
List<Map<String, Object>> getWxXx(String dev_type, String dev_code);
} }

View File

@@ -7,6 +7,9 @@ import com.lideeyunji.core.framework.service.IByglByfaService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/** /**
*保养管理-保养方案 *保养管理-保养方案
*/ */
@@ -21,4 +24,16 @@ public class ByglByfaServiceImpl implements IByglByfaService {
int result = byglByfaMapper.changeFaState(id, state); int result = byglByfaMapper.changeFaState(id, state);
return result; return result;
} }
@Override
public List<Map<String, Object>> getByXx(String dev_type, String dev_code) {
return byglByfaMapper.getByXx(dev_type, dev_code);
}
@Override
public List<Map<String, Object>> getWxXx(String dev_type, String dev_code) {
return byglByfaMapper.getWxXx(dev_type, dev_code);
}
} }

View File

@@ -5,4 +5,27 @@
<update id="changeFaState"> <update id="changeFaState">
update by_management_fa set state = #{state} where id = #{id} update by_management_fa set state = #{state} where id = #{id}
</update> </update>
<select id="getByXx" resultType="java.util.Map">
SELECT
*
FROM
by_management_gd
WHERE
is_deleted = 0
AND device_type_name = #{dev_type} AND LOCATE(#{dev_code}, equipment_code) > 0
</select>
<select id="getWxXx" resultType="java.util.Map">
SELECT
*
FROM
dev_gzbx_wxgd
WHERE
is_deleted = 0
AND dev_type = #{dev_type} AND dev_no = #{dev_code}
</select>
</mapper> </mapper>