13 Commits

Author SHA1 Message Date
ce721696fa feat: 🚀 添加部署master分支功能 2023-03-01 14:06:46 +08:00
caixiang
41207394e5 Merge branch 'master' of http://git.picaiba.com/CaiXiang/cigs4 2023-03-01 12:05:27 +08:00
caixiang
14745366be commit for pull 2023-03-01 12:05:06 +08:00
cade1cc1b9 Merge pull request 'fix' (#8) from yanyang into master
Reviewed-on: #8
2023-02-28 10:19:32 +08:00
8c0e43d9f7 fix 2023-02-28 10:19:12 +08:00
d44034c1db Merge pull request '手动装箱打印新增返回' (#7) from yanyang into master
Reviewed-on: #7
2023-02-28 09:27:31 +08:00
56b8b82fc2 手动装箱打印新增返回 2023-02-28 09:26:43 +08:00
caixiang
31bc287207 Merge branch 'master' of http://git.picaiba.com/CaiXiang/cigs4 2023-02-27 15:50:04 +08:00
caixiang
bb8986c98d mark 2023-02-27 15:49:58 +08:00
76cef5fc05 Merge pull request 'yanyang' (#6) from yanyang into master
Reviewed-on: #6
2023-02-27 10:59:49 +08:00
94a7b76157 Merge branch 'master' of git.picaiba.com:CaiXiang/cigs4 into yanyang 2023-02-27 10:58:19 +08:00
74dd845b13 m 2023-02-27 10:57:48 +08:00
58adaa3c59 打印查询 2023-02-27 10:54:22 +08:00
15 changed files with 150 additions and 124 deletions

View File

@@ -11,16 +11,16 @@ steps:
- name: dockerconfig - name: dockerconfig
path: /root/.docker path: /root/.docker
commands: commands:
- docker build -t harbor.picaiba.com/kszny/mes-api:1.0.0-india ./ && docker push harbor.picaiba.com/kszny/mes-api:1.0.0-india - docker build -t harbor.picaiba.com/kszny/mes-api:1.0.0-cigs4 ./ && docker push harbor.picaiba.com/kszny/mes-api:1.0.0-cigs4
- name: deploy - name: deploy
image: harbor.picaiba.com/tools/kubectl image: harbor.picaiba.com/tools/kubectl
commands: commands:
- echo "172.27.0.20 lb.kubesphere.local" >> /etc/hosts - echo "172.27.0.20 lb.kubesphere.local" >> /etc/hosts
- sleep 1 - sleep 1
- kubectl scale --replicas=0 deployment/mes-api -n mes-india - kubectl scale --replicas=0 deployment/mes-api -n mes-cigs4
- sleep 3 - sleep 3
- kubectl scale --replicas=1 deployment/mes-api -n mes-india - kubectl scale --replicas=1 deployment/mes-api -n mes-cigs4
depends_on: depends_on:
- build - build
@@ -34,6 +34,6 @@ volumes:
trigger: trigger:
branch: branch:
- porject/yd-monitor - master
event: event:
- push - push

View File

@@ -49,7 +49,7 @@ ENV TZ="Asia/Shanghai"
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 定义一些环境变量,方便环境变量传参 # 定义一些环境变量,方便环境变量传参
ENV JVM_OPTS="" ENV JVM_OPTS=""
ENV JAVA_OPTS="-Dspring.profiles.active=dev" ENV JAVA_OPTS=""
# 指定暴露的端口,起到说明的作用,不指定也会暴露对应端口 # 指定暴露的端口,起到说明的作用,不指定也会暴露对应端口
EXPOSE 8080 EXPOSE 8080
# 启动 jar 的命令 # 启动 jar 的命令

View File

@@ -61,14 +61,14 @@ dynamic:
# username: root # username: root
# password: 1qaz@WSX3edc$RFV # password: 1qaz@WSX3edc$RFV
## camline系统 ## camline系统
# camline:
# driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://mysql.picaiba.com:30307/mt_cigs4?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
# username: root
# password: 1qaz@WSX3edc$RFV
#
camline: camline:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://10.0.1.23:3306/synapse?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true url: jdbc:mysql://mysql.picaiba.com:30307/mt_cigs4?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
username: offline_data username: root
password: tpvmfab4 password: 1qaz@WSX3edc$RFV
#
# camline:
# driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://10.0.1.23:3306/synapse?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
# username: offline_data
# password: tpvmfab4

View File

@@ -150,12 +150,12 @@ public class KukaJoinThread implements ApplicationRunner {
@Override @Override
public void run(ApplicationArguments args) throws Exception { public void run(ApplicationArguments args) throws Exception {
kukaStep1.scheduleAtFixedRate(new Runnable() { // kukaStep1.scheduleAtFixedRate(new Runnable() {
@Override // @Override
public void run() { // public void run() {
logger.info("================= 现在开始执行 过程一 任务 =================="); // logger.info("================= 现在开始执行 过程一 任务 ==================");
} // }
},1,1, TimeUnit.SECONDS); // },1,1, TimeUnit.SECONDS);

View File

@@ -52,7 +52,7 @@ public class ChangePackagingBoxHistoryController {
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class), @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class),
@ApiImplicitParam(name = "type", value = "类型1=加入包装箱2=移除包装箱3=换箱", paramType = "query", dataTypeClass=Integer.class) @ApiImplicitParam(name = "type", value = "类型1=加入包装箱2=移除包装箱3=换箱", paramType = "query", dataTypeClass=Integer.class)
}) })
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:page')") @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:page')")
public Result<PageData<ChangePackagingBoxHistoryDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<ChangePackagingBoxHistoryDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<ChangePackagingBoxHistoryDTO> page = changePackagingBoxHistoryService.page(params); PageData<ChangePackagingBoxHistoryDTO> page = changePackagingBoxHistoryService.page(params);
@@ -61,7 +61,7 @@ public class ChangePackagingBoxHistoryController {
@GetMapping("{id}") @GetMapping("{id}")
@ApiOperation("信息") @ApiOperation("信息")
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:info')") @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:info')")
public Result<ChangePackagingBoxHistoryDTO> get(@PathVariable("id") Long id){ public Result<ChangePackagingBoxHistoryDTO> get(@PathVariable("id") Long id){
ChangePackagingBoxHistoryDTO data = changePackagingBoxHistoryService.get(id); ChangePackagingBoxHistoryDTO data = changePackagingBoxHistoryService.get(id);
@@ -70,8 +70,8 @@ public class ChangePackagingBoxHistoryController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
// @LogOperation("保存") @LogOperation("保存")
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:save')") @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:save')")
public Result<Long> save(@RequestBody ChangePackagingBoxHistoryDTO dto){ public Result<Long> save(@RequestBody ChangePackagingBoxHistoryDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
@@ -83,8 +83,8 @@ public class ChangePackagingBoxHistoryController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
// @LogOperation("修改") @LogOperation("修改")
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:update')") @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:update')")
public Result<Long> update(@RequestBody ChangePackagingBoxHistoryDTO dto){ public Result<Long> update(@RequestBody ChangePackagingBoxHistoryDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
@@ -96,8 +96,8 @@ public class ChangePackagingBoxHistoryController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
// @LogOperation("删除") @LogOperation("删除")
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:delete')") @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
AssertUtils.isArrayEmpty(ids, "id"); AssertUtils.isArrayEmpty(ids, "id");
@@ -109,8 +109,8 @@ public class ChangePackagingBoxHistoryController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
// @LogOperation("导出") @LogOperation("导出")
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:export')") @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<ChangePackagingBoxHistoryDTO> list = changePackagingBoxHistoryService.list(params); List<ChangePackagingBoxHistoryDTO> list = changePackagingBoxHistoryService.list(params);

View File

@@ -1,7 +1,6 @@
package com.cnbm.packing.controller; package com.cnbm.packing.controller;
import com.cnbm.admin.annotation.LogOperation; import com.cnbm.admin.annotation.LogOperation;
import com.cnbm.admin.utils.CodeGeneratorHelper;
import com.cnbm.common.constant.Constant; import com.cnbm.common.constant.Constant;
import com.cnbm.common.page.PageData; import com.cnbm.common.page.PageData;
import com.cnbm.common.utils.ExcelUtils; import com.cnbm.common.utils.ExcelUtils;
@@ -24,7 +23,6 @@ import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -49,9 +47,11 @@ public class PrintModelController {
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "name", value = "标签名称", paramType = "query", dataTypeClass = String.class) @ApiImplicitParam(name = "name", value = "标签名称", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "type", value = "类型0模组标签1等级标签", paramType = "query", dataTypeClass = Integer.class),
@ApiImplicitParam(name = "lineBody", value = "线体1=F ; 2=S", paramType = "query", dataTypeClass = Integer.class)
}) })
// @PreAuthorize("@ex.hasAuthority('packing:printModel:page')") @PreAuthorize("@ex.hasAuthority('packing:printModel:page')")
public Result<PageData<PrintModelDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<PrintModelDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<PrintModelDTO> page = printModelService.page(params); PageData<PrintModelDTO> page = printModelService.page(params);
@@ -60,7 +60,7 @@ public class PrintModelController {
@GetMapping("{id}") @GetMapping("{id}")
@ApiOperation("信息") @ApiOperation("信息")
// @PreAuthorize("@ex.hasAuthority('packing:printModel:info')") @PreAuthorize("@ex.hasAuthority('packing:printModel:info')")
public Result<PrintModelDTO> get(@PathVariable("id") Long id){ public Result<PrintModelDTO> get(@PathVariable("id") Long id){
PrintModelDTO data = printModelService.get(id); PrintModelDTO data = printModelService.get(id);
@@ -69,8 +69,8 @@ public class PrintModelController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
// @LogOperation("保存") @LogOperation("保存")
// @PreAuthorize("@ex.hasAuthority('packing:printModel:save')") @PreAuthorize("@ex.hasAuthority('packing:printModel:save')")
public Result<Long> save(@RequestBody PrintModelDTO dto){ public Result<Long> save(@RequestBody PrintModelDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
@@ -82,8 +82,8 @@ public class PrintModelController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
// @LogOperation("修改") @LogOperation("修改")
// @PreAuthorize("@ex.hasAuthority('packing:printModel:update')") @PreAuthorize("@ex.hasAuthority('packing:printModel:update')")
public Result<Long> update(@RequestBody PrintModelDTO dto){ public Result<Long> update(@RequestBody PrintModelDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
@@ -95,8 +95,8 @@ public class PrintModelController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
// @LogOperation("删除") @LogOperation("删除")
// @PreAuthorize("@ex.hasAuthority('packing:printModel:delete')") @PreAuthorize("@ex.hasAuthority('packing:printModel:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
AssertUtils.isArrayEmpty(ids, "id"); AssertUtils.isArrayEmpty(ids, "id");
@@ -108,8 +108,8 @@ public class PrintModelController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
// @LogOperation("导出") @LogOperation("导出")
// @PreAuthorize("@ex.hasAuthority('packing:printModel:export')") @PreAuthorize("@ex.hasAuthority('packing:printModel:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<PrintModelDTO> list = printModelService.list(params); List<PrintModelDTO> list = printModelService.list(params);
@@ -118,12 +118,10 @@ public class PrintModelController {
@PostMapping(value = "list") @PostMapping(value = "list")
@ApiOperation(value = "获取打印标签模板列表") @ApiOperation(value = "获取打印标签模板列表")
// @LogOperation("获取打印标签模板列表")
public List<PrintModelDTO> list() { return printModelService.list(); } public List<PrintModelDTO> list() { return printModelService.list(); }
@PostMapping(value = "getCode") @PostMapping(value = "getCode")
@ApiOperation(value = "获取标签编码") @ApiOperation(value = "获取标签编码")
// @LogOperation("获取标签编码")
public Result<String> getCode() { public Result<String> getCode() {
String code = printModelService.getCode(); String code = printModelService.getCode();
return new Result<String>().ok(code); return new Result<String>().ok(code);

View File

@@ -58,7 +58,7 @@ public class WoCompensationPowerController {
@GetMapping("{id}") @GetMapping("{id}")
@ApiOperation("信息") @ApiOperation("信息")
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:info')") @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:info')")
public Result<WoCompensationPowerDTO> get(@PathVariable("id") Long id){ public Result<WoCompensationPowerDTO> get(@PathVariable("id") Long id){
WoCompensationPowerDTO data = woCompensationPowerService.get(id); WoCompensationPowerDTO data = woCompensationPowerService.get(id);
@@ -67,8 +67,8 @@ public class WoCompensationPowerController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
// @LogOperation("保存") @LogOperation("保存")
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:save')") @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:save')")
public Result<Long> save(@RequestBody WoCompensationPowerDTO dto){ public Result<Long> save(@RequestBody WoCompensationPowerDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
@@ -80,8 +80,8 @@ public class WoCompensationPowerController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
// @LogOperation("修改") @LogOperation("修改")
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:update')") @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:update')")
public Result<Long> update(@RequestBody WoCompensationPowerDTO dto){ public Result<Long> update(@RequestBody WoCompensationPowerDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
@@ -93,8 +93,8 @@ public class WoCompensationPowerController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
// @LogOperation("删除") @LogOperation("删除")
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:delete')") @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
AssertUtils.isArrayEmpty(ids, "id"); AssertUtils.isArrayEmpty(ids, "id");
@@ -106,8 +106,8 @@ public class WoCompensationPowerController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
// @LogOperation("导出") @LogOperation("导出")
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:export')") @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<WoCompensationPowerDTO> list = woCompensationPowerService.list(params); List<WoCompensationPowerDTO> list = woCompensationPowerService.list(params);
@@ -116,7 +116,6 @@ public class WoCompensationPowerController {
@PostMapping(value = "list") @PostMapping(value = "list")
@ApiOperation(value = "获取基板补偿功率") @ApiOperation(value = "获取基板补偿功率")
// @LogOperation("获取基板补偿功率")
public List<WoCompensationPowerDTO> list() { return woCompensationPowerService.list(); } public List<WoCompensationPowerDTO> list() { return woCompensationPowerService.list(); }
} }

View File

@@ -10,7 +10,7 @@ import com.cnbm.common.validator.ValidatorUtils;
import com.cnbm.common.validator.group.AddGroup; import com.cnbm.common.validator.group.AddGroup;
import com.cnbm.common.validator.group.DefaultGroup; import com.cnbm.common.validator.group.DefaultGroup;
import com.cnbm.common.validator.group.UpdateGroup; import com.cnbm.common.validator.group.UpdateGroup;
import com.cnbm.packing.dto.PrintModelDTO; import com.cnbm.packing.dto.IdVo;
import com.cnbm.packing.dto.WoPackagingBoxDTO; import com.cnbm.packing.dto.WoPackagingBoxDTO;
import com.cnbm.packing.excel.WoPackagingBoxExcel; import com.cnbm.packing.excel.WoPackagingBoxExcel;
import com.cnbm.packing.service.WoPackagingBoxServiceBiz; import com.cnbm.packing.service.WoPackagingBoxServiceBiz;
@@ -56,7 +56,7 @@ public class WoPackagingBoxController {
@ApiImplicitParam(name = "printStatus", value = "打印状态0、未打印1、已打印", paramType = "query", dataTypeClass = Integer.class), @ApiImplicitParam(name = "printStatus", value = "打印状态0、未打印1、已打印", paramType = "query", dataTypeClass = Integer.class),
@ApiImplicitParam(name = "model", value = "模式1-手动模式2-自动模式", paramType = "query", dataTypeClass = Integer.class) @ApiImplicitParam(name = "model", value = "模式1-手动模式2-自动模式", paramType = "query", dataTypeClass = Integer.class)
}) })
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:page')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:page')")
public Result<PageData<WoPackagingBoxDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<WoPackagingBoxDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<WoPackagingBoxDTO> page = woPackagingBoxService.page(params); PageData<WoPackagingBoxDTO> page = woPackagingBoxService.page(params);
@@ -65,7 +65,7 @@ public class WoPackagingBoxController {
@GetMapping("{id}") @GetMapping("{id}")
@ApiOperation("信息") @ApiOperation("信息")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:info')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:info')")
public Result<WoPackagingBoxDTO> get(@PathVariable("id") Long id){ public Result<WoPackagingBoxDTO> get(@PathVariable("id") Long id){
WoPackagingBoxDTO data = woPackagingBoxService.get(id); WoPackagingBoxDTO data = woPackagingBoxService.get(id);
@@ -74,21 +74,19 @@ public class WoPackagingBoxController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
// @LogOperation("保存") @LogOperation("保存")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:save')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:save')")
public Result<Long> save(@RequestBody WoPackagingBoxDTO dto){ public IdVo save(@RequestBody WoPackagingBoxDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
woPackagingBoxService.save(dto); return woPackagingBoxService.add(dto);
return new Result<Long>().ok(dto.getId());
} }
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
// @LogOperation("修改") @LogOperation("修改")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:update')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:update')")
public Result<Long> update(@RequestBody WoPackagingBoxDTO dto){ public Result<Long> update(@RequestBody WoPackagingBoxDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
@@ -100,8 +98,8 @@ public class WoPackagingBoxController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
// @LogOperation("删除") @LogOperation("删除")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:delete')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
AssertUtils.isArrayEmpty(ids, "id"); AssertUtils.isArrayEmpty(ids, "id");
@@ -113,8 +111,8 @@ public class WoPackagingBoxController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
// @LogOperation("导出") @LogOperation("导出")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:export')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<WoPackagingBoxDTO> list = woPackagingBoxService.list(params); List<WoPackagingBoxDTO> list = woPackagingBoxService.list(params);
@@ -123,7 +121,6 @@ public class WoPackagingBoxController {
@PostMapping(value = "list") @PostMapping(value = "list")
@ApiOperation(value = "获取列表") @ApiOperation(value = "获取列表")
// @LogOperation("获取列表")
public List<WoPackagingBoxDTO> list() { return woPackagingBoxService.list(); } public List<WoPackagingBoxDTO> list() { return woPackagingBoxService.list(); }
@PostMapping(value = "printList/{id}") @PostMapping(value = "printList/{id}")

View File

@@ -64,7 +64,7 @@ public class WoPackagingBoxSubstrateController {
@ApiImplicitParam(name = "packagingBoxId", value = "包装箱IDBoxId", paramType = "query", dataTypeClass = String.class), @ApiImplicitParam(name = "packagingBoxId", value = "包装箱IDBoxId", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "woSubstrateId", value = "基板ID关联T_SUBSTRATE表", paramType = "query", dataTypeClass = String.class) @ApiImplicitParam(name = "woSubstrateId", value = "基板ID关联T_SUBSTRATE表", paramType = "query", dataTypeClass = String.class)
}) })
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:page')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:page')")
public Result<PageData<WoPackagingBoxSubstrateDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<WoPackagingBoxSubstrateDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<WoPackagingBoxSubstrateDTO> page = woPackagingBoxSubstrateService.page(params); PageData<WoPackagingBoxSubstrateDTO> page = woPackagingBoxSubstrateService.page(params);
@@ -73,7 +73,7 @@ public class WoPackagingBoxSubstrateController {
@GetMapping("{id}") @GetMapping("{id}")
@ApiOperation("信息") @ApiOperation("信息")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:info')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:info')")
public Result<WoPackagingBoxSubstrateDTO> get(@PathVariable("id") Long id){ public Result<WoPackagingBoxSubstrateDTO> get(@PathVariable("id") Long id){
WoPackagingBoxSubstrateDTO data = woPackagingBoxSubstrateService.get(id); WoPackagingBoxSubstrateDTO data = woPackagingBoxSubstrateService.get(id);
@@ -82,8 +82,8 @@ public class WoPackagingBoxSubstrateController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
// @LogOperation("保存") @LogOperation("保存")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:save')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:save')")
public Result<Long> save(@RequestBody WoPackagingBoxSubstrateDTO dto){ public Result<Long> save(@RequestBody WoPackagingBoxSubstrateDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
@@ -95,8 +95,8 @@ public class WoPackagingBoxSubstrateController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
// @LogOperation("修改") @LogOperation("修改")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:update')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:update')")
public Result<Long> update(@RequestBody WoPackagingBoxSubstrateDTO dto){ public Result<Long> update(@RequestBody WoPackagingBoxSubstrateDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
@@ -108,8 +108,8 @@ public class WoPackagingBoxSubstrateController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
// @LogOperation("删除") @LogOperation("删除")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:delete')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
AssertUtils.isArrayEmpty(ids, "id"); AssertUtils.isArrayEmpty(ids, "id");
@@ -121,8 +121,8 @@ public class WoPackagingBoxSubstrateController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
// @LogOperation("导出") @LogOperation("导出")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:export')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<WoPackagingBoxSubstrateDTO> list = woPackagingBoxSubstrateService.list(params); List<WoPackagingBoxSubstrateDTO> list = woPackagingBoxSubstrateService.list(params);
@@ -131,7 +131,7 @@ public class WoPackagingBoxSubstrateController {
@PostMapping("removeSubstrate/{id}") @PostMapping("removeSubstrate/{id}")
@ApiOperation("移箱") @ApiOperation("移箱")
// @LogOperation("移箱") @LogOperation("移箱")
public Result removeSubstrate(@PathVariable("id") Long id){ public Result removeSubstrate(@PathVariable("id") Long id){
woPackagingBoxSubstrateService.removeSubstrate(id); woPackagingBoxSubstrateService.removeSubstrate(id);
@@ -141,7 +141,7 @@ public class WoPackagingBoxSubstrateController {
@PostMapping("insertSubstrate") @PostMapping("insertSubstrate")
@ApiOperation("合箱") @ApiOperation("合箱")
// @LogOperation("合箱") @LogOperation("合箱")
public Result insertSubstrate(@RequestBody ChangePackingBoxDTO dto){ public Result insertSubstrate(@RequestBody ChangePackingBoxDTO dto){
String woSubstrateId = dto.getWoSubstrateId(); String woSubstrateId = dto.getWoSubstrateId();
@@ -171,7 +171,7 @@ public class WoPackagingBoxSubstrateController {
boxQueryWrapper.eq(StringUtils.isNotBlank(packagingBoxId), WoPackagingBox.BOX_NO, packagingBoxId); boxQueryWrapper.eq(StringUtils.isNotBlank(packagingBoxId), WoPackagingBox.BOX_NO, packagingBoxId);
WoPackagingBox box = woPackagingBoxMapper.selectList(boxQueryWrapper).get(0); WoPackagingBox box = woPackagingBoxMapper.selectList(boxQueryWrapper).get(0);
if((substrate.getLineBody()==box.getLineBody()) && (substrate.getPowerLevel()==box.getPowerLevel()) ) if((substrate.getLineBody()==box.getLineBody()) && (substrate.getPowerLevel().equals(box.getPowerLevel())) )
{ {
dto.setId(substrate.getId()); dto.setId(substrate.getId());
woPackagingBoxSubstrateService.insertSubstrate(dto); woPackagingBoxSubstrateService.insertSubstrate(dto);
@@ -184,7 +184,7 @@ public class WoPackagingBoxSubstrateController {
@PostMapping("replaceSubstrate") @PostMapping("replaceSubstrate")
@ApiOperation("换箱") @ApiOperation("换箱")
// @LogOperation("换箱") @LogOperation("换箱")
public Result replaceSubstrate(@RequestBody ChangePackingBoxDTO[] dtos){ public Result replaceSubstrate(@RequestBody ChangePackingBoxDTO[] dtos){
woPackagingBoxSubstrateService.replaceSubstrate(dtos); woPackagingBoxSubstrateService.replaceSubstrate(dtos);
@@ -194,7 +194,6 @@ public class WoPackagingBoxSubstrateController {
@PostMapping("slotValidation") @PostMapping("slotValidation")
@ApiOperation("slot是否占用验证") @ApiOperation("slot是否占用验证")
// @LogOperation("slot是否占用验证")
public boolean slotValidation(@RequestBody ChangePackingBoxDTO dto){ public boolean slotValidation(@RequestBody ChangePackingBoxDTO dto){
QueryWrapper<WoPackagingBoxSubstrate> wrapper = new QueryWrapper<>(); QueryWrapper<WoPackagingBoxSubstrate> wrapper = new QueryWrapper<>();
@@ -210,7 +209,7 @@ public class WoPackagingBoxSubstrateController {
@PostMapping("insertSubstrateManual") @PostMapping("insertSubstrateManual")
@ApiOperation("手动装箱") @ApiOperation("手动装箱")
// @LogOperation("手动装箱") @LogOperation("手动装箱")
public Result insertSubstrateManual(@RequestBody ChangePackingBoxDTO dto){ public Result insertSubstrateManual(@RequestBody ChangePackingBoxDTO dto){
woPackagingBoxSubstrateService.insertSubstrateManual(dto); woPackagingBoxSubstrateService.insertSubstrateManual(dto);

View File

@@ -1,7 +1,6 @@
package com.cnbm.packing.controller; package com.cnbm.packing.controller;
import com.cnbm.admin.annotation.LogOperation; import com.cnbm.admin.annotation.LogOperation;
import com.cnbm.admin.enums.WhetherEnum;
import com.cnbm.common.constant.Constant; import com.cnbm.common.constant.Constant;
import com.cnbm.common.page.PageData; import com.cnbm.common.page.PageData;
import com.cnbm.common.utils.ExcelUtils; import com.cnbm.common.utils.ExcelUtils;
@@ -12,17 +11,13 @@ import com.cnbm.common.validator.group.AddGroup;
import com.cnbm.common.validator.group.DefaultGroup; import com.cnbm.common.validator.group.DefaultGroup;
import com.cnbm.common.validator.group.UpdateGroup; import com.cnbm.common.validator.group.UpdateGroup;
import com.cnbm.packing.dto.WoPackagingBoxDTO;
import com.cnbm.packing.dto.WoPackagingPrintHistoryDTO; import com.cnbm.packing.dto.WoPackagingPrintHistoryDTO;
import com.cnbm.packing.entity.WoPackagingBox;
import com.cnbm.packing.excel.WoPackagingPrintHistoryExcel; import com.cnbm.packing.excel.WoPackagingPrintHistoryExcel;
import com.cnbm.packing.service.WoPackagingBoxServiceBiz;
import com.cnbm.packing.service.WoPackagingPrintHistoryServiceBiz; import com.cnbm.packing.service.WoPackagingPrintHistoryServiceBiz;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@@ -46,8 +41,6 @@ import java.util.Map;
public class WoPackagingPrintHistoryController { public class WoPackagingPrintHistoryController {
@Autowired @Autowired
private WoPackagingPrintHistoryServiceBiz woPackagingPrintHistoryService; private WoPackagingPrintHistoryServiceBiz woPackagingPrintHistoryService;
@Autowired
private WoPackagingBoxServiceBiz woPackagingBoxServiceBiz;
@GetMapping("page") @GetMapping("page")
@@ -61,7 +54,7 @@ public class WoPackagingPrintHistoryController {
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class), @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class),
@ApiImplicitParam(name = "boxNo", value = "包装箱编号", paramType = "query", dataTypeClass = String.class) @ApiImplicitParam(name = "boxNo", value = "包装箱编号", paramType = "query", dataTypeClass = String.class)
}) })
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:page')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:page')")
public Result<PageData<WoPackagingPrintHistoryDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<WoPackagingPrintHistoryDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<WoPackagingPrintHistoryDTO> page = woPackagingPrintHistoryService.page(params); PageData<WoPackagingPrintHistoryDTO> page = woPackagingPrintHistoryService.page(params);
@@ -70,7 +63,7 @@ public class WoPackagingPrintHistoryController {
@GetMapping("{id}") @GetMapping("{id}")
@ApiOperation("信息") @ApiOperation("信息")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:info')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:info')")
public Result<WoPackagingPrintHistoryDTO> get(@PathVariable("id") Long id){ public Result<WoPackagingPrintHistoryDTO> get(@PathVariable("id") Long id){
WoPackagingPrintHistoryDTO data = woPackagingPrintHistoryService.get(id); WoPackagingPrintHistoryDTO data = woPackagingPrintHistoryService.get(id);
@@ -79,8 +72,8 @@ public class WoPackagingPrintHistoryController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
// @LogOperation("保存") @LogOperation("保存")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:save')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:save')")
public Result<Long> save(@RequestBody WoPackagingPrintHistoryDTO dto){ public Result<Long> save(@RequestBody WoPackagingPrintHistoryDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
@@ -92,8 +85,8 @@ public class WoPackagingPrintHistoryController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
// @LogOperation("修改") @LogOperation("修改")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:update')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:update')")
public Result<Long> update(@RequestBody WoPackagingPrintHistoryDTO dto){ public Result<Long> update(@RequestBody WoPackagingPrintHistoryDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
@@ -105,8 +98,8 @@ public class WoPackagingPrintHistoryController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
// @LogOperation("删除") @LogOperation("删除")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:delete')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
AssertUtils.isArrayEmpty(ids, "id"); AssertUtils.isArrayEmpty(ids, "id");
@@ -118,8 +111,8 @@ public class WoPackagingPrintHistoryController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
// @LogOperation("导出") @LogOperation("导出")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:export')") @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<WoPackagingPrintHistoryDTO> list = woPackagingPrintHistoryService.list(params); List<WoPackagingPrintHistoryDTO> list = woPackagingPrintHistoryService.list(params);
@@ -127,8 +120,8 @@ public class WoPackagingPrintHistoryController {
} }
@PostMapping("print/{id}") @PostMapping("print/{id}")
@ApiOperation("打印记录") @ApiOperation("打印记录新增")
// @LogOperation("打印") @LogOperation("打印记录新增")
public Result<Long> print(@PathVariable("id") Long id) { public Result<Long> print(@PathVariable("id") Long id) {
woPackagingPrintHistoryService.print(id); woPackagingPrintHistoryService.print(id);

View File

@@ -49,7 +49,7 @@ public class WoPowerLevelController {
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "lineBody", value = "线体", paramType = "query", dataTypeClass = Integer.class) @ApiImplicitParam(name = "lineBody", value = "线体", paramType = "query", dataTypeClass = Integer.class)
}) })
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:page')") @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:page')")
public Result<PageData<WoPowerLevelDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<WoPowerLevelDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<WoPowerLevelDTO> page = woPowerLevelService.page(params); PageData<WoPowerLevelDTO> page = woPowerLevelService.page(params);
@@ -58,7 +58,7 @@ public class WoPowerLevelController {
@GetMapping("{id}") @GetMapping("{id}")
@ApiOperation("信息") @ApiOperation("信息")
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:info')") @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:info')")
public Result<WoPowerLevelDTO> get(@PathVariable("id") Long id){ public Result<WoPowerLevelDTO> get(@PathVariable("id") Long id){
WoPowerLevelDTO data = woPowerLevelService.get(id); WoPowerLevelDTO data = woPowerLevelService.get(id);
@@ -67,8 +67,8 @@ public class WoPowerLevelController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
// @LogOperation("保存") @LogOperation("保存")
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:save')") @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:save')")
public Result<Long> save(@RequestBody WoPowerLevelDTO dto){ public Result<Long> save(@RequestBody WoPowerLevelDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
@@ -80,8 +80,8 @@ public class WoPowerLevelController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
// @LogOperation("修改") @LogOperation("修改")
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:update')") @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:update')")
public Result<Long> update(@RequestBody WoPowerLevelDTO dto){ public Result<Long> update(@RequestBody WoPowerLevelDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
@@ -93,8 +93,8 @@ public class WoPowerLevelController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
// @LogOperation("删除") @LogOperation("删除")
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:delete')") @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
AssertUtils.isArrayEmpty(ids, "id"); AssertUtils.isArrayEmpty(ids, "id");
@@ -106,8 +106,8 @@ public class WoPowerLevelController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
// @LogOperation("导出") @LogOperation("导出")
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:export')") @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<WoPowerLevelDTO> list = woPowerLevelService.list(params); List<WoPowerLevelDTO> list = woPowerLevelService.list(params);
@@ -116,7 +116,6 @@ public class WoPowerLevelController {
@PostMapping(value = "list") @PostMapping(value = "list")
@ApiOperation(value = "获取功率等级") @ApiOperation(value = "获取功率等级")
// @LogOperation("获取功率等级")
public List<WoPowerLevelDTO> list() { return woPowerLevelService.list(); } public List<WoPowerLevelDTO> list() { return woPowerLevelService.list(); }
} }

View File

@@ -0,0 +1,32 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.cnbm.packing.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 主键对象
*
* @author jiff
* @date 2018/11/7
* @since 1.0
*/
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Data
@Builder
@ApiModel("主键视图对象")
public class IdVo {
@ApiModelProperty(value = "主键", required = true, example = "1", notes = "根据实际接口返回不同对象的主键")
private Long id;
}

View File

@@ -2,7 +2,7 @@ package com.cnbm.packing.service;
import com.cnbm.common.page.PageData; import com.cnbm.common.page.PageData;
import com.cnbm.common.service.CrudService; import com.cnbm.common.service.CrudService;
import com.cnbm.packing.dto.WoPackagingBoxDTO; import com.cnbm.packing.dto.IdVo;
import com.cnbm.packing.dto.WoPackagingBoxDTO; import com.cnbm.packing.dto.WoPackagingBoxDTO;
import com.cnbm.packing.entity.WoPackagingBox; import com.cnbm.packing.entity.WoPackagingBox;
@@ -21,7 +21,7 @@ public interface WoPackagingBoxServiceBiz extends CrudService<WoPackagingBox, Wo
WoPackagingBoxDTO get(Long id); WoPackagingBoxDTO get(Long id);
void save(WoPackagingBoxDTO dto); IdVo add(WoPackagingBoxDTO dto);
void update(WoPackagingBoxDTO dto); void update(WoPackagingBoxDTO dto);

View File

@@ -2,6 +2,7 @@ package com.cnbm.packing.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.cnbm.admin.utils.CodeGeneratorHelper; import com.cnbm.admin.utils.CodeGeneratorHelper;
import com.cnbm.common.page.PageData; import com.cnbm.common.page.PageData;
import com.cnbm.common.service.impl.CrudServiceImpl; import com.cnbm.common.service.impl.CrudServiceImpl;
@@ -37,6 +38,14 @@ public class PrintModelServiceBizImpl extends CrudServiceImpl<PrintModelMapper,
QueryWrapper<PrintModel> wrapper = new QueryWrapper<>(); QueryWrapper<PrintModel> wrapper = new QueryWrapper<>();
wrapper.like(StringUtils.isNotBlank(name), PrintModel.NAME, name); wrapper.like(StringUtils.isNotBlank(name), PrintModel.NAME, name);
if(params.get("type")!=null) {
Integer type = Integer.parseInt(params.get("type").toString());
wrapper.eq(ObjectUtils.isNotNull(type), PrintModel.TYPE, type);
}
if(params.get("lineBody")!=null) {
Integer lineBody = Integer.parseInt(params.get("lineBody").toString());
wrapper.eq(ObjectUtils.isNotNull(lineBody), PrintModel.LINE_BODY, lineBody);
}
return wrapper; return wrapper;
} }

View File

@@ -6,11 +6,10 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.cnbm.common.page.PageData; import com.cnbm.common.page.PageData;
import com.cnbm.common.service.impl.CrudServiceImpl; import com.cnbm.common.service.impl.CrudServiceImpl;
import com.cnbm.common.utils.ConvertUtils; import com.cnbm.common.utils.ConvertUtils;
import com.cnbm.packing.dto.IdVo;
import com.cnbm.packing.dto.WoPackagingBoxDTO; import com.cnbm.packing.dto.WoPackagingBoxDTO;
import com.cnbm.packing.entity.WoPackagingBox; import com.cnbm.packing.entity.WoPackagingBox;
import com.cnbm.packing.entity.WoPackagingBoxSubstrate; import com.cnbm.packing.entity.WoPackagingBoxSubstrate;
import com.cnbm.packing.entity.WoPowerLevel;
import com.cnbm.packing.mapper.WoPackagingBoxMapper;
import com.cnbm.packing.mapper.WoPackagingBoxMapper; import com.cnbm.packing.mapper.WoPackagingBoxMapper;
import com.cnbm.packing.mapper.WoPackagingBoxSubstrateMapper; import com.cnbm.packing.mapper.WoPackagingBoxSubstrateMapper;
import com.cnbm.packing.service.WoPackagingBoxServiceBiz; import com.cnbm.packing.service.WoPackagingBoxServiceBiz;
@@ -51,11 +50,11 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
Integer lineBody = Integer.parseInt(params.get("lineBody").toString()); Integer lineBody = Integer.parseInt(params.get("lineBody").toString());
wrapper.eq(ObjectUtils.isNotNull(lineBody), WoPackagingBox.LINE_BODY, lineBody); wrapper.eq(ObjectUtils.isNotNull(lineBody), WoPackagingBox.LINE_BODY, lineBody);
} }
if(params.get("lineBody")!=null) { if(params.get("printStatus")!=null) {
Integer printStatus = Integer.parseInt(params.get("printStatus").toString()); Integer printStatus = Integer.parseInt(params.get("printStatus").toString());
wrapper.eq(ObjectUtils.isNotNull(printStatus), WoPackagingBox.PRINT_STATUS, printStatus); wrapper.eq(ObjectUtils.isNotNull(printStatus), WoPackagingBox.PRINT_STATUS, printStatus);
} }
if(params.get("lineBody")!=null) { if(params.get("model")!=null) {
Integer model = Integer.parseInt(params.get("model").toString()); Integer model = Integer.parseInt(params.get("model").toString());
wrapper.eq(ObjectUtils.isNotNull(model), WoPackagingBox.MODEL, model); wrapper.eq(ObjectUtils.isNotNull(model), WoPackagingBox.MODEL, model);
} }
@@ -81,9 +80,10 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void save(WoPackagingBoxDTO dto) { public IdVo add(WoPackagingBoxDTO dto) {
WoPackagingBox entity = ConvertUtils.sourceToTarget(dto, WoPackagingBox.class); WoPackagingBox entity = ConvertUtils.sourceToTarget(dto, WoPackagingBox.class);
insert(entity); insert(entity);
return IdVo.builder().id(entity.getId()).build();
} }
@Override @Override