rev:设备管理页面维护
This commit is contained in:
@@ -35,6 +35,8 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Liuxy
|
||||
@@ -321,14 +323,18 @@ public class DevicerepairrequestServiceImpl implements DevicerepairrequestServic
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
|
||||
WQLObject requestTab = WQLObject.getWQLObject("EM_BI_DeviceRepairRequest"); // 设备报修单
|
||||
WQLObject repaiMstTab = WQLObject.getWQLObject("EM_BI_DeviceRepairMst");
|
||||
|
||||
JSONArray rows = whereJson.getJSONArray("rows");
|
||||
|
||||
for(int i=0;i<rows.size();i++){
|
||||
JSONObject jo =rows.getJSONObject(i);
|
||||
String status = jo.getString("status");
|
||||
if(!"01".equals(status)){
|
||||
continue;
|
||||
// if(!"01".equals(status)){
|
||||
// continue;
|
||||
// }
|
||||
JSONArray reqMst = repaiMstTab.query("is_delete = '0' and source_bill_code = '" + jo.getString("request_code") + "'").getResultJSONArray(0);
|
||||
if (reqMst!=null && reqMst.size()>0){
|
||||
throw new BadRequestException("报修单已经有生成的维修单不允许直接修改:"+reqMst.getJSONObject(0).getString("repair_code"));
|
||||
}
|
||||
JSONObject jsonRequest = requestTab.query("request_id = '" + jo.getString("request_id") + "'").uniqueResult(0);
|
||||
jsonRequest.put("is_passed", "0");
|
||||
|
||||
@@ -10,6 +10,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.utils.RedissonUtils;
|
||||
@@ -126,7 +127,11 @@ public class ClassstandardController {
|
||||
public ResponseEntity<Object> getSuperior2(@RequestBody String param) {
|
||||
JSONArray arr = JSONArray.parseArray(param);
|
||||
JSONObject parse = arr.getJSONObject(0);
|
||||
JSONObject jo = WQLObject.getWQLObject("MD_PB_ClassStandard").query("class_id = '" + parse.getString("id") + "'").uniqueResult(0);
|
||||
String id = parse.getString("id");
|
||||
if (StringUtils.isEmpty(id)){
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
JSONObject jo = WQLObject.getWQLObject("MD_PB_ClassStandard").query("class_id = '" + id + "'").uniqueResult(0);
|
||||
JSONArray maters = ClassstandardService.getSuperiorLimit(jo, new JSONArray(),parse.getString("parent_id"));
|
||||
return new ResponseEntity<>(ClassstandardService.buildTree(maters), HttpStatus.OK);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user