Compare commits
13 Commits
fed8f82ff0
...
cicd
| Author | SHA1 | Date | |
|---|---|---|---|
| ce721696fa | |||
|
|
41207394e5 | ||
|
|
14745366be | ||
| cade1cc1b9 | |||
| 8c0e43d9f7 | |||
| d44034c1db | |||
| 56b8b82fc2 | |||
|
|
31bc287207 | ||
|
|
bb8986c98d | ||
| 76cef5fc05 | |||
| 94a7b76157 | |||
| 74dd845b13 | |||
| 58adaa3c59 |
@@ -11,16 +11,16 @@ steps:
|
||||
- name: dockerconfig
|
||||
path: /root/.docker
|
||||
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
|
||||
image: harbor.picaiba.com/tools/kubectl
|
||||
commands:
|
||||
- echo "172.27.0.20 lb.kubesphere.local" >> /etc/hosts
|
||||
- sleep 1
|
||||
- kubectl scale --replicas=0 deployment/mes-api -n mes-india
|
||||
- kubectl scale --replicas=0 deployment/mes-api -n mes-cigs4
|
||||
- sleep 3
|
||||
- kubectl scale --replicas=1 deployment/mes-api -n mes-india
|
||||
- kubectl scale --replicas=1 deployment/mes-api -n mes-cigs4
|
||||
depends_on:
|
||||
- build
|
||||
|
||||
@@ -34,6 +34,6 @@ volumes:
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- porject/yd-monitor
|
||||
- master
|
||||
event:
|
||||
- push
|
||||
|
||||
@@ -49,7 +49,7 @@ ENV TZ="Asia/Shanghai"
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
# 定义一些环境变量,方便环境变量传参
|
||||
ENV JVM_OPTS=""
|
||||
ENV JAVA_OPTS="-Dspring.profiles.active=dev"
|
||||
ENV JAVA_OPTS=""
|
||||
# 指定暴露的端口,起到说明的作用,不指定也会暴露对应端口
|
||||
EXPOSE 8080
|
||||
# 启动 jar 的命令
|
||||
|
||||
@@ -61,14 +61,14 @@ dynamic:
|
||||
# username: root
|
||||
# password: 1qaz@WSX3edc$RFV
|
||||
## 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:
|
||||
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
|
||||
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:
|
||||
# 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
|
||||
@@ -150,12 +150,12 @@ public class KukaJoinThread implements ApplicationRunner {
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
|
||||
kukaStep1.scheduleAtFixedRate(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
logger.info("================= 现在开始执行 过程一 任务 ==================");
|
||||
}
|
||||
},1,1, TimeUnit.SECONDS);
|
||||
// kukaStep1.scheduleAtFixedRate(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// logger.info("================= 现在开始执行 过程一 任务 ==================");
|
||||
// }
|
||||
// },1,1, TimeUnit.SECONDS);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public class ChangePackagingBoxHistoryController {
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.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){
|
||||
PageData<ChangePackagingBoxHistoryDTO> page = changePackagingBoxHistoryService.page(params);
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ChangePackagingBoxHistoryController {
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("信息")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:info')")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:info')")
|
||||
public Result<ChangePackagingBoxHistoryDTO> get(@PathVariable("id") Long id){
|
||||
ChangePackagingBoxHistoryDTO data = changePackagingBoxHistoryService.get(id);
|
||||
|
||||
@@ -70,8 +70,8 @@ public class ChangePackagingBoxHistoryController {
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
// @LogOperation("保存")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:save')")
|
||||
@LogOperation("保存")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:save')")
|
||||
public Result<Long> save(@RequestBody ChangePackagingBoxHistoryDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
@@ -83,8 +83,8 @@ public class ChangePackagingBoxHistoryController {
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
// @LogOperation("修改")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:update')")
|
||||
@LogOperation("修改")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:update')")
|
||||
public Result<Long> update(@RequestBody ChangePackagingBoxHistoryDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
@@ -96,8 +96,8 @@ public class ChangePackagingBoxHistoryController {
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除")
|
||||
// @LogOperation("删除")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:delete')")
|
||||
@LogOperation("删除")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:delete')")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
@@ -109,8 +109,8 @@ public class ChangePackagingBoxHistoryController {
|
||||
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
// @LogOperation("导出")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:export')")
|
||||
@LogOperation("导出")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<ChangePackagingBoxHistoryDTO> list = changePackagingBoxHistoryService.list(params);
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.cnbm.packing.controller;
|
||||
|
||||
import com.cnbm.admin.annotation.LogOperation;
|
||||
import com.cnbm.admin.utils.CodeGeneratorHelper;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.utils.ExcelUtils;
|
||||
@@ -24,7 +23,6 @@ import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
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.ORDER_FIELD, value = "排序字段", 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){
|
||||
PageData<PrintModelDTO> page = printModelService.page(params);
|
||||
|
||||
@@ -60,7 +60,7 @@ public class PrintModelController {
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("信息")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:printModel:info')")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:printModel:info')")
|
||||
public Result<PrintModelDTO> get(@PathVariable("id") Long id){
|
||||
PrintModelDTO data = printModelService.get(id);
|
||||
|
||||
@@ -69,8 +69,8 @@ public class PrintModelController {
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
// @LogOperation("保存")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:printModel:save')")
|
||||
@LogOperation("保存")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:printModel:save')")
|
||||
public Result<Long> save(@RequestBody PrintModelDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
@@ -82,8 +82,8 @@ public class PrintModelController {
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
// @LogOperation("修改")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:printModel:update')")
|
||||
@LogOperation("修改")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:printModel:update')")
|
||||
public Result<Long> update(@RequestBody PrintModelDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
@@ -95,8 +95,8 @@ public class PrintModelController {
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除")
|
||||
// @LogOperation("删除")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:printModel:delete')")
|
||||
@LogOperation("删除")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:printModel:delete')")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
@@ -108,8 +108,8 @@ public class PrintModelController {
|
||||
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
// @LogOperation("导出")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:printModel:export')")
|
||||
@LogOperation("导出")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:printModel:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<PrintModelDTO> list = printModelService.list(params);
|
||||
|
||||
@@ -118,12 +118,10 @@ public class PrintModelController {
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取打印标签模板列表")
|
||||
// @LogOperation("获取打印标签模板列表")
|
||||
public List<PrintModelDTO> list() { return printModelService.list(); }
|
||||
|
||||
@PostMapping(value = "getCode")
|
||||
@ApiOperation(value = "获取标签编码")
|
||||
// @LogOperation("获取标签编码")
|
||||
public Result<String> getCode() {
|
||||
String code = printModelService.getCode();
|
||||
return new Result<String>().ok(code);
|
||||
|
||||
@@ -58,7 +58,7 @@ public class WoCompensationPowerController {
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("信息")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:info')")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:info')")
|
||||
public Result<WoCompensationPowerDTO> get(@PathVariable("id") Long id){
|
||||
WoCompensationPowerDTO data = woCompensationPowerService.get(id);
|
||||
|
||||
@@ -67,8 +67,8 @@ public class WoCompensationPowerController {
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
// @LogOperation("保存")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:save')")
|
||||
@LogOperation("保存")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:save')")
|
||||
public Result<Long> save(@RequestBody WoCompensationPowerDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
@@ -80,8 +80,8 @@ public class WoCompensationPowerController {
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
// @LogOperation("修改")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:update')")
|
||||
@LogOperation("修改")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:update')")
|
||||
public Result<Long> update(@RequestBody WoCompensationPowerDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
@@ -93,8 +93,8 @@ public class WoCompensationPowerController {
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除")
|
||||
// @LogOperation("删除")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:delete')")
|
||||
@LogOperation("删除")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:delete')")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
@@ -106,8 +106,8 @@ public class WoCompensationPowerController {
|
||||
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
// @LogOperation("导出")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:export')")
|
||||
@LogOperation("导出")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<WoCompensationPowerDTO> list = woCompensationPowerService.list(params);
|
||||
|
||||
@@ -116,7 +116,6 @@ public class WoCompensationPowerController {
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取基板补偿功率")
|
||||
// @LogOperation("获取基板补偿功率")
|
||||
public List<WoCompensationPowerDTO> list() { return woCompensationPowerService.list(); }
|
||||
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import com.cnbm.common.validator.ValidatorUtils;
|
||||
import com.cnbm.common.validator.group.AddGroup;
|
||||
import com.cnbm.common.validator.group.DefaultGroup;
|
||||
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.excel.WoPackagingBoxExcel;
|
||||
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 = "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){
|
||||
PageData<WoPackagingBoxDTO> page = woPackagingBoxService.page(params);
|
||||
|
||||
@@ -65,7 +65,7 @@ public class WoPackagingBoxController {
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("信息")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:info')")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:info')")
|
||||
public Result<WoPackagingBoxDTO> get(@PathVariable("id") Long id){
|
||||
WoPackagingBoxDTO data = woPackagingBoxService.get(id);
|
||||
|
||||
@@ -74,21 +74,19 @@ public class WoPackagingBoxController {
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
// @LogOperation("保存")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:save')")
|
||||
public Result<Long> save(@RequestBody WoPackagingBoxDTO dto){
|
||||
@LogOperation("保存")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:save')")
|
||||
public IdVo save(@RequestBody WoPackagingBoxDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
|
||||
woPackagingBoxService.save(dto);
|
||||
|
||||
return new Result<Long>().ok(dto.getId());
|
||||
return woPackagingBoxService.add(dto);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
// @LogOperation("修改")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:update')")
|
||||
@LogOperation("修改")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:update')")
|
||||
public Result<Long> update(@RequestBody WoPackagingBoxDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
@@ -100,8 +98,8 @@ public class WoPackagingBoxController {
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除")
|
||||
// @LogOperation("删除")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:delete')")
|
||||
@LogOperation("删除")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:delete')")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
@@ -113,8 +111,8 @@ public class WoPackagingBoxController {
|
||||
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
// @LogOperation("导出")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:export')")
|
||||
@LogOperation("导出")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<WoPackagingBoxDTO> list = woPackagingBoxService.list(params);
|
||||
|
||||
@@ -123,7 +121,6 @@ public class WoPackagingBoxController {
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取列表")
|
||||
// @LogOperation("获取列表")
|
||||
public List<WoPackagingBoxDTO> list() { return woPackagingBoxService.list(); }
|
||||
|
||||
@PostMapping(value = "printList/{id}")
|
||||
|
||||
@@ -64,7 +64,7 @@ public class WoPackagingBoxSubstrateController {
|
||||
@ApiImplicitParam(name = "packagingBoxId", value = "包装箱ID,BoxId", 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){
|
||||
PageData<WoPackagingBoxSubstrateDTO> page = woPackagingBoxSubstrateService.page(params);
|
||||
|
||||
@@ -73,7 +73,7 @@ public class WoPackagingBoxSubstrateController {
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("信息")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:info')")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:info')")
|
||||
public Result<WoPackagingBoxSubstrateDTO> get(@PathVariable("id") Long id){
|
||||
WoPackagingBoxSubstrateDTO data = woPackagingBoxSubstrateService.get(id);
|
||||
|
||||
@@ -82,8 +82,8 @@ public class WoPackagingBoxSubstrateController {
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
// @LogOperation("保存")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:save')")
|
||||
@LogOperation("保存")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:save')")
|
||||
public Result<Long> save(@RequestBody WoPackagingBoxSubstrateDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
@@ -95,8 +95,8 @@ public class WoPackagingBoxSubstrateController {
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
// @LogOperation("修改")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:update')")
|
||||
@LogOperation("修改")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:update')")
|
||||
public Result<Long> update(@RequestBody WoPackagingBoxSubstrateDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
@@ -108,8 +108,8 @@ public class WoPackagingBoxSubstrateController {
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除")
|
||||
// @LogOperation("删除")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:delete')")
|
||||
@LogOperation("删除")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:delete')")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
@@ -121,8 +121,8 @@ public class WoPackagingBoxSubstrateController {
|
||||
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
// @LogOperation("导出")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:export')")
|
||||
@LogOperation("导出")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<WoPackagingBoxSubstrateDTO> list = woPackagingBoxSubstrateService.list(params);
|
||||
|
||||
@@ -131,7 +131,7 @@ public class WoPackagingBoxSubstrateController {
|
||||
|
||||
@PostMapping("removeSubstrate/{id}")
|
||||
@ApiOperation("移箱")
|
||||
// @LogOperation("移箱")
|
||||
@LogOperation("移箱")
|
||||
public Result removeSubstrate(@PathVariable("id") Long id){
|
||||
|
||||
woPackagingBoxSubstrateService.removeSubstrate(id);
|
||||
@@ -141,7 +141,7 @@ public class WoPackagingBoxSubstrateController {
|
||||
|
||||
@PostMapping("insertSubstrate")
|
||||
@ApiOperation("合箱")
|
||||
// @LogOperation("合箱")
|
||||
@LogOperation("合箱")
|
||||
public Result insertSubstrate(@RequestBody ChangePackingBoxDTO dto){
|
||||
|
||||
String woSubstrateId = dto.getWoSubstrateId();
|
||||
@@ -171,7 +171,7 @@ public class WoPackagingBoxSubstrateController {
|
||||
boxQueryWrapper.eq(StringUtils.isNotBlank(packagingBoxId), WoPackagingBox.BOX_NO, packagingBoxId);
|
||||
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());
|
||||
woPackagingBoxSubstrateService.insertSubstrate(dto);
|
||||
@@ -184,7 +184,7 @@ public class WoPackagingBoxSubstrateController {
|
||||
|
||||
@PostMapping("replaceSubstrate")
|
||||
@ApiOperation("换箱")
|
||||
// @LogOperation("换箱")
|
||||
@LogOperation("换箱")
|
||||
public Result replaceSubstrate(@RequestBody ChangePackingBoxDTO[] dtos){
|
||||
|
||||
woPackagingBoxSubstrateService.replaceSubstrate(dtos);
|
||||
@@ -194,7 +194,6 @@ public class WoPackagingBoxSubstrateController {
|
||||
|
||||
@PostMapping("slotValidation")
|
||||
@ApiOperation("slot是否占用验证")
|
||||
// @LogOperation("slot是否占用验证")
|
||||
public boolean slotValidation(@RequestBody ChangePackingBoxDTO dto){
|
||||
|
||||
QueryWrapper<WoPackagingBoxSubstrate> wrapper = new QueryWrapper<>();
|
||||
@@ -210,7 +209,7 @@ public class WoPackagingBoxSubstrateController {
|
||||
|
||||
@PostMapping("insertSubstrateManual")
|
||||
@ApiOperation("手动装箱")
|
||||
// @LogOperation("手动装箱")
|
||||
@LogOperation("手动装箱")
|
||||
public Result insertSubstrateManual(@RequestBody ChangePackingBoxDTO dto){
|
||||
|
||||
woPackagingBoxSubstrateService.insertSubstrateManual(dto);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.cnbm.packing.controller;
|
||||
|
||||
import com.cnbm.admin.annotation.LogOperation;
|
||||
import com.cnbm.admin.enums.WhetherEnum;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
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.UpdateGroup;
|
||||
|
||||
import com.cnbm.packing.dto.WoPackagingBoxDTO;
|
||||
import com.cnbm.packing.dto.WoPackagingPrintHistoryDTO;
|
||||
import com.cnbm.packing.entity.WoPackagingBox;
|
||||
import com.cnbm.packing.excel.WoPackagingPrintHistoryExcel;
|
||||
import com.cnbm.packing.service.WoPackagingBoxServiceBiz;
|
||||
import com.cnbm.packing.service.WoPackagingPrintHistoryServiceBiz;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -46,8 +41,6 @@ import java.util.Map;
|
||||
public class WoPackagingPrintHistoryController {
|
||||
@Autowired
|
||||
private WoPackagingPrintHistoryServiceBiz woPackagingPrintHistoryService;
|
||||
@Autowired
|
||||
private WoPackagingBoxServiceBiz woPackagingBoxServiceBiz;
|
||||
|
||||
|
||||
@GetMapping("page")
|
||||
@@ -61,7 +54,7 @@ public class WoPackagingPrintHistoryController {
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.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){
|
||||
PageData<WoPackagingPrintHistoryDTO> page = woPackagingPrintHistoryService.page(params);
|
||||
|
||||
@@ -70,7 +63,7 @@ public class WoPackagingPrintHistoryController {
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("信息")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:info')")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:info')")
|
||||
public Result<WoPackagingPrintHistoryDTO> get(@PathVariable("id") Long id){
|
||||
WoPackagingPrintHistoryDTO data = woPackagingPrintHistoryService.get(id);
|
||||
|
||||
@@ -79,8 +72,8 @@ public class WoPackagingPrintHistoryController {
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
// @LogOperation("保存")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:save')")
|
||||
@LogOperation("保存")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:save')")
|
||||
public Result<Long> save(@RequestBody WoPackagingPrintHistoryDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
@@ -92,8 +85,8 @@ public class WoPackagingPrintHistoryController {
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
// @LogOperation("修改")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:update')")
|
||||
@LogOperation("修改")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:update')")
|
||||
public Result<Long> update(@RequestBody WoPackagingPrintHistoryDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
@@ -105,8 +98,8 @@ public class WoPackagingPrintHistoryController {
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除")
|
||||
// @LogOperation("删除")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:delete')")
|
||||
@LogOperation("删除")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:delete')")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
@@ -118,8 +111,8 @@ public class WoPackagingPrintHistoryController {
|
||||
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
// @LogOperation("导出")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:export')")
|
||||
@LogOperation("导出")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<WoPackagingPrintHistoryDTO> list = woPackagingPrintHistoryService.list(params);
|
||||
|
||||
@@ -127,8 +120,8 @@ public class WoPackagingPrintHistoryController {
|
||||
}
|
||||
|
||||
@PostMapping("print/{id}")
|
||||
@ApiOperation("打印记录")
|
||||
// @LogOperation("打印")
|
||||
@ApiOperation("打印记录新增")
|
||||
@LogOperation("打印记录新增")
|
||||
public Result<Long> print(@PathVariable("id") Long id) {
|
||||
|
||||
woPackagingPrintHistoryService.print(id);
|
||||
|
||||
@@ -49,7 +49,7 @@ public class WoPowerLevelController {
|
||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.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){
|
||||
PageData<WoPowerLevelDTO> page = woPowerLevelService.page(params);
|
||||
|
||||
@@ -58,7 +58,7 @@ public class WoPowerLevelController {
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("信息")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:info')")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:info')")
|
||||
public Result<WoPowerLevelDTO> get(@PathVariable("id") Long id){
|
||||
WoPowerLevelDTO data = woPowerLevelService.get(id);
|
||||
|
||||
@@ -67,8 +67,8 @@ public class WoPowerLevelController {
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
// @LogOperation("保存")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:save')")
|
||||
@LogOperation("保存")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:save')")
|
||||
public Result<Long> save(@RequestBody WoPowerLevelDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
@@ -80,8 +80,8 @@ public class WoPowerLevelController {
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
// @LogOperation("修改")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:update')")
|
||||
@LogOperation("修改")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:update')")
|
||||
public Result<Long> update(@RequestBody WoPowerLevelDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
@@ -93,8 +93,8 @@ public class WoPowerLevelController {
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除")
|
||||
// @LogOperation("删除")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:delete')")
|
||||
@LogOperation("删除")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:delete')")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
@@ -106,8 +106,8 @@ public class WoPowerLevelController {
|
||||
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
// @LogOperation("导出")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:export')")
|
||||
@LogOperation("导出")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<WoPowerLevelDTO> list = woPowerLevelService.list(params);
|
||||
|
||||
@@ -116,7 +116,6 @@ public class WoPowerLevelController {
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取功率等级")
|
||||
// @LogOperation("获取功率等级")
|
||||
public List<WoPowerLevelDTO> list() { return woPowerLevelService.list(); }
|
||||
|
||||
}
|
||||
32
ym-packing/src/main/java/com/cnbm/packing/dto/IdVo.java
Normal file
32
ym-packing/src/main/java/com/cnbm/packing/dto/IdVo.java
Normal 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;
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package com.cnbm.packing.service;
|
||||
|
||||
import com.cnbm.common.page.PageData;
|
||||
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.entity.WoPackagingBox;
|
||||
|
||||
@@ -21,7 +21,7 @@ public interface WoPackagingBoxServiceBiz extends CrudService<WoPackagingBox, Wo
|
||||
|
||||
WoPackagingBoxDTO get(Long id);
|
||||
|
||||
void save(WoPackagingBoxDTO dto);
|
||||
IdVo add(WoPackagingBoxDTO dto);
|
||||
|
||||
void update(WoPackagingBoxDTO dto);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cnbm.packing.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import com.cnbm.admin.utils.CodeGeneratorHelper;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
@@ -37,6 +38,14 @@ public class PrintModelServiceBizImpl extends CrudServiceImpl<PrintModelMapper,
|
||||
|
||||
QueryWrapper<PrintModel> wrapper = new QueryWrapper<>();
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -6,11 +6,10 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
import com.cnbm.common.utils.ConvertUtils;
|
||||
import com.cnbm.packing.dto.IdVo;
|
||||
import com.cnbm.packing.dto.WoPackagingBoxDTO;
|
||||
import com.cnbm.packing.entity.WoPackagingBox;
|
||||
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.WoPackagingBoxSubstrateMapper;
|
||||
import com.cnbm.packing.service.WoPackagingBoxServiceBiz;
|
||||
@@ -51,11 +50,11 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
|
||||
Integer lineBody = Integer.parseInt(params.get("lineBody").toString());
|
||||
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());
|
||||
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());
|
||||
wrapper.eq(ObjectUtils.isNotNull(model), WoPackagingBox.MODEL, model);
|
||||
}
|
||||
@@ -81,9 +80,10 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(WoPackagingBoxDTO dto) {
|
||||
public IdVo add(WoPackagingBoxDTO dto) {
|
||||
WoPackagingBox entity = ConvertUtils.sourceToTarget(dto, WoPackagingBox.class);
|
||||
insert(entity);
|
||||
return IdVo.builder().id(entity.getId()).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user