代码更新
This commit is contained in:
@@ -66,6 +66,14 @@ public class DevicerepairmstController {
|
||||
return new ResponseEntity<>(devicerepairmstService.query4(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/query5")
|
||||
@Log("查询维修单维护5")
|
||||
@ApiOperation("查询维修单维护5")
|
||||
//@PreAuthorize("@el.check('devicerepairmst:list')")
|
||||
public ResponseEntity<Object> query5(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(devicerepairmstService.query5(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/queryBom")
|
||||
@Log("查询备件bom")
|
||||
@ApiOperation("查询备件bom")
|
||||
|
||||
@@ -202,4 +202,13 @@ public interface DevicerepairmstService {
|
||||
*/
|
||||
Map<String, Object> query4(Map whereJson, Pageable page);
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
*
|
||||
* @param whereJson 条件
|
||||
* @param page 分页参数
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> query5(Map whereJson, Pageable page);
|
||||
|
||||
}
|
||||
|
||||
@@ -994,4 +994,36 @@ public class DevicerepairmstServiceImpl implements DevicerepairmstService {
|
||||
return json;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> query5(Map whereJson, Pageable page) {
|
||||
String device_code = MapUtil.getStr(whereJson, "device_code");
|
||||
String repair_code = MapUtil.getStr(whereJson, "repair_code");
|
||||
String maintenancecycle = MapUtil.getStr(whereJson, "maintenancecycle");
|
||||
String invstatus = MapUtil.getStr(whereJson, "invstatus");
|
||||
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||
String material_type_id = MapUtil.getStr(whereJson, "material_type_id");
|
||||
String class_idStr = (String) whereJson.get("class_idStr");
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "9");
|
||||
map.put("maintenancecycle",maintenancecycle);
|
||||
map.put("invstatus",invstatus);
|
||||
map.put("begin_time",begin_time);
|
||||
map.put("end_time",end_time);
|
||||
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code","%"+device_code+"%");
|
||||
if (ObjectUtil.isNotEmpty(repair_code)) map.put("repair_code","%"+repair_code+"%");
|
||||
//处理物料当前节点的所有子节点
|
||||
if (!StrUtil.isEmpty(material_type_id)) {
|
||||
map.put("material_type_id", material_type_id);
|
||||
String classIds = classstandardService.getChildIdStr(material_type_id);
|
||||
map.put("classIds", classIds);
|
||||
} else if (ObjectUtil.isNotEmpty(class_idStr)) {
|
||||
String classIds = classstandardService.getAllChildIdStr(class_idStr);
|
||||
map.put("classIds", classIds);
|
||||
}
|
||||
JSONObject json = WQL.getWO("EM_BI_DEVICEREPAIR001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.input_time DESC");
|
||||
return json;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -372,6 +372,61 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "9"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
mst.*,
|
||||
class.class_name,
|
||||
file.device_code,
|
||||
file.device_name,
|
||||
file.extend_code,
|
||||
d1.name AS dept_name,
|
||||
d2.name AS use_name
|
||||
FROM
|
||||
EM_BI_DeviceRepairMst mst
|
||||
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
||||
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
||||
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
||||
LEFT JOIN sys_dept d2 ON file.use_groupid = d2.dept_id
|
||||
WHERE
|
||||
mst.is_delete = '0'
|
||||
AND file.is_delete = '0'
|
||||
AND mst.invstatus = '06'
|
||||
|
||||
OPTION 输入.device_code <> ""
|
||||
(file.device_code like 输入.device_code or
|
||||
file.device_name like 输入.device_code)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.repair_code <> ""
|
||||
(mst.repair_code like 输入.repair_code or
|
||||
mst.repair_code like 输入.repair_code)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.classIds <> ""
|
||||
class.class_id in 输入.classIds
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.invstatus <> ""
|
||||
mst.invstatus = 输入.invstatus
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.maintenancecycle <> ""
|
||||
mst.maintenancecycle = 输入.maintenancecycle
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
mst.plan_start_date >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.end_time <> ""
|
||||
mst.plan_start_date <= 输入.end_time
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -340,6 +340,7 @@
|
||||
WHEN '99' THEN '审核完毕'
|
||||
END
|
||||
)
|
||||
ELSE '报修'
|
||||
END
|
||||
) AS invstatus,
|
||||
mst.real_start_date,
|
||||
@@ -367,8 +368,6 @@
|
||||
WHERE
|
||||
st.is_delete = '0'
|
||||
AND (st.status <> '99')
|
||||
AND mst.source_bill_type = 'BXD'
|
||||
AND st.is_passed = '1'
|
||||
|
||||
UNION
|
||||
|
||||
|
||||
Reference in New Issue
Block a user