diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/rest/DcBaseDeviceController.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/rest/DcBaseDeviceController.java deleted file mode 100644 index 87a3090..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/rest/DcBaseDeviceController.java +++ /dev/null @@ -1,78 +0,0 @@ - -package org.nl.wms.dc.rest; - - -import com.alibaba.fastjson.JSONObject; -import org.nl.wms.dc.service.DcBaseDeviceService; -import org.nl.wms.dc.service.dto.DcBaseDeviceDto; -import org.springframework.data.domain.Pageable; -import lombok.RequiredArgsConstructor; -import org.nl.annotation.Log; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import io.swagger.annotations.*; -import java.io.IOException; -import javax.servlet.http.HttpServletResponse; -import java.util.Map; -import lombok.extern.slf4j.Slf4j; - -/** -* @author geng by -* @date 2022-05-17 -**/ -@RestController -@RequiredArgsConstructor -@Api(tags = "采集设备管理") -@RequestMapping("/api/dcBaseDevice") -@Slf4j -public class DcBaseDeviceController { - - private final DcBaseDeviceService dcBaseDeviceService; - - @GetMapping - @Log("查询采集设备") - @ApiOperation("查询采集设备") - //@PreAuthorize("@el.check('dcBaseDevice:list')") - public ResponseEntity query(@RequestParam Map whereJson, Pageable page){ - return new ResponseEntity<>(dcBaseDeviceService.queryAll(whereJson,page),HttpStatus.OK); - } - - @PostMapping - @Log("新增采集设备") - @ApiOperation("新增采集设备") - //@PreAuthorize("@el.check('dcBaseDevice:add')") - public ResponseEntity create(@Validated @RequestBody DcBaseDeviceDto dto){ - dcBaseDeviceService.create(dto); - return new ResponseEntity<>(HttpStatus.CREATED); - } - - @PutMapping - @Log("修改采集设备") - @ApiOperation("修改采集设备") - //@PreAuthorize("@el.check('dcBaseDevice:edit')") - public ResponseEntity update(@Validated @RequestBody DcBaseDeviceDto dto){ - dcBaseDeviceService.update(dto); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - - @Log("删除采集设备") - @ApiOperation("删除采集设备") - //@PreAuthorize("@el.check('dcBaseDevice:del')") - @DeleteMapping - public ResponseEntity delete(@RequestBody Long[] ids) { - dcBaseDeviceService.deleteAll(ids); - return new ResponseEntity<>(HttpStatus.OK); - } - - @PostMapping("/getItemByDeviceTypeId") - @Log("动态获取表格列") - @ApiOperation("动态获取表格列") - //@PreAuthorize("@el.check('dcBaseDevice:list')") - public ResponseEntity getItemByDeviceTypeId(@RequestBody JSONObject param){ - return new ResponseEntity<>(dcBaseDeviceService.getItemByDeviceTypeId(param),HttpStatus.OK); - } - -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/rest/DevicetypeController.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/rest/DevicetypeController.java deleted file mode 100644 index 4d0e35b..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/rest/DevicetypeController.java +++ /dev/null @@ -1,87 +0,0 @@ - -package org.nl.wms.dc.rest; - - -import com.alibaba.fastjson.JSONObject; -import org.nl.wms.dc.service.DevicetypeService; -import org.nl.wms.dc.service.dto.DevicetypeDto; -import org.springframework.data.domain.Pageable; -import lombok.RequiredArgsConstructor; -import org.nl.annotation.Log; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import io.swagger.annotations.*; -import java.io.IOException; -import javax.servlet.http.HttpServletResponse; -import java.util.Map; -import lombok.extern.slf4j.Slf4j; - -/** -* @author geng by -* @date 2022-05-17 -**/ -@RestController -@RequiredArgsConstructor -@Api(tags = "设备类型管理") -@RequestMapping("/api/devicetype") -@Slf4j -public class DevicetypeController { - - private final DevicetypeService devicetypeService; - - @GetMapping - @Log("查询设备类型") - @ApiOperation("查询设备类型") - //@PreAuthorize("@el.check('devicetype:list')") - public ResponseEntity query(@RequestParam Map whereJson, Pageable page){ - return new ResponseEntity<>(devicetypeService.queryAll(whereJson,page),HttpStatus.OK); - } - - @PostMapping - @Log("新增设备类型") - @ApiOperation("新增设备类型") - //@PreAuthorize("@el.check('devicetype:add')") - public ResponseEntity create(@Validated @RequestBody DevicetypeDto dto){ - devicetypeService.create(dto); - return new ResponseEntity<>(HttpStatus.CREATED); - } - - @PutMapping - @Log("修改设备类型") - @ApiOperation("修改设备类型") - //@PreAuthorize("@el.check('devicetype:edit')") - public ResponseEntity update(@Validated @RequestBody DevicetypeDto dto){ - devicetypeService.update(dto); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - - @Log("删除设备类型") - @ApiOperation("删除设备类型") - //@PreAuthorize("@el.check('devicetype:del')") - @DeleteMapping - public ResponseEntity delete(@RequestBody Long[] ids) { - devicetypeService.deleteAll(ids); - return new ResponseEntity<>(HttpStatus.OK); - } - - @GetMapping("/getWorksection") - @Log("查询所属工段") - @ApiOperation("查询所属工段") - //@PreAuthorize("@el.check('devicetype:list')") - public ResponseEntity getWorksection(){ - return new ResponseEntity<>(devicetypeService.getWorksection(),HttpStatus.OK); - } - - @PutMapping("/changeActive") - @Log("修改启用禁用状态") - @ApiOperation("修改启用禁用状态") - //@PreAuthorize("@el.check('store:edit')") - public ResponseEntity changeActive(@RequestBody JSONObject json) { - devicetypeService.changeActive(json); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/rest/ItemController.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/rest/ItemController.java deleted file mode 100644 index 4684d48..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/rest/ItemController.java +++ /dev/null @@ -1,104 +0,0 @@ - -package org.nl.wms.dc.rest; - - -import com.alibaba.fastjson.JSONObject; -import org.nl.wms.dc.service.ItemService; -import org.nl.wms.dc.service.dto.ItemDto; -import org.springframework.data.domain.Pageable; -import lombok.RequiredArgsConstructor; -import org.nl.annotation.Log; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import io.swagger.annotations.*; -import java.io.IOException; -import javax.servlet.http.HttpServletResponse; -import java.util.Map; -import lombok.extern.slf4j.Slf4j; - -/** -* @author geng by -* @date 2022-05-17 -**/ -@RestController -@RequiredArgsConstructor -@Api(tags = "采集项管理管理") -@RequestMapping("/api/item") -@Slf4j -public class ItemController { - - private final ItemService itemService; - - @GetMapping - @Log("查询采集项管理") - @ApiOperation("查询采集项管理") - //@PreAuthorize("@el.check('item:list')") - public ResponseEntity query(@RequestParam Map whereJson, Pageable page){ - return new ResponseEntity<>(itemService.queryAll(whereJson,page),HttpStatus.OK); - } - - @PostMapping - @Log("新增采集项管理") - @ApiOperation("新增采集项管理") - //@PreAuthorize("@el.check('item:add')") - public ResponseEntity create(@RequestBody JSONObject param){ - itemService.create(param); - return new ResponseEntity<>(HttpStatus.CREATED); - } - - @PutMapping - @Log("修改采集项管理") - @ApiOperation("修改采集项管理") - //@PreAuthorize("@el.check('item:edit')") - public ResponseEntity update(@RequestBody JSONObject param){ - itemService.update(param); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - - @Log("删除采集项管理") - @ApiOperation("删除采集项管理") - //@PreAuthorize("@el.check('item:del')") - @DeleteMapping - public ResponseEntity delete(@RequestBody Long[] ids) { - itemService.deleteAll(ids); - return new ResponseEntity<>(HttpStatus.OK); - } - - @PostMapping("/getDeviceTypeBySection") - @Log("根据工段查询设备类型") - @ApiOperation("根据工段查询设备类型") - //@PreAuthorize("@el.check('item:add')") - public ResponseEntity getDeviceTypeBySection(@RequestBody JSONObject param){ - return new ResponseEntity<>(itemService.getDeviceTypeBySection(param),HttpStatus.OK); - } - - @PostMapping("/getDtlByDevicetypeId") - @Log("根据设备类型id查询项点") - @ApiOperation("根据设备类型id查询项点") - //@PreAuthorize("@el.check('item:add')") - public ResponseEntity getDtlByDevicetypeId(@RequestBody JSONObject param){ - return new ResponseEntity<>(itemService.getDtlByDevicetypeId(param),HttpStatus.OK); - } - - @PostMapping("/saveItem") - @Log("根据设备类型id查询项点") - @ApiOperation("根据设备类型id查询项点") - //@PreAuthorize("@el.check('item:add')") - public ResponseEntity saveItem(@RequestBody JSONObject param){ - itemService.saveItem(param); - return new ResponseEntity<>(HttpStatus.OK); - } - - @PutMapping("/changeActive") - @Log("修改启用禁用状态") - @ApiOperation("修改启用禁用状态") - //@PreAuthorize("@el.check('store:edit')") - public ResponseEntity changeActive(@RequestBody JSONObject json) { - itemService.changeActive(json); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/rest/WorksectionController.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/rest/WorksectionController.java deleted file mode 100644 index ef316f3..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/rest/WorksectionController.java +++ /dev/null @@ -1,79 +0,0 @@ - -package org.nl.wms.dc.rest; - - -import com.alibaba.fastjson.JSONObject; -import org.nl.wms.dc.service.WorksectionService; -import org.nl.wms.dc.service.dto.WorksectionDto; -import org.springframework.data.domain.Pageable; -import lombok.RequiredArgsConstructor; -import org.nl.annotation.Log; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import io.swagger.annotations.*; -import java.io.IOException; -import javax.servlet.http.HttpServletResponse; -import java.util.Map; -import lombok.extern.slf4j.Slf4j; - -/** -* @author geng by -* @date 2022-05-17 -**/ -@RestController -@RequiredArgsConstructor -@Api(tags = "工段基本信息管理") -@RequestMapping("/api/worksection") -@Slf4j -public class WorksectionController { - - private final WorksectionService worksectionService; - - @GetMapping - @Log("查询工段基本信息") - @ApiOperation("查询工段基本信息") - //@PreAuthorize("@el.check('worksection:list')") - public ResponseEntity query(@RequestParam Map whereJson, Pageable page){ - return new ResponseEntity<>(worksectionService.queryAll(whereJson,page),HttpStatus.OK); - } - - @PostMapping - @Log("新增工段基本信息") - @ApiOperation("新增工段基本信息") - //@PreAuthorize("@el.check('worksection:add')") - public ResponseEntity create(@Validated @RequestBody WorksectionDto dto){ - worksectionService.create(dto); - return new ResponseEntity<>(HttpStatus.CREATED); - } - - @PutMapping - @Log("修改工段基本信息") - @ApiOperation("修改工段基本信息") - //@PreAuthorize("@el.check('worksection:edit')") - public ResponseEntity update(@Validated @RequestBody WorksectionDto dto){ - worksectionService.update(dto); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - - @Log("删除工段基本信息") - @ApiOperation("删除工段基本信息") - //@PreAuthorize("@el.check('worksection:del')") - @DeleteMapping - public ResponseEntity delete(@RequestBody Long[] ids) { - worksectionService.deleteAll(ids); - return new ResponseEntity<>(HttpStatus.OK); - } - - @PutMapping("/changeActive") - @Log("修改启用禁用状态") - @ApiOperation("修改启用禁用状态") - //@PreAuthorize("@el.check('store:edit')") - public ResponseEntity changeActive(@RequestBody JSONObject json) { - worksectionService.changeActive(json); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/DcBaseDeviceService.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/DcBaseDeviceService.java deleted file mode 100644 index 3f24af6..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/DcBaseDeviceService.java +++ /dev/null @@ -1,74 +0,0 @@ - -package org.nl.wms.dc.service; - -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import org.nl.wms.dc.service.dto.DcBaseDeviceDto; -import org.springframework.data.domain.Pageable; -import java.util.Map; -import java.util.List; -import java.io.IOException; -import javax.servlet.http.HttpServletResponse; - -/** -* @description 服务接口 -* @author geng by -* @date 2022-05-17 -**/ -public interface DcBaseDeviceService { - - /** - * 查询数据分页 - * @param whereJson 条件 - * @param page 分页参数 - * @return Map - */ - Map queryAll(Map whereJson, Pageable page); - - /** - * 查询所有数据不分页 - * @param whereJson 条件参数 - * @return List - */ - List queryAll(Map whereJson); - - /** - * 根据ID查询 - * @param device_id ID - * @return DcBaseDevice - */ - DcBaseDeviceDto findById(Long device_id); - - /** - * 根据编码查询 - * @param code code - * @return DcBaseDevice - */ - DcBaseDeviceDto findByCode(String code); - - - /** - * 创建 - * @param dto / - */ - void create(DcBaseDeviceDto dto); - - /** - * 编辑 - * @param dto / - */ - void update(DcBaseDeviceDto dto); - - /** - * 多选删除 - * @param ids / - */ - void deleteAll(Long[] ids); - - /** - * 查询设备类型 - * @param param - * @return - */ - Map getItemByDeviceTypeId(JSONObject param); -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/DevicetypeService.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/DevicetypeService.java deleted file mode 100644 index 746962d..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/DevicetypeService.java +++ /dev/null @@ -1,79 +0,0 @@ - -package org.nl.wms.dc.service; - -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import org.nl.wms.dc.service.dto.DevicetypeDto; -import org.springframework.data.domain.Pageable; -import java.util.Map; -import java.util.List; -import java.io.IOException; -import javax.servlet.http.HttpServletResponse; - -/** -* @description 服务接口 -* @author geng by -* @date 2022-05-17 -**/ -public interface DevicetypeService { - - /** - * 查询数据分页 - * @param whereJson 条件 - * @param page 分页参数 - * @return Map - */ - Map queryAll(Map whereJson, Pageable page); - - /** - * 查询所有数据不分页 - * @param whereJson 条件参数 - * @return List - */ - List queryAll(Map whereJson); - - /** - * 根据ID查询 - * @param section_id ID - * @return Devicetype - */ - DevicetypeDto findById(Long section_id); - - /** - * 根据编码查询 - * @param code code - * @return Devicetype - */ - DevicetypeDto findByCode(String code); - - - /** - * 创建 - * @param dto / - */ - void create(DevicetypeDto dto); - - /** - * 编辑 - * @param dto / - */ - void update(DevicetypeDto dto); - - /** - * 多选删除 - * @param ids / - */ - void deleteAll(Long[] ids); - - /** - * 获取所属工段 - * @return - */ - JSONArray getWorksection(); - - /** - * 改变启用状态 - * @param json - */ - void changeActive(JSONObject json); -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/ItemService.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/ItemService.java deleted file mode 100644 index 682b26f..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/ItemService.java +++ /dev/null @@ -1,89 +0,0 @@ - -package org.nl.wms.dc.service; - -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import org.nl.wms.dc.service.dto.ItemDto; -import org.springframework.data.domain.Pageable; -import java.util.Map; -import java.util.List; -import java.io.IOException; -import javax.servlet.http.HttpServletResponse; - -/** -* @description 服务接口 -* @author geng by -* @date 2022-05-17 -**/ -public interface ItemService { - - /** - * 查询数据分页 - * @param whereJson 条件 - * @param page 分页参数 - * @return Map - */ - Map queryAll(Map whereJson, Pageable page); - - /** - * 查询所有数据不分页 - * @param whereJson 条件参数 - * @return List - */ - List queryAll(Map whereJson); - - /** - * 根据ID查询 - * @param iteml_id ID - * @return Item - */ - ItemDto findById(Long iteml_id); - - /** - * 根据编码查询 - * @param code code - * @return Item - */ - ItemDto findByCode(String code); - - - /** - * 创建 - * @param param / - */ - void create(JSONObject param); - - /** - * 编辑 - * @param param / - */ - void update(JSONObject param); - - /** - * 多选删除 - * @param ids / - */ - void deleteAll(Long[] ids); - - /** - * 根据工段查询设备类型 - * @param param - * @return - */ - JSONArray getDeviceTypeBySection(JSONObject param); - - /** - * 根据设备类型id查询项点 - * @param param - * @return - */ - JSONArray getDtlByDevicetypeId(JSONObject param); - - void saveItem(JSONObject param); - - /** - * 改变启用状态 - * @param json - */ - void changeActive(JSONObject json); -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/WorksectionService.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/WorksectionService.java deleted file mode 100644 index 6f1d3c1..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/WorksectionService.java +++ /dev/null @@ -1,73 +0,0 @@ - -package org.nl.wms.dc.service; - -import com.alibaba.fastjson.JSONObject; -import org.nl.wms.dc.service.dto.WorksectionDto; -import org.springframework.data.domain.Pageable; -import java.util.Map; -import java.util.List; -import java.io.IOException; -import javax.servlet.http.HttpServletResponse; - -/** -* @description 服务接口 -* @author geng by -* @date 2022-05-17 -**/ -public interface WorksectionService { - - /** - * 查询数据分页 - * @param whereJson 条件 - * @param page 分页参数 - * @return Map - */ - Map queryAll(Map whereJson, Pageable page); - - /** - * 查询所有数据不分页 - * @param whereJson 条件参数 - * @return List - */ - List queryAll(Map whereJson); - - /** - * 根据ID查询 - * @param worksection_id ID - * @return Worksection - */ - WorksectionDto findById(Long worksection_id); - - /** - * 根据编码查询 - * @param code code - * @return Worksection - */ - WorksectionDto findByCode(String code); - - - /** - * 创建 - * @param dto / - */ - void create(WorksectionDto dto); - - /** - * 编辑 - * @param dto / - */ - void update(WorksectionDto dto); - - /** - * 多选删除 - * @param ids / - */ - void deleteAll(Long[] ids); - - /** - * 改变启用状态 - * @param json - */ - void changeActive(JSONObject json); - -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/dto/DcBaseDeviceDto.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/dto/DcBaseDeviceDto.java deleted file mode 100644 index a0b602d..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/dto/DcBaseDeviceDto.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.nl.wms.dc.service.dto; - -import lombok.Data; -import java.io.Serializable; - import com.fasterxml.jackson.databind.annotation.JsonSerialize; - import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; - -/** -* @description / -* @author geng by -* @date 2022-05-17 -**/ -@Data -public class DcBaseDeviceDto implements Serializable { - - /** 设备标识 */ - /** 防止精度丢失 */ - @JsonSerialize(using= ToStringSerializer.class) - private Long device_id; - - /** 设备编码 */ - private String device_code; - - /** 设备名称 */ - private String device_name; - - /** 是否启用 */ - private String is_used; - - /** 备注 */ - private String remark; - - /** 创建人 */ - private Long create_id; - - /** 创建人姓名 */ - private String create_name; - - /** 创建时间 */ - private String create_time; - - /** 修改人 */ - private Long update_optid; - - /** 修改人姓名 */ - private String update_optname; - - /** 修改时间 */ - private String update_time; - - /** 是否删除 */ - private String is_delete; - - /** 数据采集设备类型 */ - private String devicetype_id; -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/dto/DevicetypeDto.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/dto/DevicetypeDto.java deleted file mode 100644 index a444fd0..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/dto/DevicetypeDto.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.nl.wms.dc.service.dto; - -import lombok.Data; -import java.io.Serializable; - import com.fasterxml.jackson.databind.annotation.JsonSerialize; - import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; - -/** -* @description / -* @author geng by -* @date 2022-05-17 -**/ -@Data -public class DevicetypeDto implements Serializable { - - /** 设备类型标识 */ - /** 防止精度丢失 */ - @JsonSerialize(using= ToStringSerializer.class) - private Long devicetype_id; - - /** 设备类型编码 */ - private String devicetype_code; - - /** 设备类型名称 */ - private String devicetype_name; - - /** 工段标识 */ - /** 防止精度丢失 */ - @JsonSerialize(using= ToStringSerializer.class) - private Long section_id; - - /** 创建人 */ - private Long create_id; - - /** 创建人 */ - private String create_name; - - /** 创建时间 */ - private String create_time; - - /** 修改人 */ - private Long update_optid; - - /** 修改人 */ - private String update_optname; - - /** 修改时间 */ - private String update_time; - - /** 是否启用 */ - private String is_used; - - /** 是否删除 */ - private String is_delete; -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/dto/ItemDto.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/dto/ItemDto.java deleted file mode 100644 index 6dc923a..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/dto/ItemDto.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.nl.wms.dc.service.dto; - -import lombok.Data; - -import java.math.BigDecimal; -import java.io.Serializable; - -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; - -/** - * @author geng by - * @description / - * @date 2022-05-17 - **/ -@Data -public class ItemDto implements Serializable { - - /** 项点标识 */ - /** - * 防止精度丢失 - */ - @JsonSerialize(using = ToStringSerializer.class) - private Long iteml_id; - - /** - * 项点编码 - */ - private String item_code; - - /** - * 项点名称 - */ - private String item_name; - - /** - * 默认值 - */ - private String default_value; - - /** - * 明细序号 - */ - private BigDecimal seq_no; - - /** - * 备注 - */ - private String remark; - - /** - * 创建人 - */ - private Long create_id; - - /** - * 创建人 - */ - private String create_name; - - /** - * 创建时间 - */ - private String create_time; - - /** - * 修改人 - */ - private Long update_optid; - - /** - * 修改人 - */ - private String update_optname; - - /** - * 修改时间 - */ - private String update_time; - - /** - * 是否启用 - */ - private String is_used; - - /** - * 是否删除 - */ - private String is_delete; - - /** - * 数据采集设备类型 - */ - private String devicetype_id; - - /** - * acs项点编码 - */ - private String acs_item_code; -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/dto/WorksectionDto.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/dto/WorksectionDto.java deleted file mode 100644 index 4a2c0b8..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/dto/WorksectionDto.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.nl.wms.dc.service.dto; - -import lombok.Data; -import java.io.Serializable; - import com.fasterxml.jackson.databind.annotation.JsonSerialize; - import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; - -/** -* @description / -* @author geng by -* @date 2022-05-17 -**/ -@Data -public class WorksectionDto implements Serializable { - - /** 工段标识 */ - /** 防止精度丢失 */ - @JsonSerialize(using= ToStringSerializer.class) - private Long worksection_id; - - /** 工段编码 */ - private String worksection_code; - - /** 工段名称 */ - private String worksection_name; - - /** 创建人 */ - private Long create_id; - - /** 创建人 */ - private String create_name; - - /** 创建时间 */ - private String create_time; - - /** 修改人 */ - private Long update_optid; - - /** 修改人 */ - private String update_optname; - - /** 修改时间 */ - private String update_time; - - /** 是否启用 */ - private String is_used; - - /** 是否删除 */ - private String is_delete; -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/impl/DcBaseDeviceServiceImpl.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/impl/DcBaseDeviceServiceImpl.java deleted file mode 100644 index 34785a0..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/impl/DcBaseDeviceServiceImpl.java +++ /dev/null @@ -1,220 +0,0 @@ - -package org.nl.wms.dc.service.impl; - - -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.StrUtil; -import com.alibaba.fastjson.JSON; -import lombok.RequiredArgsConstructor; -import org.nl.exception.BadRequestException; -import org.nl.wms.dc.service.DcBaseDeviceService; -import org.nl.wms.dc.service.dto.DcBaseDeviceDto; -import org.nl.wql.WQL; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import org.springframework.data.domain.Pageable; - -import java.util.List; -import java.util.Map; - -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.util.IdUtil; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import org.nl.utils.SecurityUtils; -import org.nl.wql.core.bean.ResultBean; -import org.nl.wql.core.bean.WQLObject; -import org.nl.wql.util.WqlUtil; -import lombok.extern.slf4j.Slf4j; -import cn.hutool.core.util.ObjectUtil; - -/** - * @author geng by - * @description 服务实现 - * @date 2022-05-17 - **/ -@Service -@RequiredArgsConstructor -@Slf4j -public class DcBaseDeviceServiceImpl implements DcBaseDeviceService { - - @Override - public Map queryAll(Map whereJson, Pageable page) { - String devicetype_id = MapUtil.getStr(whereJson, "devicetype_id"); - String search = MapUtil.getStr(whereJson, "search"); - JSONObject map2 = new JSONObject(); - map2.put("flag", "2"); - map2.put("devicetype_id", devicetype_id); - if (!StrUtil.isEmpty(search)) { - map2.put("search", "%" + search + "%"); - } - //根据设备类型获取设备信息 - JSONObject json = WQL.getWO("DC_DEVICE_01").addParamMap(map2).pageQuery(WqlUtil.getHttpContext(page), "device.update_time desc"); - JSONArray jsonArray = json.getJSONArray("content"); - JSONArray newContent = new JSONArray(); - for (int i = 0; i < jsonArray.size(); i++) { - JSONObject jsonObject = jsonArray.getJSONObject(i); - JSONObject map = new JSONObject(); - String device_id = jsonObject.getString("device_id"); - map.put("flag", "1"); - map.put("device_id", device_id); - //获取设备所拥有的项点信息 - JSONArray itemArray = WQL.getWO("DC_DEVICE_01").addParamMap(map).process().getResultJSONArray(0); - JSONObject newMap = new JSONObject(); - newMap.put("device_id", jsonObject.getString("device_id")); - newMap.put("device_code", jsonObject.getString("device_code")); - newMap.put("device_name", jsonObject.getString("device_name")); - newMap.put("devicetype_id", jsonObject.getString("devicetype_id")); - newMap.put("devicetype_name", jsonObject.getString("devicetype_name")); - newMap.put("worksection_name", jsonObject.getString("worksection_name")); - newMap.put("section_id", jsonObject.getString("section_id")); - //循环每个设备的项点信息,将项点所对应的键设为项点编码,对应动态表格的prop - for (int j = 0; j < itemArray.size(); j++) { - JSONObject itemObject = itemArray.getJSONObject(j); - newMap.put(itemObject.getString("item_code"), itemObject.getString("item_value")); - } - newContent.add(newMap); - } - json.put("content", newContent); - return json; - } - - @Override - public List queryAll(Map whereJson) { - WQLObject wo = WQLObject.getWQLObject("dc_base_device"); - JSONArray arr = wo.query().getResultJSONArray(0); - if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(DcBaseDeviceDto.class); - return null; - } - - @Override - public DcBaseDeviceDto findById(Long device_id) { - WQLObject wo = WQLObject.getWQLObject("dc_base_device"); - JSONObject json = wo.query("device_id = '" + device_id + "'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(json)) { - return json.toJavaObject(DcBaseDeviceDto.class); - } - return null; - } - - @Override - public DcBaseDeviceDto findByCode(String code) { - WQLObject wo = WQLObject.getWQLObject("dc_base_device"); - JSONObject json = wo.query("is_delete = '0' and device_code ='" + code + "'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(json)) { - return json.toJavaObject(DcBaseDeviceDto.class); - } - return null; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void create(DcBaseDeviceDto dto) { - - //编码唯一性校验 - String device_code = dto.getDevice_code(); - DcBaseDeviceDto byCode = this.findByCode(device_code); - if (ObjectUtil.isNotEmpty(byCode)) throw new BadRequestException("编码已存在!"); - - Long currentUserId = SecurityUtils.getCurrentUserId(); - String nickName = SecurityUtils.getNickName(); - String now = DateUtil.now(); - WQLObject wo_deviceItem = WQLObject.getWQLObject("dc_base_deviceItem"); - WQLObject wo_device = WQLObject.getWQLObject("dc_base_device"); - WQLObject wo_item = WQLObject.getWQLObject("dc_base_item"); - long device_id = IdUtil.getSnowflake(1, 1).nextId(); - dto.setDevice_id(device_id); - dto.setCreate_id(currentUserId); - dto.setCreate_name(nickName); - dto.setUpdate_optid(currentUserId); - dto.setUpdate_optname(nickName); - dto.setUpdate_time(now); - dto.setCreate_time(now); - JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); - //先向设备表中添加数据,再向中间表添加具体信息 - wo_device.insert(json); - JSONArray jsonArray = wo_item.query("is_delete = '0' and devicetype_id = '" + dto.getDevicetype_id() + "'").getResultJSONArray(0); - for (int i = 0; i < jsonArray.size(); i++) { - JSONObject jsonObject = jsonArray.getJSONObject(i); - JSONObject map = new JSONObject(); - map.put("deviceitem_id",IdUtil.getSnowflake(1, 1).nextId()); - map.put("iteml_id", jsonObject.getString("iteml_id")); - map.put("device_id", device_id); - wo_deviceItem.insert(map); - } - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(DcBaseDeviceDto dto) { - Long currentUserId = SecurityUtils.getCurrentUserId(); - String nickName = SecurityUtils.getNickName(); - String now = DateUtil.now(); - DcBaseDeviceDto entity = this.findById(dto.getDevice_id()); - if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!"); - - //编码唯一性校验 - WQLObject wo = WQLObject.getWQLObject("dc_base_device"); - String where = "is_delete = '0' and device_code = '" + dto.getDevice_code() + "' and device_id != '" + dto.getDevice_id() + "'"; - JSONObject jsonObject = wo.query(where).uniqueResult(0); - if (ObjectUtil.isNotEmpty(jsonObject)) { - throw new BadRequestException("编码已存在!"); - } - dto.setUpdate_time(now); - dto.setUpdate_optid(currentUserId); - dto.setUpdate_optname(nickName); - JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); - wo.update(json); - //先修改设备表信息,然后删除中间表中设备项点对应关系,再向中间表插入新的对应关系 - WQLObject wo_deviceItem = WQLObject.getWQLObject("dc_base_deviceItem"); - wo_deviceItem.delete("device_id = '" + dto.getDevice_id() + "'"); - WQLObject wo_item = WQLObject.getWQLObject("dc_base_item"); - JSONArray jsonArray = wo_item.query("is_delete = '0' and devicetype_id = '" + dto.getDevicetype_id() + "'").getResultJSONArray(0); - for (int i = 0; i < jsonArray.size(); i++) { - JSONObject jsonObject1 = jsonArray.getJSONObject(i); - JSONObject map = new JSONObject(); - map.put("deviceitem_id",IdUtil.getSnowflake(1, 1).nextId()); - map.put("iteml_id", jsonObject1.getString("iteml_id")); - map.put("device_id", dto.getDevice_id()); - wo_deviceItem.insert(map); - } - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void deleteAll(Long[] ids) { - WQLObject wo = WQLObject.getWQLObject("dc_base_device"); - WQLObject wo_deviceItem = WQLObject.getWQLObject("dc_base_deviceItem"); - for (Long device_id : ids) { - wo.delete("device_id = '" + device_id + "'"); - wo_deviceItem.delete("device_id = '" + device_id + "'"); - } - } - - @Override - public Map getItemByDeviceTypeId(JSONObject param) { - //动态获取设备类型下对应的项点信息 - String devicetype_id = param.getString("devicetype_id"); - WQLObject wo = WQLObject.getWQLObject("dc_base_item"); - JSONArray jsonArray = wo.query("is_delete = '0' and devicetype_id = '" + devicetype_id + "'", "seq_no").getResultJSONArray(0); - JSONArray newArray = new JSONArray(); - for (int i = 0; i < jsonArray.size(); i++) { - JSONObject jsonObject = jsonArray.getJSONObject(i); - String item_name = jsonObject.getString("item_name"); - JSONObject json = new JSONObject(); - json.put("label", item_name); - //将表格prop设置为项点编码 - json.put("prop", jsonObject.getString("item_code")); - json.put("show", true); - if (item_name.length() >= 6) { - json.put("width", "150"); - } - newArray.add(json); - } - JSONObject resultMap = new JSONObject(); - resultMap.put("newArray", newArray); - return resultMap; - } - -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/impl/DevicetypeServiceImpl.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/impl/DevicetypeServiceImpl.java deleted file mode 100644 index 0f334c8..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/impl/DevicetypeServiceImpl.java +++ /dev/null @@ -1,170 +0,0 @@ - -package org.nl.wms.dc.service.impl; - - -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.StrUtil; -import com.alibaba.fastjson.JSON; -import lombok.RequiredArgsConstructor; -import org.nl.exception.BadRequestException; -import org.nl.wms.dc.service.DevicetypeService; -import org.nl.wms.dc.service.dto.DevicetypeDto; -import org.nl.wms.dc.service.dto.WorksectionDto; -import org.nl.wql.WQL; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import org.springframework.data.domain.Pageable; - -import java.util.List; -import java.util.Map; - -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.util.IdUtil; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import org.nl.utils.SecurityUtils; -import org.nl.wql.core.bean.ResultBean; -import org.nl.wql.core.bean.WQLObject; -import org.nl.wql.util.WqlUtil; -import lombok.extern.slf4j.Slf4j; -import cn.hutool.core.util.ObjectUtil; - -/** - * @author geng by - * @description 服务实现 - * @date 2022-05-17 - **/ -@Service -@RequiredArgsConstructor -@Slf4j -public class DevicetypeServiceImpl implements DevicetypeService { - - @Override - public Map queryAll(Map whereJson, Pageable page) { - WQLObject wo = WQLObject.getWQLObject("dc_base_devicetype"); - String search = MapUtil.getStr(whereJson, "search"); - JSONObject map = new JSONObject(); - map.put("flag", "1"); - if (!StrUtil.isEmpty(search)) { - map.put("search", search); - } - JSONObject json = WQL.getWO("DC_DEVICETYPE_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "devicetype.update_time desc"); - return json; - } - - @Override - public List queryAll(Map whereJson) { - WQLObject wo = WQLObject.getWQLObject("dc_base_devicetype"); - JSONArray arr = wo.query().getResultJSONArray(0); - if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(DevicetypeDto.class); - return null; - } - - @Override - public DevicetypeDto findById(Long devicetype_id) { - WQLObject wo = WQLObject.getWQLObject("dc_base_devicetype"); - JSONObject json = wo.query("devicetype_id = '" + devicetype_id + "'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(json)) { - return json.toJavaObject(DevicetypeDto.class); - } - return null; - } - - @Override - public DevicetypeDto findByCode(String code) { - WQLObject wo = WQLObject.getWQLObject("dc_base_devicetype"); - JSONObject json = wo.query("is_delete = '0' and devicetype_code ='" + code + "'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(json)) { - return json.toJavaObject(DevicetypeDto.class); - } - return null; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void create(DevicetypeDto dto) { - Long currentUserId = SecurityUtils.getCurrentUserId(); - String nickName = SecurityUtils.getNickName(); - String now = DateUtil.now(); - - //编码唯一性校验 - String devicetype_code = dto.getDevicetype_code(); - DevicetypeDto byCode = this.findByCode(devicetype_code); - if (ObjectUtil.isNotEmpty(byCode)) throw new BadRequestException("编码已存在!"); - - dto.setDevicetype_id(IdUtil.getSnowflake(1, 1).nextId()); - dto.setCreate_id(currentUserId); - dto.setCreate_name(nickName); - dto.setUpdate_optid(currentUserId); - dto.setUpdate_optname(nickName); - dto.setUpdate_time(now); - dto.setCreate_time(now); - - WQLObject wo = WQLObject.getWQLObject("dc_base_devicetype"); - JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); - wo.insert(json); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(DevicetypeDto dto) { - DevicetypeDto entity = this.findById(dto.getDevicetype_id()); - if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!"); - - //编码唯一性校验 - WQLObject wo = WQLObject.getWQLObject("dc_base_deviceType"); - String where = "is_delete = '0' and devicetype_code = '" + dto.getDevicetype_code() + "' and devicetype_id != '" + dto.getDevicetype_id() + "'"; - - JSONObject jsonObject = wo.query(where).uniqueResult(0); - if (ObjectUtil.isNotEmpty(jsonObject)) { - throw new BadRequestException("编码已存在!"); - } - - Long currentUserId = SecurityUtils.getCurrentUserId(); - String nickName = SecurityUtils.getNickName(); - - String now = DateUtil.now(); - dto.setUpdate_time(now); - dto.setUpdate_optid(currentUserId); - dto.setUpdate_optname(nickName); - - JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); - wo.update(json); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void deleteAll(Long[] ids) { - WQLObject wo = WQLObject.getWQLObject("dc_base_devicetype"); - for (Long devicetype_id : ids) { - wo.delete("devicetype_id = '" + devicetype_id + "'"); - } - } - - @Override - public JSONArray getWorksection() { - WQLObject wo = WQLObject.getWQLObject("dc_base_worksection"); - JSONArray resultJSONArray = wo.query("is_delete = '0'").getResultJSONArray(0); - return resultJSONArray; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void changeActive(JSONObject json) { - Long currentUserId = SecurityUtils.getCurrentUserId(); - String nickName = SecurityUtils.getNickName(); - String now = DateUtil.now(); - - String is_used = "1"; - if (StrUtil.equals("1", json.getString("is_used"))) { - is_used = "0"; - } - json.put("is_used", is_used); - json.put("update_optid", currentUserId); - json.put("update_optname", nickName); - json.put("update_time", now); - WQLObject.getWQLObject("dc_base_deviceType").update(json); - } - -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/impl/ItemServiceImpl.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/impl/ItemServiceImpl.java deleted file mode 100644 index f041897..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/impl/ItemServiceImpl.java +++ /dev/null @@ -1,318 +0,0 @@ - -package org.nl.wms.dc.service.impl; - - -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.StrUtil; -import com.alibaba.fastjson.JSON; -import lombok.RequiredArgsConstructor; -import org.nl.exception.BadRequestException; -import org.nl.wms.dc.service.ItemService; -import org.nl.wms.dc.service.dto.ItemDto; -import org.nl.wms.dc.service.dto.WorksectionDto; -import org.nl.wql.WQL; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import org.springframework.data.domain.Pageable; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.util.IdUtil; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import org.nl.utils.SecurityUtils; -import org.nl.wql.core.bean.ResultBean; -import org.nl.wql.core.bean.WQLObject; -import org.nl.wql.util.WqlUtil; -import lombok.extern.slf4j.Slf4j; -import cn.hutool.core.util.ObjectUtil; - -/** - * @author geng by - * @description 服务实现 - * @date 2022-05-17 - **/ -@Service -@RequiredArgsConstructor -@Slf4j -public class ItemServiceImpl implements ItemService { - - @Override - public Map queryAll(Map whereJson, Pageable page) { - String search = MapUtil.getStr(whereJson, "search"); - String devicetype_id = MapUtil.getStr(whereJson, "devicetype_id"); - JSONObject map = new JSONObject(); - map.put("flag", "1"); - map.put("devicetype_id", devicetype_id); - if (!StrUtil.isEmpty(search)) { - map.put("search", "%" + search + "%"); - } - JSONObject json = WQL.getWO("DC_ITEM_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "item.update_time desc"); - return json; - } - - @Override - public List queryAll(Map whereJson) { - WQLObject wo = WQLObject.getWQLObject("dc_base_item"); - JSONArray arr = wo.query().getResultJSONArray(0); - if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(ItemDto.class); - return null; - } - - @Override - public ItemDto findById(Long iteml_id) { - WQLObject wo = WQLObject.getWQLObject("dc_base_item"); - JSONObject json = wo.query("iteml_id = '" + iteml_id + "'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(json)) { - return json.toJavaObject(ItemDto.class); - } - return null; - } - - @Override - public ItemDto findByCode(String code) { - WQLObject wo = WQLObject.getWQLObject("dc_base_item"); - JSONObject json = wo.query("is_delete = '0' and item_code ='" + code + "'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(json)) { - return json.toJavaObject(ItemDto.class); - } - return null; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void create(JSONObject param) { - - WQLObject wo = WQLObject.getWQLObject("dc_base_item"); - String devicetype_id = param.getString("devicetype_id"); - - final JSONArray existJSONArray = wo.query("is_delete = '0' and devicetype_id = '" + devicetype_id + "'").getResultJSONArray(0); - if (ObjectUtil.isNotEmpty(existJSONArray)) { - throw new BadRequestException("该数据采集设备类型已存在,请重新选择!"); - } - - JSONArray jsonArray = param.getJSONArray("tableData"); - Long currentUserId = SecurityUtils.getCurrentUserId(); - String nickName = SecurityUtils.getNickName(); - String now = DateUtil.now(); - for (int i = 0; i < jsonArray.size(); i++) { - JSONObject jsonObject = jsonArray.getJSONObject(i); - JSONObject map = new JSONObject(); - map.put("iteml_id", IdUtil.getSnowflake(1, 1).nextId()); - map.put("item_code", jsonObject.getString("item_code")); - ItemDto itemDto = this.findByCode(jsonObject.getString("item_code")); - if (ObjectUtil.isNotEmpty(itemDto)) - throw new BadRequestException("'" + jsonObject.getString("item_code") + "'编码已存在!"); - map.put("item_name", jsonObject.getString("item_name")); - map.put("default_value", jsonObject.getString("default_value")); - map.put("seq_no", jsonObject.getString("seq_no")); - map.put("devicetype_id", devicetype_id); - map.put("remark", jsonObject.getString("remark")); - map.put("create_id", currentUserId); - map.put("create_name", nickName); - map.put("create_time", now); - map.put("update_optid", currentUserId); - map.put("update_optname", nickName); - map.put("update_time", now); - wo.insert(map); - } - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(JSONObject param) { - WQLObject wo = WQLObject.getWQLObject("dc_base_item"); - String devicetype_id = param.getString("devicetype_id"); - JSONArray jsonArray = param.getJSONArray("tableData"); - Long currentUserId = SecurityUtils.getCurrentUserId(); - String nickName = SecurityUtils.getNickName(); - String now = DateUtil.now(); - for (int i = 0; i < jsonArray.size(); i++) { - JSONObject jsonObject = jsonArray.getJSONObject(i); - String iteml_id = jsonObject.getString("iteml_id"); - if (StrUtil.isNotEmpty(iteml_id)) { - //编码唯一性校验 - String where = "is_delete = '0' and item_code = '" + jsonObject.getString("item_code") + "' and iteml_id != '" + iteml_id + "'"; - JSONObject is_exist = wo.query(where).uniqueResult(0); - if (ObjectUtil.isNotEmpty(is_exist)) { - throw new BadRequestException("'" + jsonObject.getString("item_code") + "'编码已存在!"); - } - JSONObject editMap = new JSONObject(); - editMap.put("item_code", jsonObject.getString("item_code")); - editMap.put("item_name", jsonObject.getString("item_name")); - editMap.put("default_value", jsonObject.getString("default_value")); - editMap.put("seq_no", jsonObject.getString("seq_no")); - editMap.put("remark", jsonObject.getString("remark")); - editMap.put("update_optid", currentUserId); - editMap.put("update_optname", nickName); - editMap.put("update_time", now); - wo.update(editMap, "iteml_id = '" + iteml_id + "'"); - } else { - JSONObject addMap = new JSONObject(); - addMap.put("iteml_id", IdUtil.getSnowflake(1, 1).nextId()); - addMap.put("item_code", jsonObject.getString("item_code")); - ItemDto itemDto = this.findByCode(jsonObject.getString("item_code")); - if (ObjectUtil.isNotEmpty(itemDto)) - throw new BadRequestException("'" + jsonObject.getString("item_code") + "'编码已存在!"); - addMap.put("item_name", jsonObject.getString("item_name")); - addMap.put("default_value", jsonObject.getString("default_value")); - addMap.put("seq_no", jsonObject.getString("seq_no")); - addMap.put("devicetype_id", devicetype_id); - addMap.put("remark", jsonObject.getString("remark")); - addMap.put("create_id", currentUserId); - addMap.put("create_name", nickName); - addMap.put("create_time", now); - addMap.put("update_optid", currentUserId); - addMap.put("update_optname", nickName); - addMap.put("update_time", now); - wo.insert(addMap); - } - } - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void deleteAll(Long[] ids) { - Long currentUserId = SecurityUtils.getCurrentUserId(); - String nickName = SecurityUtils.getNickName(); - String now = DateUtil.now(); - - WQLObject wo = WQLObject.getWQLObject("dc_base_item"); - for (Long iteml_id : ids) { - JSONObject param = new JSONObject(); - param.put("iteml_id", String.valueOf(iteml_id)); - param.put("is_delete", "1"); - param.put("update_optid", currentUserId); - param.put("update_optname", nickName); - param.put("update_time", now); - wo.update(param); - } - } - - @Override - public JSONArray getDeviceTypeBySection(JSONObject param) { - //获取所属工段下的设备类型 - String section_id = param.getString("section_id"); - WQLObject wo = WQLObject.getWQLObject("dc_base_deviceType"); - JSONArray resultJSONArray = wo.query("is_delete = '0' and section_id = '" + section_id + "'").getResultJSONArray(0); - return resultJSONArray; - } - - @Override - public JSONArray getDtlByDevicetypeId(JSONObject param) { - //根据设备类型id获取项点明细 - WQLObject wo = WQLObject.getWQLObject("dc_base_item"); - String devicetype_id = param.getString("devicetype_id"); - JSONArray resultJSONArray = wo.query("is_delete = '0' and devicetype_id = '" + devicetype_id + "' ").getResultJSONArray(0); - JSONArray array = new JSONArray(); - for (int i = 0; i < resultJSONArray.size(); i++) { - JSONObject jsonObject = resultJSONArray.getJSONObject(i); - //为了显示隐藏表格中每条明细修改、完成按钮 - jsonObject.put("is_show", "1"); - array.add(jsonObject); - } - return array; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void saveItem(JSONObject param) { - WQLObject wo = WQLObject.getWQLObject("dc_base_item"); - String devicetype_id = param.getString("devicetype_id"); - JSONArray jsonArray = param.getJSONArray("tableData"); - Long currentUserId = SecurityUtils.getCurrentUserId(); - String nickName = SecurityUtils.getNickName(); - String now = DateUtil.now(); - List list = new ArrayList<>(); - //循环判断前端传入的项点信息判断是否是数据库中已经存在的,如果已经存在将id添加到集合中 - for (int i = 0; i < jsonArray.size(); i++) { - JSONObject jsonObject = jsonArray.getJSONObject(i); - String iteml_id = jsonObject.getString("iteml_id"); - if (StrUtil.isNotEmpty(iteml_id)) { - list.add(iteml_id); - } - } - StringBuilder sb = new StringBuilder(); - if (list.size() > 0) { - sb.append("and iteml_id not in ("); - for (int i = 0; i < list.size(); i++) { - if (i != list.size() - 1) { - sb.append("'" + list.get(i) + "',"); - } - if (i == list.size() - 1) { - sb.append("'" + list.get(i) + "')"); - } - } - } - //删除表中已经存在的,但前台传入的项点明细中删除了的 - wo.delete("devicetype_id = '" + devicetype_id + "'" + sb); - for (int i = 0; i < jsonArray.size(); i++) { - JSONObject jsonObject = jsonArray.getJSONObject(i); - String iteml_id = jsonObject.getString("iteml_id"); - //通过前端传入的明细项点id判断是否存在数据表中,如果存在,就根据项点id修改,不存在就新增 - if (StrUtil.isNotEmpty(iteml_id)) { - //编码唯一性校验 - String where = "is_delete = '0' and item_code = '" + jsonObject.getString("item_code") + "' and iteml_id != '" + iteml_id + "'"; - JSONObject is_exist = wo.query(where).uniqueResult(0); - if (ObjectUtil.isNotEmpty(is_exist)) { - throw new BadRequestException("'" + jsonObject.getString("item_code") + "'编码已存在!"); - } - JSONObject editMap = new JSONObject(); - editMap.put("item_code", jsonObject.getString("item_code")); - editMap.put("item_name", jsonObject.getString("item_name")); - editMap.put("acs_item_code", jsonObject.getString("acs_item_code")); - editMap.put("default_value", jsonObject.getString("default_value")); - editMap.put("seq_no", jsonObject.getString("seq_no")); - editMap.put("remark", jsonObject.getString("remark")); - editMap.put("update_optid", currentUserId); - editMap.put("update_optname", nickName); - editMap.put("update_time", now); - wo.update(editMap, "iteml_id = '" + iteml_id + "'"); - } else { - JSONObject addMap = new JSONObject(); - addMap.put("iteml_id", IdUtil.getSnowflake(1, 1).nextId()); - addMap.put("item_code", jsonObject.getString("item_code")); - //编码唯一性校验 - ItemDto itemDto = this.findByCode(jsonObject.getString("item_code")); - if (ObjectUtil.isNotEmpty(itemDto)) - throw new BadRequestException("'" + jsonObject.getString("item_code") + "'编码已存在!"); - addMap.put("item_name", jsonObject.getString("item_name")); - addMap.put("acs_item_code", jsonObject.getString("acs_item_code")); - addMap.put("default_value", jsonObject.getString("default_value")); - addMap.put("seq_no", jsonObject.getString("seq_no")); - addMap.put("devicetype_id", devicetype_id); - addMap.put("remark", jsonObject.getString("remark")); - addMap.put("create_id", currentUserId); - addMap.put("create_name", nickName); - addMap.put("create_time", now); - addMap.put("update_optid", currentUserId); - addMap.put("update_optname", nickName); - addMap.put("update_time", now); - wo.insert(addMap); - } - } - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void changeActive(JSONObject json) { - Long currentUserId = SecurityUtils.getCurrentUserId(); - String nickName = SecurityUtils.getNickName(); - String now = DateUtil.now(); - - String is_used = "1"; - if (StrUtil.equals("1", json.getString("is_used"))) { - is_used = "0"; - } - json.put("is_used", is_used); - json.put("update_optid", currentUserId); - json.put("update_optname", nickName); - json.put("update_time", now); - WQLObject.getWQLObject("dc_base_item").update(json); - } - -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/impl/WorksectionServiceImpl.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/impl/WorksectionServiceImpl.java deleted file mode 100644 index 3130192..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/impl/WorksectionServiceImpl.java +++ /dev/null @@ -1,161 +0,0 @@ - -package org.nl.wms.dc.service.impl; - - -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.StrUtil; -import com.alibaba.fastjson.JSON; -import lombok.RequiredArgsConstructor; -import org.nl.exception.BadRequestException; -import org.nl.wms.dc.service.WorksectionService; -import org.nl.wms.dc.service.dto.WorksectionDto; -import org.nl.wms.pdm.service.dto.DeviceDto; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import org.springframework.data.domain.Pageable; - -import java.util.List; -import java.util.Map; - -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.util.IdUtil; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import org.nl.utils.SecurityUtils; -import org.nl.wql.core.bean.ResultBean; -import org.nl.wql.core.bean.WQLObject; -import org.nl.wql.util.WqlUtil; -import lombok.extern.slf4j.Slf4j; -import cn.hutool.core.util.ObjectUtil; - -/** - * @author geng by - * @description 服务实现 - * @date 2022-05-17 - **/ -@Service -@RequiredArgsConstructor -@Slf4j -public class WorksectionServiceImpl implements WorksectionService { - - @Override - public Map queryAll(Map whereJson, Pageable page) { - String search = MapUtil.getStr(whereJson, "search"); - String where = ""; - if (!StrUtil.isEmpty(search)) { - where = " AND (worksection_code like '%" + search + "%' OR worksection_name like '%" + search + "%' ) "; - } - WQLObject wo = WQLObject.getWQLObject("dc_base_worksection"); - ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "is_delete = '0'" + where, "update_time desc"); - final JSONObject json = rb.pageResult(); - return json; - } - - @Override - public List queryAll(Map whereJson) { - WQLObject wo = WQLObject.getWQLObject("dc_base_worksection"); - JSONArray arr = wo.query().getResultJSONArray(0); - if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(WorksectionDto.class); - return null; - } - - @Override - public WorksectionDto findById(Long worksection_id) { - WQLObject wo = WQLObject.getWQLObject("dc_base_worksection"); - JSONObject json = wo.query("worksection_id = '" + worksection_id + "'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(json)) { - return json.toJavaObject(WorksectionDto.class); - } - return null; - } - - @Override - public WorksectionDto findByCode(String code) { - WQLObject wo = WQLObject.getWQLObject("dc_base_worksection"); - JSONObject json = wo.query("is_delete = '0' and worksection_code ='" + code + "'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(json)) { - return json.toJavaObject(WorksectionDto.class); - } - return null; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void create(WorksectionDto dto) { - Long currentUserId = SecurityUtils.getCurrentUserId(); - String nickName = SecurityUtils.getNickName(); - String now = DateUtil.now(); - //编码唯一性校验 - String worksection_code = dto.getWorksection_code(); - WorksectionDto byCode = this.findByCode(worksection_code); - if (ObjectUtil.isNotEmpty(byCode)) throw new BadRequestException("编码已存在!"); - - dto.setWorksection_id(IdUtil.getSnowflake(1, 1).nextId()); - dto.setCreate_id(currentUserId); - dto.setCreate_name(nickName); - dto.setUpdate_optid(currentUserId); - dto.setUpdate_optname(nickName); - dto.setUpdate_time(now); - dto.setCreate_time(now); - - WQLObject wo = WQLObject.getWQLObject("dc_base_worksection"); - JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); - wo.insert(json); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(WorksectionDto dto) { - WorksectionDto entity = this.findById(dto.getWorksection_id()); - if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!"); - - //编码唯一性校验 - WQLObject wo = WQLObject.getWQLObject("dc_base_workSection"); - String where = "is_delete = '0' and worksection_code = '" + dto.getWorksection_code() + "' and worksection_id != '" + dto.getWorksection_id() + "'"; - - JSONObject jsonObject = wo.query(where).uniqueResult(0); - if (ObjectUtil.isNotEmpty(jsonObject)) { - throw new BadRequestException("编码已存在!"); - } - - Long currentUserId = SecurityUtils.getCurrentUserId(); - String nickName = SecurityUtils.getNickName(); - - String now = DateUtil.now(); - dto.setUpdate_time(now); - dto.setUpdate_optid(currentUserId); - dto.setUpdate_optname(nickName); - - JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); - wo.update(json); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void deleteAll(Long[] ids) { - WQLObject wo = WQLObject.getWQLObject("dc_base_worksection"); - for (Long worksection_id : ids) { - wo.delete("worksection_id = '" + worksection_id + "'"); - } - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void changeActive(JSONObject json) { - Long currentUserId = SecurityUtils.getCurrentUserId(); - String nickName = SecurityUtils.getNickName(); - String now = DateUtil.now(); - - String is_used = "1"; - if (StrUtil.equals("1", json.getString("is_used"))) { - is_used = "0"; - } - json.put("is_used", is_used); - json.put("update_optid", currentUserId); - json.put("update_optname", nickName); - json.put("update_time", now); - WQLObject.getWQLObject("dc_base_workSection").update(json); - } - -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/wql/DC_DEVICETYPE_01.wql b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/wql/DC_DEVICETYPE_01.wql deleted file mode 100644 index 8ecdb09..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/wql/DC_DEVICETYPE_01.wql +++ /dev/null @@ -1,57 +0,0 @@ -[交易说明] - 交易名: 设备类型 - 所属模块: - 功能简述: - 版权所有: - 表引用: - 版本经历: - -[数据库] - --指定数据库,为空采用默认值,默认为db.properties中列出的第一个库 - -[IO定义] - ################################################# - ## 表字段对应输入参数 - ################################################# - 输入.flag TYPEAS s_string - 输入.search TYPEAS s_string - -[临时表] - --这边列出来的临时表就会在运行期动态创建 - -[临时变量] - --所有中间过程变量均可在此处定义 - -[业务过程] - - ########################################## - # 1、输入输出检查 # - ########################################## - - - ########################################## - # 2、主过程前处理 # - ########################################## - - - ########################################## - # 3、业务主过程 # - ########################################## - - IF 输入.flag = "1" - PAGEQUERY - SELECT - devicetype.*, - section.worksection_name - FROM - dc_base_deviceType devicetype - left join dc_base_workSection section on devicetype.section_id = section.worksection_id - WHERE - devicetype.is_delete = '0' - OPTION 输入.search <> "" - (devicetype.devicetype_code like 输入.search or - devicetype.devicetype_name like 输入.search) - ENDOPTION - ENDSELECT - ENDPAGEQUERY - ENDIF diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/wql/DC_DEVICE_01.wql b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/wql/DC_DEVICE_01.wql deleted file mode 100644 index 4642532..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/wql/DC_DEVICE_01.wql +++ /dev/null @@ -1,87 +0,0 @@ -[交易说明] - 交易名: 设备 - 所属模块: - 功能简述: - 版权所有: - 表引用: - 版本经历: - -[数据库] - --指定数据库,为空采用默认值,默认为db.properties中列出的第一个库 - -[IO定义] - ################################################# - ## 表字段对应输入参数 - ################################################# - 输入.flag TYPEAS s_string - 输入.device_id TYPEAS s_string - 输入.devicetype_id TYPEAS s_string - 输入.search TYPEAS s_string - -[临时表] - --这边列出来的临时表就会在运行期动态创建 - -[临时变量] - --所有中间过程变量均可在此处定义 - -[业务过程] - - ########################################## - # 1、输入输出检查 # - ########################################## - - - ########################################## - # 2、主过程前处理 # - ########################################## - - - ########################################## - # 3、业务主过程 # - ########################################## - - IF 输入.flag = "1" - QUERY - SELECT - deviceItem.device_id, - deviceItem.iteml_id, - deviceItem.item_value, - item.item_code - FROM - dc_base_deviceItem deviceItem - LEFT JOIN dc_base_device device ON deviceItem.device_id = device.device_id - LEFT JOIN dc_base_item item ON deviceItem.iteml_id = item.iteml_id - where - deviceItem.device_id = 输入.device_id - order by - item.seq_no - ENDSELECT - ENDQUERY - ENDIF - - IF 输入.flag = "2" - PAGEQUERY - SELECT - device.*, - deviceType.section_id, - deviceType.devicetype_name, - workSection.worksection_name - FROM - dc_base_device device - LEFT JOIN dc_base_deviceType deviceType ON device.devicetype_id = deviceType.devicetype_id - LEFT JOIN dc_base_workSection workSection ON deviceType.section_id = workSection.worksection_id - WHERE - device.devicetype_id = 输入.devicetype_id - OPTION 输入.search <> "" - (device.device_code like 输入.search or - device.device_name like 输入.search) - ENDOPTION - OPTION 输入.devicetype_id <> "" - device.devicetype_id = 输入.devicetype_id - ENDOPTION - OPTION 输入.device_id <> "" - device.device_id = 输入.device_id - ENDOPTION - ENDSELECT - ENDPAGEQUERY - ENDIF diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/wql/DC_ITEM_01.wql b/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/wql/DC_ITEM_01.wql deleted file mode 100644 index 74fa436..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/dc/service/wql/DC_ITEM_01.wql +++ /dev/null @@ -1,64 +0,0 @@ -[交易说明] - 交易名: 采集项管理 - 所属模块: - 功能简述: - 版权所有: - 表引用: - 版本经历: - -[数据库] - --指定数据库,为空采用默认值,默认为db.properties中列出的第一个库 - -[IO定义] - ################################################# - ## 表字段对应输入参数 - ################################################# - 输入.flag TYPEAS s_string - 输入.search TYPEAS s_string - 输入.devicetype_id TYPEAS s_string - -[临时表] - --这边列出来的临时表就会在运行期动态创建 - -[临时变量] - --所有中间过程变量均可在此处定义 - -[业务过程] - - ########################################## - # 1、输入输出检查 # - ########################################## - - - ########################################## - # 2、主过程前处理 # - ########################################## - - - ########################################## - # 3、业务主过程 # - ########################################## - - IF 输入.flag = "1" - PAGEQUERY - SELECT - item.*, - section.worksection_id, - section.worksection_name, - devicetype.devicetype_name - FROM - dc_base_item item - left join dc_base_deviceType devicetype on item.devicetype_id = devicetype.devicetype_id - left join dc_base_workSection section on section.worksection_id = devicetype.section_id - WHERE - item.is_delete = '0' - OPTION 输入.search <> "" - (item.item_code like 输入.search or - item.item_name like 输入.search) - ENDOPTION - OPTION 输入.devicetype_id <> "" - item.devicetype_id = 输入.devicetype_id - ENDOPTION - ENDSELECT - ENDPAGEQUERY - ENDIF diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/1.txt b/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/1.txt deleted file mode 100644 index e69de29..0000000 diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/rest/PdmBaseLineproceduredeviceController.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/rest/PdmBaseLineproceduredeviceController.java deleted file mode 100644 index d989802..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/rest/PdmBaseLineproceduredeviceController.java +++ /dev/null @@ -1,76 +0,0 @@ - -package org.nl.wms.device.rest; - - -import org.nl.wms.device.service.dto.PdmBaseLineproceduredeviceDto; -import org.nl.wms.device.service.PdmBaseLineproceduredeviceService; -import org.springframework.data.domain.Pageable; -import lombok.RequiredArgsConstructor; -import org.nl.annotation.Log; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import io.swagger.annotations.*; -import java.io.IOException; -import javax.servlet.http.HttpServletResponse; -import java.util.Map; -import lombok.extern.slf4j.Slf4j; - -/** -* @author qinx -* @date 2022-03-29 -**/ -@RestController -@RequiredArgsConstructor -@Api(tags = "产线工序业务管理") -@RequestMapping("/api/pdmBaseLineproceduredevice") -@Slf4j -public class PdmBaseLineproceduredeviceController { - - private final PdmBaseLineproceduredeviceService pdmBaseLineproceduredeviceService; - - @GetMapping - @Log("查询产线工序业务") - @ApiOperation("查询产线工序业务") - //@PreAuthorize("@el.check('pdmBaseLineproceduredevice:list')") - public ResponseEntity query(@RequestParam Map whereJson, Pageable page){ - return new ResponseEntity<>(pdmBaseLineproceduredeviceService.queryAll(whereJson,page),HttpStatus.OK); - } - - @PostMapping - @Log("新增产线工序业务") - @ApiOperation("新增产线工序业务") - //@PreAuthorize("@el.check('pdmBaseLineproceduredevice:add')") - public ResponseEntity create(@Validated @RequestBody PdmBaseLineproceduredeviceDto dto){ - pdmBaseLineproceduredeviceService.create(dto); - return new ResponseEntity<>(HttpStatus.CREATED); - } - - @PutMapping - @Log("修改产线工序业务") - @ApiOperation("修改产线工序业务") - //@PreAuthorize("@el.check('pdmBaseLineproceduredevice:edit')") - public ResponseEntity update(@Validated @RequestBody PdmBaseLineproceduredeviceDto dto){ - pdmBaseLineproceduredeviceService.update(dto); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - - @Log("删除产线工序业务") - @ApiOperation("删除产线工序业务") - //@PreAuthorize("@el.check('pdmBaseLineproceduredevice:del')") - @DeleteMapping - public ResponseEntity delete(@RequestBody Long[] ids) { - pdmBaseLineproceduredeviceService.deleteAll(ids); - return new ResponseEntity<>(HttpStatus.OK); - } - - @Log("导出产线工序业务") - @ApiOperation("导出产线工序业务") - @GetMapping(value = "/download") - //@PreAuthorize("@el.check('pdmBaseLineproceduredevice:list')") - public void download(HttpServletResponse response, @RequestParam Map whereJson) throws IOException { - pdmBaseLineproceduredeviceService.download(pdmBaseLineproceduredeviceService.queryAll(whereJson), response); - } -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/rest/PdmBaseProducelineController.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/rest/PdmBaseProducelineController.java deleted file mode 100644 index 266f045..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/rest/PdmBaseProducelineController.java +++ /dev/null @@ -1,86 +0,0 @@ - -package org.nl.wms.device.rest; - - -import com.alibaba.fastjson.JSONObject; -import com.mysql.cj.protocol.Security; -import org.nl.wms.device.service.dto.PdmBaseProducelineDto; -import org.nl.wms.device.service.PdmBaseProducelineService; -import org.springframework.data.domain.Pageable; -import lombok.RequiredArgsConstructor; -import org.nl.annotation.Log; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import io.swagger.annotations.*; -import java.io.IOException; -import javax.servlet.http.HttpServletResponse; -import java.util.Map; -import lombok.extern.slf4j.Slf4j; - -/** -* @author qinx -* @date 2022-03-31 -**/ -@RestController -@RequiredArgsConstructor -@Api(tags = "生产产线管理") -@RequestMapping("/api/pdmBaseProduceline") -@Slf4j -public class PdmBaseProducelineController { - - private final PdmBaseProducelineService pdmBaseProducelineService; - - @GetMapping - @Log("查询生产产线") - @ApiOperation("查询生产产线") - //@PreAuthorize("@el.check('pdmBaseProduceline:list')") - public ResponseEntity query(@RequestParam Map whereJson, Pageable page){ - return new ResponseEntity<>(pdmBaseProducelineService.queryAll(whereJson,page),HttpStatus.OK); - } - - @PostMapping - @Log("新增生产产线") - @ApiOperation("新增生产产线") - //@PreAuthorize("@el.check('pdmBaseProduceline:add')") - public ResponseEntity create(@Validated @RequestBody PdmBaseProducelineDto dto){ - pdmBaseProducelineService.create(dto); - return new ResponseEntity<>(HttpStatus.CREATED); - } - - @PutMapping - @Log("修改生产产线") - @ApiOperation("修改生产产线") - //@PreAuthorize("@el.check('pdmBaseProduceline:edit')") - public ResponseEntity update(@Validated @RequestBody PdmBaseProducelineDto dto){ - pdmBaseProducelineService.update(dto); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - - @Log("删除生产产线") - @ApiOperation("删除生产产线") - //@PreAuthorize("@el.check('pdmBaseProduceline:del')") - @DeleteMapping - public ResponseEntity delete(@RequestBody Long[] ids) { - pdmBaseProducelineService.deleteAll(ids); - return new ResponseEntity<>(HttpStatus.OK); - } - - @Log("导出生产产线") - @ApiOperation("导出生产产线") - @GetMapping(value = "/download") - //@PreAuthorize("@el.check('pdmBaseProduceline:list')") - public void download(HttpServletResponse response, @RequestParam Map whereJson) throws IOException { - pdmBaseProducelineService.download(pdmBaseProducelineService.queryAll(whereJson), response); - } - @PutMapping("/changeActive") - @Log("修改点位启用状态") - @ApiOperation("修改点位启用状态") - //@PreAuthorize("@el.check('store:edit')") - public ResponseEntity update(@RequestBody JSONObject json) { - pdmBaseProducelineService.changeActive(json); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/PdmBaseLineproceduredeviceService.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/PdmBaseLineproceduredeviceService.java deleted file mode 100644 index b8a5a73..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/PdmBaseLineproceduredeviceService.java +++ /dev/null @@ -1,73 +0,0 @@ - -package org.nl.wms.device.service; - -import org.nl.wms.device.service.dto.PdmBaseLineproceduredeviceDto; -import org.springframework.data.domain.Pageable; -import java.util.Map; -import java.util.List; -import java.io.IOException; -import javax.servlet.http.HttpServletResponse; - -/** -* @description 服务接口 -* @author qinx -* @date 2022-03-29 -**/ -public interface PdmBaseLineproceduredeviceService { - - /** - * 查询数据分页 - * @param whereJson 条件 - * @param page 分页参数 - * @return Map - */ - Map queryAll(Map whereJson, Pageable page); - - /** - * 查询所有数据不分页 - * @param whereJson 条件参数 - * @return List - */ - List queryAll(Map whereJson); - - /** - * 根据ID查询 - * @param relation_id ID - * @return PdmBaseLineproceduredevice - */ - PdmBaseLineproceduredeviceDto findById(Long relation_id); - - /** - * 根据编码查询 - * @param code code - * @return PdmBaseLineproceduredevice - */ - PdmBaseLineproceduredeviceDto findByCode(String code); - - - /** - * 创建 - * @param dto / - */ - void create(PdmBaseLineproceduredeviceDto dto); - - /** - * 编辑 - * @param dto / - */ - void update(PdmBaseLineproceduredeviceDto dto); - - /** - * 多选删除 - * @param ids / - */ - void deleteAll(Long[] ids); - - /** - * 导出数据 - * @param dtos 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List dtos, HttpServletResponse response) throws IOException; -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/PdmBaseProducelineService.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/PdmBaseProducelineService.java deleted file mode 100644 index aacfa00..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/PdmBaseProducelineService.java +++ /dev/null @@ -1,80 +0,0 @@ - -package org.nl.wms.device.service; - -import com.alibaba.fastjson.JSONObject; -import org.nl.wms.device.service.dto.PdmBaseProducelineDto; -import org.springframework.data.domain.Pageable; -import java.util.Map; -import java.util.List; -import java.io.IOException; -import javax.servlet.http.HttpServletResponse; - -/** -* @description 服务接口 -* @author qinx -* @date 2022-03-31 -**/ -public interface PdmBaseProducelineService { - - /** - * 查询数据分页 - * @param whereJson 条件 - * @param page 分页参数 - * @return Map - */ - Map queryAll(Map whereJson, Pageable page); - - /** - * 查询所有数据不分页 - * @param whereJson 条件参数 - * @return List - */ - List queryAll(Map whereJson); - - /** - * 根据ID查询 - * @param produceLine_id ID - * @return PdmBaseProduceline - */ - PdmBaseProducelineDto findById(Long produceLine_id); - - /** - * 根据编码查询 - * @param code code - * @return PdmBaseProduceline - */ - PdmBaseProducelineDto findByCode(String code); - - - /** - * 创建 - * @param dto / - */ - void create(PdmBaseProducelineDto dto); - - /** - * 编辑 - * @param dto / - */ - void update(PdmBaseProducelineDto dto); - - /** - * 多选删除 - * @param ids / - */ - void deleteAll(Long[] ids); - - /** - * 导出数据 - * @param dtos 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List dtos, HttpServletResponse response) throws IOException; - /** - * 编辑 - * - * @param json / - */ - void changeActive(JSONObject json); -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/dto/PdmBaseLineproceduredeviceDto.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/dto/PdmBaseLineproceduredeviceDto.java deleted file mode 100644 index 329cad4..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/dto/PdmBaseLineproceduredeviceDto.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.nl.wms.device.service.dto; - -import lombok.Data; - import java.math.BigDecimal; -import java.io.Serializable; - import com.fasterxml.jackson.databind.annotation.JsonSerialize; - import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; - -/** -* @description / -* @author qinx -* @date 2022-03-29 -**/ -@Data -public class PdmBaseLineproceduredeviceDto implements Serializable { - - /** 关系标识 */ - /** 防止精度丢失 */ - @JsonSerialize(using= ToStringSerializer.class) - private Long relation_id; - - /** 产线标识 */ - private Long produceLine_id; - - /** 工序标识 */ - private Long workprocedure_id; - - /** 设备标识 */ - private Long device_id; - - /** 顺序号 */ - private BigDecimal seq_no; - - /** 是否启用 */ - private String is_used; - - /** 创建人 */ - private Long create_id; - - /** 创建人姓名 */ - private String create_name; - - /** 创建时间 */ - private String create_time; - - /** 修改人 */ - private Long update_optid; - - /** 修改人姓名 */ - private String update_optname; - - /** 修改时间 */ - private String update_time; - - /** 是否删除 */ - private String is_delete; -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/dto/PdmBaseProducelineDto.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/dto/PdmBaseProducelineDto.java deleted file mode 100644 index 1a2c871..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/dto/PdmBaseProducelineDto.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.nl.wms.device.service.dto; - -import lombok.Data; -import java.io.Serializable; - import com.fasterxml.jackson.databind.annotation.JsonSerialize; - import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; - -/** -* @description / -* @author qinx -* @date 2022-03-31 -**/ -@Data -public class PdmBaseProducelineDto implements Serializable { - - /** 产线标识 */ - /** 防止精度丢失 */ - @JsonSerialize(using= ToStringSerializer.class) - private Long produceline_id; - - /** 产线编码 */ - private String produceline_code; - - /** 产线名称 */ - private String produceline_name; - - /** 是否启用 */ - private String is_used; - - /** 创建人 */ - private Long create_id; - - /** 创建人姓名 */ - private String create_name; - - /** 创建时间 */ - private String create_time; - - /** 修改人 */ - private Long update_optid; - - /** 修改人姓名 */ - private String update_optname; - - /** 修改时间 */ - private String update_time; - - /** 是否删除 */ - private String is_delete; -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/impl/PdmBaseLineproceduredeviceServiceImpl.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/impl/PdmBaseLineproceduredeviceServiceImpl.java deleted file mode 100644 index 94084fe..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/impl/PdmBaseLineproceduredeviceServiceImpl.java +++ /dev/null @@ -1,136 +0,0 @@ - -package org.nl.wms.device.service.impl; - - -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.util.IdUtil; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.nl.exception.BadRequestException; -import org.nl.utils.FileUtil; -import org.nl.utils.SecurityUtils; -import org.nl.wms.device.service.PdmBaseLineproceduredeviceService; -import org.nl.wms.device.service.dto.PdmBaseLineproceduredeviceDto; -import org.nl.wql.core.bean.ResultBean; -import org.nl.wql.core.bean.WQLObject; -import org.nl.wql.util.WqlUtil; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import com.alibaba.fastjson.JSON; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -/** - * @author qinx - * @description 服务实现 - * @date 2022-03-29 - **/ -@Service -@RequiredArgsConstructor -@Slf4j -public class PdmBaseLineproceduredeviceServiceImpl implements PdmBaseLineproceduredeviceService { - - @Override - public Map queryAll(Map whereJson, Pageable page) { - WQLObject wo = WQLObject.getWQLObject("pdm_base_lineproceduredevice"); - ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "", "update_time desc"); - final JSONObject json = rb.pageResult(); - return json; - } - - @Override - public List queryAll(Map whereJson) { - WQLObject wo = WQLObject.getWQLObject("pdm_base_lineproceduredevice"); - JSONArray arr = wo.query().getResultJSONArray(0); - List list = arr.toJavaList(PdmBaseLineproceduredeviceDto.class); - return list; - } - - @Override - public PdmBaseLineproceduredeviceDto findById(Long relation_id) { - WQLObject wo = WQLObject.getWQLObject("pdm_base_lineproceduredevice"); - JSONObject json = wo.query("relation_id ='" + relation_id + "'").uniqueResult(0); - final PdmBaseLineproceduredeviceDto obj = (PdmBaseLineproceduredeviceDto) JSONObject.toJavaObject(json, PdmBaseLineproceduredeviceDto.class); - return obj; - } - - @Override - public PdmBaseLineproceduredeviceDto findByCode(String code) { - WQLObject wo = WQLObject.getWQLObject("pdm_base_lineproceduredevice"); - JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0); - final PdmBaseLineproceduredeviceDto obj = (PdmBaseLineproceduredeviceDto) JSONObject.toJavaObject(json, PdmBaseLineproceduredeviceDto.class); - return obj; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void create(PdmBaseLineproceduredeviceDto dto) { - String currentUsername = SecurityUtils.getCurrentUsername(); - String now = DateUtil.now(); - - dto.setRelation_id(Long.valueOf(IdUtil.getSnowflake(1, 1).nextId() + "")); - dto.setCreate_name(currentUsername); - dto.setUpdate_optname(currentUsername); - dto.setUpdate_time(now); - dto.setCreate_time(now); - - WQLObject wo = WQLObject.getWQLObject("pdm_base_lineproceduredevice"); - JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); - wo.insert(json); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(PdmBaseLineproceduredeviceDto dto) { - PdmBaseLineproceduredeviceDto entity = this.findById(dto.getRelation_id()); - if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!"); - - String currentUsername = SecurityUtils.getCurrentUsername(); - String now = DateUtil.now(); - dto.setUpdate_time(now); - dto.setUpdate_optname(currentUsername); - - WQLObject wo = WQLObject.getWQLObject("pdm_base_lineproceduredevice"); - JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); - wo.update(json); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void deleteAll(Long[] ids) { - WQLObject wo = WQLObject.getWQLObject("pdm_base_lineproceduredevice"); - for (Long relation_id : ids) { - wo.delete("relation_id = '" + relation_id + "'"); - } - } - - @Override - public void download(List all, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (PdmBaseLineproceduredeviceDto pdmBaseLineproceduredevice : all) { - Map map = new LinkedHashMap<>(); - map.put("产线标识", pdmBaseLineproceduredevice.getProduceLine_id()); - map.put("工序标识", pdmBaseLineproceduredevice.getWorkprocedure_id()); - map.put("设备标识", pdmBaseLineproceduredevice.getDevice_id()); - map.put("顺序号", pdmBaseLineproceduredevice.getSeq_no()); - map.put("是否启用", pdmBaseLineproceduredevice.getIs_used()); - map.put("创建人", pdmBaseLineproceduredevice.getCreate_id()); - map.put("创建人姓名", pdmBaseLineproceduredevice.getCreate_name()); - map.put("创建时间", pdmBaseLineproceduredevice.getCreate_time()); - map.put("修改人", pdmBaseLineproceduredevice.getUpdate_optid()); - map.put("修改人姓名", pdmBaseLineproceduredevice.getUpdate_optname()); - map.put("修改时间", pdmBaseLineproceduredevice.getUpdate_time()); - map.put("是否删除", pdmBaseLineproceduredevice.getIs_delete()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/impl/PdmBaseProducelineServiceImpl.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/impl/PdmBaseProducelineServiceImpl.java deleted file mode 100644 index f81c3c3..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/impl/PdmBaseProducelineServiceImpl.java +++ /dev/null @@ -1,158 +0,0 @@ - -package org.nl.wms.device.service.impl; - - -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.IdUtil; -import cn.hutool.core.util.StrUtil; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.nl.exception.BadRequestException; -import org.nl.utils.FileUtil; -import org.nl.utils.SecurityUtils; -import org.nl.wms.device.service.PdmBaseProducelineService; -import org.nl.wms.device.service.dto.PdmBaseProducelineDto; -import org.nl.wql.WQL; -import org.nl.wql.core.bean.ResultBean; -import org.nl.wql.core.bean.WQLObject; -import org.nl.wql.util.WqlUtil; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.*; - -import com.alibaba.fastjson.JSON; - -/** - * @author qinx - * @description 服务实现 - * @date 2022-03-31 - **/ -@Service -@RequiredArgsConstructor -@Slf4j -public class PdmBaseProducelineServiceImpl implements PdmBaseProducelineService { - - @Override - public Map queryAll(Map whereJson, Pageable page) { - WQLObject wo = WQLObject.getWQLObject("pdm_base_produceline"); - String search = MapUtil.getStr(whereJson, "search"); - HashMap map = new HashMap<>(); - map.put("flag", "1"); - if (StrUtil.isNotEmpty(search)) { - map.put("search", "%" + search + "%"); - } - JSONObject json = WQL.getWO("QL_PRODUCELINE01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time desc"); - return json; - } - - @Override - public List queryAll(Map whereJson) { - WQLObject wo = WQLObject.getWQLObject("pdm_base_produceline"); - JSONArray arr = wo.query().getResultJSONArray(0); - List list = arr.toJavaList(PdmBaseProducelineDto.class); - return list; - } - - @Override - public PdmBaseProducelineDto findById(Long produceLine_id) { - WQLObject wo = WQLObject.getWQLObject("pdm_base_produceline"); - JSONObject json = wo.query("produceLine_id ='" + produceLine_id + "'").uniqueResult(0); - final PdmBaseProducelineDto obj = (PdmBaseProducelineDto) JSONObject.toJavaObject(json, PdmBaseProducelineDto.class); - return obj; - } - - @Override - public PdmBaseProducelineDto findByCode(String code) { - WQLObject wo = WQLObject.getWQLObject("pdm_base_produceline"); - JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0); - final PdmBaseProducelineDto obj = (PdmBaseProducelineDto) JSONObject.toJavaObject(json, PdmBaseProducelineDto.class); - return obj; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void create(PdmBaseProducelineDto dto) { - String currentUsername = SecurityUtils.getCurrentUsername(); - String now = DateUtil.now(); - - dto.setProduceline_id(Long.valueOf(IdUtil.getSnowflake(1, 1).nextId() + "")); - dto.setCreate_name(currentUsername); - dto.setUpdate_optname(currentUsername); - dto.setCreate_id(SecurityUtils.getCurrentUserId()); - dto.setUpdate_time(now); - dto.setCreate_time(now); - - WQLObject wo = WQLObject.getWQLObject("pdm_base_produceline"); - JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); - wo.insert(json); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(PdmBaseProducelineDto dto) { - PdmBaseProducelineDto entity = this.findById(dto.getProduceline_id()); - if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!"); - - String currentUsername = SecurityUtils.getCurrentUsername(); - String now = DateUtil.now(); - dto.setUpdate_time(now); - dto.setUpdate_optname(currentUsername); - - WQLObject wo = WQLObject.getWQLObject("pdm_base_produceline"); - JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); - wo.update(json); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void deleteAll(Long[] ids) { - WQLObject wo = WQLObject.getWQLObject("pdm_base_produceline"); - for (Long produceLine_id : ids) { - wo.delete("produceLine_id = '" + produceLine_id + "'"); - } - } - - @Override - public void download(List all, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (PdmBaseProducelineDto pdmBaseProduceline : all) { - Map map = new LinkedHashMap<>(); - map.put("产线编码", pdmBaseProduceline.getProduceline_code()); - map.put("产线名称", pdmBaseProduceline.getProduceline_name()); - map.put("是否启用", pdmBaseProduceline.getIs_used()); - map.put("创建人", pdmBaseProduceline.getCreate_id()); - map.put("创建人姓名", pdmBaseProduceline.getCreate_name()); - map.put("创建时间", pdmBaseProduceline.getCreate_time()); - map.put("修改人", pdmBaseProduceline.getUpdate_optid()); - map.put("修改人姓名", pdmBaseProduceline.getUpdate_optname()); - map.put("修改时间", pdmBaseProduceline.getUpdate_time()); - map.put("是否删除", pdmBaseProduceline.getIs_delete()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } - - @Override - public void changeActive(JSONObject json) { - Long currentUserId = SecurityUtils.getCurrentUserId(); - String nickName = SecurityUtils.getNickName(); - String now = DateUtil.now(); - - String is_used = "1"; - if (StrUtil.equals("1", json.getString("is_used"))) { - is_used = "0"; - } - json.put("is_used", is_used); - json.put("update_optid", currentUserId); - json.put("update_optname", nickName); - json.put("update_time", now); - WQLObject.getWQLObject("pdm_base_produceline").update(json); - } -} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/wql/QL_PRODUCELINE01.wql b/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/wql/QL_PRODUCELINE01.wql deleted file mode 100644 index 1591418..0000000 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/device/service/wql/QL_PRODUCELINE01.wql +++ /dev/null @@ -1,61 +0,0 @@ -[交易说明] - 交易名: 工作量汇报分页查询 - 所属模块: - 功能简述: - 版权所有: - 表引用: - 版本经历: - -[数据库] - --指定数据库,为空采用默认值,默认为db.properties中列出的第一个库 - -[IO定义] - ################################################# - ## 表字段对应输入参数 - ################################################# - 输入.flag TYPEAS s_string - 输入.search TYPEAS s_string - - - -[临时表] - --这边列出来的临时表就会在运行期动态创建 - -[临时变量] - --所有中间过程变量均可在此处定义 - -[业务过程] - - ########################################## - # 1、输入输出检查 # - ########################################## - - - ########################################## - # 2、主过程前处理 # - ########################################## - - - ########################################## - # 3、业务主过程 # - ########################################## - - IF 输入.flag = "1" - PAGEQUERY - SELECT - * - FROM - PDM_BASE_produceLine line - WHERE - 1=1 - OPTION 输入.search <> "" - line.produceline_code like 输入.search - or line.produceline_name like 输入.search - ENDOPTION - ENDSELECT - ENDPAGEQUERY - ENDIF - - - - diff --git a/wms/qd/src/api/wms/dc/dcBaseDevice.js b/wms/qd/src/api/wms/dc/dcBaseDevice.js deleted file mode 100644 index bcf8b49..0000000 --- a/wms/qd/src/api/wms/dc/dcBaseDevice.js +++ /dev/null @@ -1,43 +0,0 @@ -import request from '@/utils/request' - -export function add(data) { - return request({ - url: 'api/dcBaseDevice', - method: 'post', - data - }) -} - -export function del(ids) { - return request({ - url: 'api/dcBaseDevice/', - method: 'delete', - data: ids - }) -} - -export function edit(data) { - return request({ - url: 'api/dcBaseDevice', - method: 'put', - data - }) -} - -export function getItemByDeviceTypeId(data) { - return request({ - url: 'api/dcBaseDevice/getItemByDeviceTypeId', - method: 'post', - data - }) -} - -export function changeActive(data) { - return request({ - url: 'api/dcBaseDevice/changeActive', - method: 'put', - data - }) -} - -export default { add, edit, del, getItemByDeviceTypeId, changeActive } diff --git a/wms/qd/src/api/wms/dc/devicetype.js b/wms/qd/src/api/wms/dc/devicetype.js deleted file mode 100644 index f0dba04..0000000 --- a/wms/qd/src/api/wms/dc/devicetype.js +++ /dev/null @@ -1,42 +0,0 @@ -import request from '@/utils/request' - -export function add(data) { - return request({ - url: 'api/devicetype', - method: 'post', - data - }) -} - -export function del(ids) { - return request({ - url: 'api/devicetype/', - method: 'delete', - data: ids - }) -} - -export function edit(data) { - return request({ - url: 'api/devicetype', - method: 'put', - data - }) -} - -export function getWorksection() { - return request({ - url: 'api/devicetype/getWorksection', - method: 'get' - }) -} - -export function changeActive(data) { - return request({ - url: 'api/devicetype/changeActive', - method: 'put', - data - }) -} - -export default { add, edit, del, getWorksection, changeActive } diff --git a/wms/qd/src/api/wms/dc/item.js b/wms/qd/src/api/wms/dc/item.js deleted file mode 100644 index 20427b0..0000000 --- a/wms/qd/src/api/wms/dc/item.js +++ /dev/null @@ -1,59 +0,0 @@ -import request from '@/utils/request' - -export function add(data) { - return request({ - url: 'api/item', - method: 'post', - data - }) -} - -export function del(ids) { - return request({ - url: 'api/item/', - method: 'delete', - data: ids - }) -} - -export function edit(data) { - return request({ - url: 'api/item', - method: 'put', - data - }) -} - -export function getDeviceTypeBySection(data) { - return request({ - url: 'api/item/getDeviceTypeBySection', - method: 'post', - data - }) -} - -export function getDtlByDevicetypeId(data) { - return request({ - url: 'api/item/getDtlByDevicetypeId', - method: 'post', - data - }) -} - -export function saveItem(data) { - return request({ - url: 'api/item/saveItem', - method: 'post', - data - }) -} - -export function changeActive(data) { - return request({ - url: 'api/item/changeActive', - method: 'put', - data - }) -} - -export default { add, edit, del, getDeviceTypeBySection, getDtlByDevicetypeId, saveItem, changeActive } diff --git a/wms/qd/src/api/wms/dc/worksection.js b/wms/qd/src/api/wms/dc/worksection.js deleted file mode 100644 index 9fa888d..0000000 --- a/wms/qd/src/api/wms/dc/worksection.js +++ /dev/null @@ -1,35 +0,0 @@ -import request from '@/utils/request' - -export function add(data) { - return request({ - url: 'api/worksection', - method: 'post', - data - }) -} - -export function del(ids) { - return request({ - url: 'api/worksection/', - method: 'delete', - data: ids - }) -} - -export function edit(data) { - return request({ - url: 'api/worksection', - method: 'put', - data - }) -} - -export function changeActive(data) { - return request({ - url: 'api/worksection/changeActive', - method: 'put', - data - }) -} - -export default { add, edit, del, changeActive } diff --git a/wms/qd/src/api/wms/device/acsDeviceErpmapping.js b/wms/qd/src/api/wms/device/acsDeviceErpmapping.js deleted file mode 100644 index 49ca0cd..0000000 --- a/wms/qd/src/api/wms/device/acsDeviceErpmapping.js +++ /dev/null @@ -1,27 +0,0 @@ -import request from '@/utils/request' - -export function add(data) { - return request({ - url: 'api/acsDeviceErpmapping', - method: 'post', - data - }) -} - -export function del(ids) { - return request({ - url: 'api/acsDeviceErpmapping/', - method: 'delete', - data: ids - }) -} - -export function edit(data) { - return request({ - url: 'api/acsDeviceErpmapping', - method: 'put', - data - }) -} - -export default { add, edit, del } diff --git a/wms/qd/src/api/wms/pdm/produceline.js b/wms/qd/src/api/wms/pdm/produceline.js deleted file mode 100644 index b42c5e8..0000000 --- a/wms/qd/src/api/wms/pdm/produceline.js +++ /dev/null @@ -1,82 +0,0 @@ -import request from '@/utils/request' - -export function add(data) { - return request({ - url: 'api/produceline', - method: 'post', - data - }) -} - -export function del(ids) { - return request({ - url: 'api/produceline/', - method: 'delete', - data: ids - }) -} - -export function edit(data) { - return request({ - url: 'api/produceline', - method: 'put', - data - }) -} - -export function changeActive(data) { - return request({ - url: 'api/produceline/changeActive', - method: 'put', - data - }) -} - -export function getWorkprocedure(data) { - return request({ - url: '/api/produceline/queryWorkProcedureListByLineId', - method: 'get', - data - }) -} - -export function queryWorkProcedureDeviceListByLineId(data) { - return request({ - url: '/api/produceline/queryWorkProcedureDeviceListByLineId', - method: 'get', - data - }) -} - -export function saveWorkProcedureDevice1(data) { - return request({ - url: '/api/produceline/saveWorkProcedureDevice', - method: 'post', - data - }) -} - -export function saveWorkProcedure(data) { - return request({ - url: '/api/produceline/saveWorkProcedure', - method: 'post', - data - }) -} - -export function getWorkprocedureByLineId(data) { - return request({ - url: '/api/produceline/getWorkprocedureByLineId', - method: 'get', - data - }) -} -export function getWorkprocedureDeviceTypeList(data) { - return request({ - url: '/api/produceline/getWorkprocedureDeviceTypeList', - method: 'post', - data - }) -} - -export default { add, edit, del, changeActive } diff --git a/wms/qd/src/api/wms/pdm/producetask.js b/wms/qd/src/api/wms/pdm/producetask.js index 8a454f2..8769526 100644 --- a/wms/qd/src/api/wms/pdm/producetask.js +++ b/wms/qd/src/api/wms/pdm/producetask.js @@ -46,12 +46,6 @@ export function getDevice1() { }) } -export function getProduceline() { - return request({ - url: 'api/producetask/getProduceline', - method: 'get' - }) -} export function getCust() { return request({ @@ -114,4 +108,4 @@ export function synchro(data) { }) } -export default { add, edit, del, getMaterial, getDevice, getProduceline, getCust, getWorkprocedure, excelImport, getDevice1, copyAdd, sortUpdate, mandFinish, issued, synchro } +export default { add, edit, del, getMaterial, getDevice, getCust, getWorkprocedure, excelImport, getDevice1, copyAdd, sortUpdate, mandFinish, issued, synchro } diff --git a/wms/qd/src/views/wms/dc/device/index.vue b/wms/qd/src/views/wms/dc/device/index.vue deleted file mode 100644 index 994e663..0000000 --- a/wms/qd/src/views/wms/dc/device/index.vue +++ /dev/null @@ -1,218 +0,0 @@ - - - - - diff --git a/wms/qd/src/views/wms/dc/deviceType/index.vue b/wms/qd/src/views/wms/dc/deviceType/index.vue deleted file mode 100644 index b5a6915..0000000 --- a/wms/qd/src/views/wms/dc/deviceType/index.vue +++ /dev/null @@ -1,148 +0,0 @@ - - - - - diff --git a/wms/qd/src/views/wms/dc/item/AddDialog.vue b/wms/qd/src/views/wms/dc/item/AddDialog.vue deleted file mode 100644 index 70ce7a3..0000000 --- a/wms/qd/src/views/wms/dc/item/AddDialog.vue +++ /dev/null @@ -1,304 +0,0 @@ - - - - - diff --git a/wms/qd/src/views/wms/dc/item/index.vue b/wms/qd/src/views/wms/dc/item/index.vue deleted file mode 100644 index 4729139..0000000 --- a/wms/qd/src/views/wms/dc/item/index.vue +++ /dev/null @@ -1,181 +0,0 @@ - - - - - diff --git a/wms/qd/src/views/wms/dc/workSection/index.vue b/wms/qd/src/views/wms/dc/workSection/index.vue deleted file mode 100644 index fd34be4..0000000 --- a/wms/qd/src/views/wms/dc/workSection/index.vue +++ /dev/null @@ -1,128 +0,0 @@ - - - - - diff --git a/wms/qd/src/views/wms/pdm/produceLine/DeviceDialog.vue b/wms/qd/src/views/wms/pdm/produceLine/DeviceDialog.vue deleted file mode 100644 index 4aa786e..0000000 --- a/wms/qd/src/views/wms/pdm/produceLine/DeviceDialog.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - - - diff --git a/wms/qd/src/views/wms/pdm/produceLine/WorkProcedureConfigDialog.vue b/wms/qd/src/views/wms/pdm/produceLine/WorkProcedureConfigDialog.vue deleted file mode 100644 index e0c5b29..0000000 --- a/wms/qd/src/views/wms/pdm/produceLine/WorkProcedureConfigDialog.vue +++ /dev/null @@ -1,175 +0,0 @@ - - - - - diff --git a/wms/qd/src/views/wms/pdm/produceLine/WorkProcedureDeviceConfigDialog.vue b/wms/qd/src/views/wms/pdm/produceLine/WorkProcedureDeviceConfigDialog.vue deleted file mode 100644 index 364d2ca..0000000 --- a/wms/qd/src/views/wms/pdm/produceLine/WorkProcedureDeviceConfigDialog.vue +++ /dev/null @@ -1,214 +0,0 @@ - - - - - diff --git a/wms/qd/src/views/wms/pdm/produceLine/WorkProcedureParamDialog.vue b/wms/qd/src/views/wms/pdm/produceLine/WorkProcedureParamDialog.vue deleted file mode 100644 index 178095b..0000000 --- a/wms/qd/src/views/wms/pdm/produceLine/WorkProcedureParamDialog.vue +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - diff --git a/wms/qd/src/views/wms/pdm/produceLine/buss/CallMaterialRequest.vue b/wms/qd/src/views/wms/pdm/produceLine/buss/CallMaterialRequest.vue deleted file mode 100644 index 08c1089..0000000 --- a/wms/qd/src/views/wms/pdm/produceLine/buss/CallMaterialRequest.vue +++ /dev/null @@ -1,107 +0,0 @@ - - - - - diff --git a/wms/qd/src/views/wms/pdm/produceLine/buss/CallVehicle.vue b/wms/qd/src/views/wms/pdm/produceLine/buss/CallVehicle.vue deleted file mode 100644 index ab72952..0000000 --- a/wms/qd/src/views/wms/pdm/produceLine/buss/CallVehicle.vue +++ /dev/null @@ -1,101 +0,0 @@ - - - - - diff --git a/wms/qd/src/views/wms/pdm/produceLine/buss/FullMaterialRequest.vue b/wms/qd/src/views/wms/pdm/produceLine/buss/FullMaterialRequest.vue deleted file mode 100644 index 3d21d03..0000000 --- a/wms/qd/src/views/wms/pdm/produceLine/buss/FullMaterialRequest.vue +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - diff --git a/wms/qd/src/views/wms/pdm/produceLine/buss/SendVehicle.vue b/wms/qd/src/views/wms/pdm/produceLine/buss/SendVehicle.vue deleted file mode 100644 index 99e1a1f..0000000 --- a/wms/qd/src/views/wms/pdm/produceLine/buss/SendVehicle.vue +++ /dev/null @@ -1,101 +0,0 @@ - - - - - diff --git a/wms/qd/src/views/wms/pdm/produceLine/index.vue b/wms/qd/src/views/wms/pdm/produceLine/index.vue deleted file mode 100644 index 94526c3..0000000 --- a/wms/qd/src/views/wms/pdm/produceLine/index.vue +++ /dev/null @@ -1,221 +0,0 @@ - - - - - diff --git a/wms/qd/src/views/wms/pdm/produceTask/CopyDialog.vue b/wms/qd/src/views/wms/pdm/produceTask/CopyDialog.vue index 49cad85..9558465 100644 --- a/wms/qd/src/views/wms/pdm/produceTask/CopyDialog.vue +++ b/wms/qd/src/views/wms/pdm/produceTask/CopyDialog.vue @@ -50,7 +50,7 @@ export default { dialogVisible: false, deviceList: [], workprocedure_id: '', - form: { producetask_id: null, producetask_code: null, producetask_status: null, material_id: null, device_id: null, produceline_id: null, cust_id: null, seq_no: null, plan_qty: null, real_qty: null, plan_start_time: null, real_start_time: null, plan_end_time: null, real_end_time: null, producetask_finish_type: null, stand_hour: null, remark: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, model: null, molten_pool: null }, + form: { producetask_id: null, producetask_code: null, producetask_status: null, material_id: null, device_id: null, cust_id: null, seq_no: null, plan_qty: null, real_qty: null, plan_start_time: null, real_start_time: null, plan_end_time: null, real_end_time: null, producetask_finish_type: null, stand_hour: null, remark: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, model: null, molten_pool: null }, rules: { device_id: [ { required: true, message: '设备标识不能为空', trigger: 'blur' } diff --git a/wms/qd/src/views/wms/pdm/produceTask/SortDialog.vue b/wms/qd/src/views/wms/pdm/produceTask/SortDialog.vue index 0dc9ef3..d4b5b84 100644 --- a/wms/qd/src/views/wms/pdm/produceTask/SortDialog.vue +++ b/wms/qd/src/views/wms/pdm/produceTask/SortDialog.vue @@ -48,7 +48,6 @@ - diff --git a/wms/qd/src/views/wms/pdm/produceTask/index.vue b/wms/qd/src/views/wms/pdm/produceTask/index.vue index f30f8ad..9113f48 100644 --- a/wms/qd/src/views/wms/pdm/produceTask/index.vue +++ b/wms/qd/src/views/wms/pdm/produceTask/index.vue @@ -44,16 +44,6 @@ /> - - - - - - - - - - - @@ -348,7 +327,6 @@ const defaultForm = { producetask_status: null, material_id: null, device_id: null, - produceline_id: null, cust_id: null, seq_no: null, plan_qty: null, @@ -415,9 +393,6 @@ export default { device_id: [ { required: true, message: '设备标识不能为空', trigger: 'blur' } ], - produceline_id: [ - { required: true, message: '产线标识不能为空', trigger: 'blur' } - ], seq_no: [ { required: true, message: '生产顺序不能为空', trigger: 'blur' } ], @@ -437,7 +412,6 @@ export default { } }, created() { - this.getProduceline() this.getCust() this.getMaterial() this.getWorkprocedure() @@ -575,11 +549,6 @@ export default { this.workprocedureList = res }) }, - getProduceline() { - crudProducetask.getProduceline().then(res => { - this.producelineList = res - }) - }, tableChanged3() { this.crud.toQuery() },