add:working material

This commit is contained in:
zhangzhiqiang
2023-11-03 13:35:22 +08:00
parent 02367d3c06
commit 5e3a5586c6
7 changed files with 46 additions and 16 deletions

View File

@@ -7,6 +7,8 @@ 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.utils.SecurityUtils;
import org.nl.wms.device_manage.lubricate.service.DevicelubricatemstService;
import org.springframework.data.domain.Pageable;
@@ -34,11 +36,14 @@ public class DevicelubricatemstController {
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(devicelubricatemstService.queryAll(whereJson, page), HttpStatus.OK);
}
@GetMapping("/byuser")
@RequestMapping("/byuser")
@ApiOperation("润滑单维护查询")
public ResponseEntity<Object> querybyuser(@RequestParam Map whereJson, Pageable page) {
whereJson.put("update_optname", SecurityUtils.getCurrentNickName());
whereJson.put("invstatus", "03");
String currentNickName = SecurityUtils.getCurrentNickName();
if (!StringUtils.isEmpty(currentNickName) && !currentNickName.equals("管理员")){
whereJson.put("update_optname", currentNickName);
} whereJson.put("invstatus", "03");
return new ResponseEntity<>(devicelubricatemstService.queryAll(whereJson, page), HttpStatus.OK);
}
@@ -86,7 +91,7 @@ public class DevicelubricatemstController {
@PostMapping("/getDtl")
@ApiOperation("获取明细")
public ResponseEntity<Object> getDtl(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(devicelubricatemstService.getDtl(whereJson),HttpStatus.OK);
return new ResponseEntity<>(TableDataInfo.build(devicelubricatemstService.getDtl(whereJson)),HttpStatus.OK);
}
@PostMapping("/putIn")

View File

@@ -7,6 +7,8 @@ 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;
import org.nl.common.utils.SecurityUtils;
@@ -39,14 +41,18 @@ public class DevicerepairmstController {
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(devicerepairmstService.queryAll(whereJson, page), HttpStatus.OK);
}
@GetMapping("/byuser")
@RequestMapping("/byuser")
@ApiOperation("查询维修单维护")
public ResponseEntity<Object> querybyuser(@RequestParam Map whereJson, Pageable page) {
whereJson.put("update_optname", SecurityUtils.getCurrentNickName());
String currentNickName = SecurityUtils.getCurrentNickName();
if (!StringUtils.isEmpty(currentNickName) && !currentNickName.equals("管理员")){
whereJson.put("update_optname", currentNickName);
}
whereJson.put("invstatus", "03");
return new ResponseEntity<>(devicerepairmstService.queryAll(whereJson, page), HttpStatus.OK);
}
@GetMapping("/query")
@ApiOperation("查询维修单维护2")
public ResponseEntity<Object> query2(@RequestParam Map whereJson, Pageable page) {
@@ -108,7 +114,7 @@ public class DevicerepairmstController {
@ApiOperation("编辑时获取明细")
@PostMapping("/getDtl")
public ResponseEntity<Object> getDtl(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(devicerepairmstService.getDtl(whereJson),HttpStatus.OK);
return new ResponseEntity<>(TableDataInfo.build(devicerepairmstService.getDtl(whereJson)),HttpStatus.OK);
}
@ApiOperation("提交")

View File

@@ -13,6 +13,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.utils.MsgUtil;
import org.nl.common.utils.SecurityUtils;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
@@ -213,6 +214,7 @@ public class DevicerepairrequestServiceImpl implements DevicerepairrequestServic
WQLObject wo = WQLObject.getWQLObject("em_bi_devicerepairrequest");
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
wo.insert(json);
MsgUtil.sendMsg("lms报修提醒:报修人"+dto.getCreate_name()+",报修单"+dto.getRequest_code()+"故障描述"+dto.getFault_desc() ,MsgUtil.MsgSend.FS);
}
@Override

View File

@@ -7,6 +7,8 @@ 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.utils.SecurityUtils;
import org.nl.wms.device_manage.sportcheck.service.DevicesportcheckmstService;
import org.springframework.data.domain.Pageable;
@@ -35,11 +37,14 @@ public class DevicesportcheckmstController {
return new ResponseEntity<>(devicesportcheckmstService.queryAll(whereJson, page), HttpStatus.OK);
}
@GetMapping("/byuser")
@RequestMapping("/byuser")
@ApiOperation("查询人员点检单")
public ResponseEntity<Object> querybyuser(@RequestParam Map whereJson, Pageable page) {
whereJson.put("update_optname", SecurityUtils.getCurrentNickName());
whereJson.put("invstatus", "03");
String currentNickName = SecurityUtils.getCurrentNickName();
if (!StringUtils.isEmpty(currentNickName) && !currentNickName.equals("管理员")){
whereJson.put("update_optname", currentNickName);
} whereJson.put("invstatus", "03");
return new ResponseEntity<>(devicesportcheckmstService.queryAll(whereJson, page), HttpStatus.OK);
}
@@ -87,7 +92,7 @@ public class DevicesportcheckmstController {
@PostMapping("/getDtl")
@ApiOperation("获取明细")
public ResponseEntity<Object> getDtl(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(devicesportcheckmstService.getDtl(whereJson),HttpStatus.OK);
return new ResponseEntity<>(TableDataInfo.build(devicesportcheckmstService.getDtl(whereJson)),HttpStatus.OK);
}
@PostMapping("/putIn")

View File

@@ -7,6 +7,8 @@ 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.utils.SecurityUtils;
import org.nl.wms.device_manage.upkeep.service.DevicemaintenancemstService;
import org.springframework.data.domain.Pageable;
@@ -35,11 +37,14 @@ public class DevicemaintenancemstController {
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(devicemaintenancemstService.queryAll(whereJson, page), HttpStatus.OK);
}
@GetMapping("/byuser")
@RequestMapping("/byuser")
@ApiOperation("保养单维护查询")
public ResponseEntity<Object> querybyuser(@RequestParam Map whereJson, Pageable page) {
whereJson.put("update_optname", SecurityUtils.getCurrentNickName());
whereJson.put("invstatus", "03");
String currentNickName = SecurityUtils.getCurrentNickName();
if (!StringUtils.isEmpty(currentNickName) && !currentNickName.equals("管理员")){
whereJson.put("update_optname", currentNickName);
} whereJson.put("invstatus", "03");
return new ResponseEntity<>(devicemaintenancemstService.queryAll(whereJson, page), HttpStatus.OK);
}
@@ -87,7 +92,7 @@ public class DevicemaintenancemstController {
@PostMapping("/getDtl")
@ApiOperation("获取明细")
public ResponseEntity<Object> getDtl(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(devicemaintenancemstService.getDtl(whereJson),HttpStatus.OK);
return new ResponseEntity<>(TableDataInfo.build(devicemaintenancemstService.getDtl(whereJson)),HttpStatus.OK);
}
@PostMapping("/putIn")

View File

@@ -297,7 +297,9 @@ public class DevicemaintenanceplanmstServiceImpl implements Devicemaintenancepla
String deptIds = deptService.getChildIdStr(Long.parseLong(dept_id));
map.put("deptIds", deptIds);
}
if (!StrUtil.isEmpty(MapUtil.getStr(whereJson, "material_type_id"))) {
map.put("material_type_id", MapUtil.getStr(whereJson, "material_type_id"));
}
String use_id = MapUtil.getStr(whereJson, "use_id");
if (!StrUtil.isEmpty(use_id)) {
String useIds = deptService.getChildIdStr(Long.parseLong(use_id));

View File

@@ -21,6 +21,7 @@
输入.device_code TYPEAS s_string
输入.maintenancecycle TYPEAS s_string
输入.maint_plan_id TYPEAS s_string
输入.material_type_id TYPEAS s_string
输入.maint_plan_code TYPEAS s_string
输入.is_active TYPEAS s_string
输入.begin_time TYPEAS s_string
@@ -183,6 +184,10 @@
file.device_name like 输入.device_code)
ENDOPTION
OPTION 输入.material_type_id <> ""
file.material_type_id = 输入.material_type_id
ENDOPTION
OPTION 输入.deptIds <> ""
d1.dept_id in 输入.deptIds
ENDOPTION