rev:工单报工
This commit is contained in:
@@ -1,15 +1,20 @@
|
|||||||
package org.nl.wms.product_manage.controller.device;
|
package org.nl.wms.product_manage.controller.device;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.TableDataInfo;
|
||||||
import org.nl.common.anno.Log;
|
import org.nl.common.anno.Log;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.wms.product_manage.service.device.IPdmBiDeviceService;
|
import org.nl.wms.product_manage.service.device.IPdmBiDeviceService;
|
||||||
import org.nl.wms.product_manage.service.device.dao.PdmBiDevice;
|
import org.nl.wms.product_manage.service.device.dao.PdmBiDevice;
|
||||||
|
import org.nl.wms.product_manage.service.device.dto.DeviceQuery;
|
||||||
import org.nl.wms.product_manage.备份pdm.service.DeviceService;
|
import org.nl.wms.product_manage.备份pdm.service.DeviceService;
|
||||||
import org.nl.wms.product_manage.备份pdm.service.dto.DeviceDto;
|
import org.nl.wms.product_manage.备份pdm.service.dto.DeviceDto;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -19,6 +24,7 @@ import org.springframework.http.ResponseEntity;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,9 +44,19 @@ public class PdmBiDeviceController {
|
|||||||
@GetMapping
|
@GetMapping
|
||||||
@Log("查询生产设备")
|
@Log("查询生产设备")
|
||||||
@ApiOperation("查询生产设备")
|
@ApiOperation("查询生产设备")
|
||||||
//@PreAuthorize("@el.check('device:list')")
|
@SaIgnore
|
||||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page){
|
public ResponseEntity<Object> query(DeviceQuery query, PageQuery page) {
|
||||||
return new ResponseEntity<>(deviceService.queryAll(whereJson,page),HttpStatus.OK);
|
Page<PdmBiDevice> result = iDeviceService.page(page.build(PdmBiDevice.class), query.build());
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(result), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/list")
|
||||||
|
@Log("查询生产设备列表")
|
||||||
|
@ApiOperation("查询生产设备列表")
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> queryList (@RequestBody DeviceQuery query){
|
||||||
|
List<Map<String, Object>> list = iDeviceService.listMaps(query.build().select("device_code", "device_name"));
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(list), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@@ -93,5 +109,5 @@ public class PdmBiDeviceController {
|
|||||||
public ResponseEntity<Object> getDeviceList () {
|
public ResponseEntity<Object> getDeviceList () {
|
||||||
return new ResponseEntity<>(deviceService.getDeviceList(), HttpStatus.OK);
|
return new ResponseEntity<>(deviceService.getDeviceList(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,8 @@ public class ProduceshiftorderController{
|
|||||||
if(null == param) {
|
if(null == param) {
|
||||||
throw new BizCoreException(ResultCode.VALIDATE_FAILED);
|
throw new BizCoreException(ResultCode.VALIDATE_FAILED);
|
||||||
}
|
}
|
||||||
return new ResponseEntity<>(produceshiftorderService.getOrderList(param, page), HttpStatus.OK);
|
List<Map> list = iPdmProduceWorkorderService.getOrderList(param, page);
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(list), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/getOrderList2")
|
@PostMapping("/getOrderList2")
|
||||||
@@ -134,6 +135,24 @@ public class ProduceshiftorderController{
|
|||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/deleteReport")
|
||||||
|
@Log("deleteReport")
|
||||||
|
@ApiOperation("deleteReport")
|
||||||
|
public ResponseEntity<Object> deleteReport(@RequestBody JSONObject param) {
|
||||||
|
iPdmProduceWorkorderService.removeById(param.getString("macoperate_id"));
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/updateReport")
|
||||||
|
@Log("报工数修改")
|
||||||
|
@ApiOperation("报工数修改")
|
||||||
|
public ResponseEntity<Object> updateReport(@RequestBody JSONObject param) {
|
||||||
|
iPdmProduceWorkorderService.updateReport(param);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/getUser")
|
@GetMapping("/getUser")
|
||||||
@Log("查询操作人员")
|
@Log("查询操作人员")
|
||||||
@ApiOperation("查询操作人员")
|
@ApiOperation("查询操作人员")
|
||||||
|
|||||||
@@ -124,3 +124,4 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,9 @@
|
|||||||
<if test="query.workorder_code != null and query.workorder_code != ''">
|
<if test="query.workorder_code != null and query.workorder_code != ''">
|
||||||
and wr.workorder_code = #{query.workorder_code}
|
and wr.workorder_code = #{query.workorder_code}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="query.workorder_id != null and query.workorder_id != ''">
|
||||||
|
and wr.workorder_id = #{query.workorder_id}
|
||||||
|
</if>
|
||||||
<if test="query.start_time != null and query.start_time != ''">
|
<if test="query.start_time != null and query.start_time != ''">
|
||||||
and wr.realproducestart_date >= #{query.start_time}
|
and wr.realproducestart_date >= #{query.start_time}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.nl.wms.scheduler_manage.service.cacheline.dao.mapper.SchCachelineVehicleMapper">
|
<mapper namespace="org.nl.wms.scheduler_manage.service.cacheline.dao.mapper.SchCachelineVehicleMapper">
|
||||||
|
|
||||||
<select id="getCachelineVehicle"
|
<select id="getCachelineVehicle"
|
||||||
@@ -14,3 +16,4 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user