Compare commits
65 Commits
dda48c610f
...
yanyang
| Author | SHA1 | Date | |
|---|---|---|---|
| 32647c035c | |||
| 9546ceec03 | |||
| 3a583ac09f | |||
|
|
e149150b1d | ||
|
|
3d5e5e5845 | ||
|
|
5a9f5ee38b | ||
|
|
7c21dfe8e1 | ||
|
|
2bc72469a0 | ||
|
|
cafcdd65e0 | ||
| cc5848e5cd | |||
| 445c7c0c3f | |||
| 214f0a8ec9 | |||
|
|
74aaf857f0 | ||
|
|
353471b1f7 | ||
|
|
23aa6d5f89 | ||
| ea70ac4a6b | |||
| b6990dc4a0 | |||
|
|
8b14c369fb | ||
|
|
c1d37a3dbc | ||
| 5e32971f26 | |||
| 1ce177ab5d | |||
| 8b4e6b116e | |||
|
|
9b545a9a03 | ||
|
|
c75c89cab9 | ||
| 04e8cc187a | |||
| add0eea2ac | |||
|
|
69f911c07c | ||
|
|
5e8110ad2c | ||
|
|
7e3e028eb0 | ||
| 37f0dbe548 | |||
| b501e8cd98 | |||
| 98baf93cff | |||
|
|
ff63c194ee | ||
| 1173d670e4 | |||
| c7c43cd906 | |||
|
|
1798ba8d1d | ||
|
|
652812d3ba | ||
| 1562854e59 | |||
| d03a3e06a3 | |||
| c9d01c9e11 | |||
|
|
de3fe9b95c | ||
|
|
53f0c58507 | ||
| 95a82b042d | |||
| b15ad64d76 | |||
|
|
bf67380718 | ||
|
|
b93869c4a1 | ||
| 6829169a4a | |||
|
|
2d9b0ea1f1 | ||
| 0e3f0f9168 | |||
| b515eacbab | |||
|
|
515df64760 | ||
| ab35b10130 | |||
| 4864545f12 | |||
|
|
f7712f184a | ||
|
|
8bfcaaf429 | ||
|
|
650e9a2324 | ||
|
|
a2d91083f2 | ||
|
|
bd9276036b | ||
| 8a4f0094a1 | |||
| 1b9c3499a3 | |||
| e6b5583d05 | |||
| a3cc4df25c | |||
| 7abcafb93d | |||
| 559e76f6fb | |||
| fb65441dcc |
@@ -73,6 +73,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
"/webjars/**",
|
||||
"/websocket/**",
|
||||
"/influx/**",
|
||||
|
||||
// "/basic/**",
|
||||
// "/qualityPlanning/**",
|
||||
// "/processInspection/**",
|
||||
|
||||
@@ -44,13 +44,13 @@ public class SysRoleController {
|
||||
|
||||
@GetMapping("page")
|
||||
@ApiOperation("分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", 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, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) ,
|
||||
@ApiImplicitParam(name = "name", value = "角色名", paramType = "query", dataTypeClass=String.class)
|
||||
})
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", 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, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) ,
|
||||
// @ApiImplicitParam(name = "name", value = "角色名", paramType = "query", dataTypeClass=String.class)
|
||||
// })
|
||||
@PreAuthorize("@ex.hasAuthority('sys:role:page')")
|
||||
public Result<PageData<SysRoleDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
PageData<SysRoleDTO> page = sysRoleService.page(params);
|
||||
|
||||
@@ -160,4 +160,10 @@ public class SysUserController {
|
||||
|
||||
ExcelUtils.exportExcelToTarget(response, null, list, SysUserExcel.class);
|
||||
}
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取用户列表")
|
||||
@LogOperation("获取用户列表")
|
||||
public List<SysUserDTO> list(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||
return sysUserService.list(params); }
|
||||
}
|
||||
|
||||
@@ -124,4 +124,10 @@ public class FactoryController {
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取工厂列表")
|
||||
@LogOperation("获取工厂列表")
|
||||
public List<FactoryDTO> list() {
|
||||
return factoryService.list();
|
||||
}
|
||||
}
|
||||
@@ -125,4 +125,18 @@ public class FeaturesStageProcedureRelationController {
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@DeleteMapping("deleteByStageProcedure")
|
||||
@ApiOperation("删除 依据工序id 检验阶段")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "productId", value = "产品", paramType = "query", dataTypeClass = Long.class),
|
||||
@ApiImplicitParam(name = "inspectionStage", value = "检测阶段", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "workingProcedureId", value = "工序", paramType = "query", dataTypeClass = Long.class)
|
||||
})
|
||||
public Result deleteByStageProcedure(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
|
||||
featuresStageProcedureRelationService.deleteByStageProcedure(params);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,6 +48,8 @@ public class MachineController {
|
||||
@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 = "code", value = "编码", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class)
|
||||
})
|
||||
@PreAuthorize("@ex.hasAuthority('basic:machine:page')")
|
||||
@@ -142,4 +144,12 @@ public class MachineController {
|
||||
return new Result().ok(true);
|
||||
}
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取机台列表")
|
||||
@LogOperation("获取机台列表")
|
||||
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class)
|
||||
public List<MachineDTO> list(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||
return machineService.list(params);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,6 +48,8 @@ public class PlatformController {
|
||||
@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 = "code", value = "编码", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class)
|
||||
})
|
||||
@PreAuthorize("@ex.hasAuthority('basic:platform:page')")
|
||||
|
||||
@@ -129,4 +129,11 @@ public class ProductController {
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取产品列表")
|
||||
@LogOperation("获取产品列表")
|
||||
public List<ProductDTO> list() {
|
||||
return productService.list();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cnbm.basic.controller;
|
||||
|
||||
import com.cnbm.admin.annotation.LogOperation;
|
||||
import com.cnbm.basic.dto.ProductWorkingprocedureRelationDTO;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.utils.ExcelUtils;
|
||||
@@ -114,4 +115,14 @@ public class ProductFactoryRelationController {
|
||||
ExcelUtils.exportExcelToTarget(response, null, list, ProductFactoryRelationExcel.class);
|
||||
}
|
||||
|
||||
@PostMapping("batchInsertFactory")
|
||||
@ApiOperation("添加多个工厂关联")
|
||||
@LogOperation("添加多个工厂关联")
|
||||
public Result batchInsertFactory(@RequestBody ProductFactoryRelationDTO[] lists){
|
||||
|
||||
productFactoryRelationService.batchInsertFactory(lists);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package com.cnbm.basic.controller;
|
||||
|
||||
import com.cnbm.admin.annotation.LogOperation;
|
||||
import com.cnbm.admin.params.IdParam;
|
||||
import com.cnbm.basic.dto.WorkingProcedureDTO;
|
||||
import com.cnbm.basic.dto.*;
|
||||
import com.cnbm.basic.entity.ProductFeatures;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
@@ -13,7 +13,6 @@ 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.basic.dto.ProductFeaturesDTO;
|
||||
import com.cnbm.basic.excel.ProductFeaturesExcel;
|
||||
import com.cnbm.basic.service.IProductFeaturesService;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -110,11 +109,15 @@ public class ProductFeaturesController {
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
@LogOperation("导出")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "productId", value = "产品", paramType = "query", dataTypeClass = Long.class),
|
||||
@ApiImplicitParam(name = "inspectionStage", value = "检测阶段", paramType = "query", dataTypeClass = Integer.class)
|
||||
})
|
||||
@PreAuthorize("@ex.hasAuthority('basic:productFeatures:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<ProductFeaturesDTO> list = productFeaturesService.list(params);
|
||||
List<ProductFeaturesDTO> list = productFeaturesService.getFeaturesList(params);
|
||||
|
||||
ExcelUtils.exportExcelToTarget(response, null, list, ProductFeaturesExcel.class);
|
||||
ExcelUtils.exportExcelToTarget(response, "ProductFeatures", list, ProductFeaturesExcel.class);
|
||||
}
|
||||
|
||||
@PostMapping("getProductFeaturesByProductId")
|
||||
@@ -125,14 +128,48 @@ public class ProductFeaturesController {
|
||||
}
|
||||
|
||||
@PostMapping("getFeaturesByStageProcedure")
|
||||
@ApiOperation("查询产品特性 依据工序id 检验阶段")
|
||||
@ApiOperation("查询依据工序id 检验阶段")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "inspectionStage", value = "检测阶段", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "workingProcedureId", value = "工序", paramType = "query", dataTypeClass = Long.class)
|
||||
@ApiImplicitParam(name = "productId", value = "产品", paramType = "query", dataTypeClass = Long.class),
|
||||
//@ApiImplicitParam(name = "workingProcedureId", value = "工序", paramType = "query", dataTypeClass = Long.class),
|
||||
@ApiImplicitParam(name = "inspectionStage", value = "检测阶段", paramType = "query", dataTypeClass = Integer.class)
|
||||
})
|
||||
public Result<List<ProductFeaturesDTO>> getFeaturesByStageProcedure(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
List<ProductFeaturesDTO> list = productFeaturesService.getFeaturesByStageProcedure(params);
|
||||
public Result<List<FeaturesProcedureDTO>> getFeaturesByStageProcedure(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
List<FeaturesProcedureDTO> list = productFeaturesService.getFeaturesByStageProcedure(params);
|
||||
return new Result<List<FeaturesProcedureDTO>>().ok(list);
|
||||
}
|
||||
|
||||
@PutMapping("batchUpdate")
|
||||
@ApiOperation("批量更新特性")
|
||||
public Result batchUpdate(@RequestBody ProductFeaturesDTO[] lists){
|
||||
|
||||
productFeaturesService.batchUpdate(lists);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@PostMapping("getFeaturesList")
|
||||
@ApiOperation("特性列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "productId", value = "产品", paramType = "query", dataTypeClass = Long.class),
|
||||
@ApiImplicitParam(name = "inspectionStage", value = "检测阶段", paramType = "query", dataTypeClass = Integer.class)
|
||||
})
|
||||
public Result<List<ProductFeaturesDTO>> getFeaturesList(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
List<ProductFeaturesDTO> list = productFeaturesService.getFeaturesList(params);
|
||||
return new Result<List<ProductFeaturesDTO>>().ok(list);
|
||||
}
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取特性列表")
|
||||
@LogOperation("获取特性列表")
|
||||
public List<ProductFeaturesDTO> list() {
|
||||
return productFeaturesService.list();
|
||||
}
|
||||
|
||||
@PostMapping("getProductFeaturesByType")
|
||||
@ApiOperation("根据特性类型 获取特性列表 计量型1 计数型2")
|
||||
public List<ProductFeaturesDTO> getProductFeaturesByType(Integer type){
|
||||
return productFeaturesService.getProductFeaturesByType(type);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.cnbm.basic.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import com.cnbm.admin.annotation.LogOperation;
|
||||
import com.cnbm.admin.params.IdParam;
|
||||
import com.cnbm.basic.dto.SequenceDTO;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.utils.ExcelUtils;
|
||||
@@ -75,7 +78,12 @@ public class ProductWorkingprocedureRelationController {
|
||||
|
||||
productWorkingprocedureRelationService.save(dto);
|
||||
|
||||
return new Result();
|
||||
if(ObjectUtils.isNotNull(dto.getWorkingProcedureId())) {
|
||||
return new Result();
|
||||
}
|
||||
else{
|
||||
return new Result().error(1,"该工艺已经绑定");
|
||||
}
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@@ -133,4 +141,30 @@ public class ProductWorkingprocedureRelationController {
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@PutMapping("sequenceUp")
|
||||
@ApiOperation("产品工序上移")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "productId", value = "产品", paramType = "query", dataTypeClass = Long.class),
|
||||
// @ApiImplicitParam(name = "index", value = "产品工序序号", paramType = "query", dataTypeClass = Integer.class)
|
||||
// })
|
||||
public Result sequenceUp(@RequestBody SequenceDTO sequenceDTO){
|
||||
|
||||
productWorkingprocedureRelationService.sequenceUp(sequenceDTO);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@PutMapping("sequenceDown")
|
||||
@ApiOperation("产品工序下移")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "productId", value = "产品", paramType = "query", dataTypeClass = Long.class),
|
||||
// @ApiImplicitParam(name = "index", value = "产品工序序号", paramType = "query", dataTypeClass = Integer.class)
|
||||
// })
|
||||
public Result sequenceDown(@RequestBody SequenceDTO sequenceDTO){
|
||||
|
||||
productWorkingprocedureRelationService.sequenceDown(sequenceDTO);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -114,4 +114,11 @@ public class ShiftController {
|
||||
ExcelUtils.exportExcelToTarget(response, null, list, ShiftExcel.class);
|
||||
}
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取班次列表")
|
||||
@LogOperation("获取班次列表")
|
||||
public List<ShiftDTO> list() {
|
||||
return shiftService.list();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cnbm.basic.controller;
|
||||
|
||||
import com.cnbm.admin.annotation.LogOperation;
|
||||
import com.cnbm.basic.dto.ShiftDTO;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.utils.ExcelUtils;
|
||||
@@ -114,4 +115,9 @@ public class TeamController {
|
||||
ExcelUtils.exportExcelToTarget(response, null, list, TeamExcel.class);
|
||||
}
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取班组列表")
|
||||
@LogOperation("获取班组列表")
|
||||
public List<TeamDTO> list() { return teamService.list(); }
|
||||
|
||||
}
|
||||
@@ -50,6 +50,8 @@ public class UnitController {
|
||||
@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 = "code", value = "编码", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class)
|
||||
})
|
||||
@PreAuthorize("@ex.hasAuthority('basic:unit:page')")
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.cnbm.basic.controller;
|
||||
import com.cnbm.admin.annotation.LogOperation;
|
||||
import com.cnbm.admin.params.IdParam;
|
||||
import com.cnbm.basic.dto.UnitDTO;
|
||||
import com.cnbm.basic.dto.WorkingProcedureTypeDTO;
|
||||
import com.cnbm.basic.entity.WorkingProcedure;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.utils.ExcelUtils;
|
||||
@@ -141,4 +143,15 @@ public class WorkingProcedureController {
|
||||
return workingProcedureService.list();
|
||||
}
|
||||
|
||||
@PostMapping(value = "listByType/{typeId}")
|
||||
@ApiOperation(value = "根据工序类型 获取工序列表")
|
||||
public List<WorkingProcedure> listByType(@PathVariable("typeId") Long typeId) {
|
||||
return workingProcedureService.listByType(typeId);
|
||||
}
|
||||
|
||||
@PostMapping(value = "listWithType")
|
||||
@ApiOperation(value = "工序类型及对应工序列表")
|
||||
public List<WorkingProcedureTypeDTO> listWithType () {
|
||||
return workingProcedureService.listWithType();
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,8 @@ public class WorkingProcedureTypeController {
|
||||
@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 = "code", value = "编码", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class)
|
||||
})
|
||||
@PreAuthorize("@ex.hasAuthority('basic:workingProcedureType:page')")
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cnbm.basic.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "工艺特性-工序 DTO对象")
|
||||
public class FeaturesProcedureDTO implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "检验参数id,关联product_features表")
|
||||
private Long productFeaturesId;
|
||||
|
||||
@ApiModelProperty(value = "工序id,关联 working_procedure 表")
|
||||
private Long workingProcedureId;
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@@ -82,4 +83,7 @@ public class ProductDTO implements Serializable {
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@ApiModelProperty(value = "工厂")
|
||||
private List<Long> factoryList;
|
||||
|
||||
}
|
||||
@@ -19,7 +19,6 @@ public class ProductFeaturesDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "ID")
|
||||
private Long id;
|
||||
|
||||
@@ -113,4 +112,10 @@ public class ProductFeaturesDTO implements Serializable {
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@ApiModelProperty(value = "工序id,关联 working_procedure 表")
|
||||
private Long workingProcedureId;
|
||||
|
||||
@ApiModelProperty(value = "工序 名,关联working_procedure表")
|
||||
private String workingProcedureName;
|
||||
|
||||
}
|
||||
@@ -42,6 +42,30 @@ public class ProductWorkingprocedureRelationDTO implements Serializable {
|
||||
@ApiModelProperty(value = "1 可用,0 不可用")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "node.shape")
|
||||
private String shape;
|
||||
|
||||
@ApiModelProperty(value = "node.x")
|
||||
private Integer x;
|
||||
|
||||
@ApiModelProperty(value = "node.y")
|
||||
private Integer y;
|
||||
|
||||
@ApiModelProperty(value = "node.width")
|
||||
private Integer width;
|
||||
|
||||
@ApiModelProperty(value = "node.width")
|
||||
private Integer height;
|
||||
|
||||
@ApiModelProperty(value = "node.lable")
|
||||
private String lable;
|
||||
|
||||
@ApiModelProperty(value = "字体颜色")
|
||||
private String fontcolor;
|
||||
|
||||
@ApiModelProperty(value = "背景颜色")
|
||||
private String backcolor;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
18
ym-baisc/src/main/java/com/cnbm/basic/dto/SequenceDTO.java
Normal file
18
ym-baisc/src/main/java/com/cnbm/basic/dto/SequenceDTO.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package com.cnbm.basic.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "顺序更新参数")
|
||||
public class SequenceDTO implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "产品id")
|
||||
private Long productId;
|
||||
|
||||
@ApiModelProperty(value = "产品工序序号")
|
||||
private Integer index;
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.cnbm.basic.dto;
|
||||
|
||||
import com.cnbm.basic.entity.WorkingProcedure;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工序类型表 表
|
||||
@@ -59,4 +61,7 @@ public class WorkingProcedureTypeDTO implements Serializable {
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@ApiModelProperty(value = "工序列表")
|
||||
private List<WorkingProcedure> workingProcedureList;
|
||||
|
||||
}
|
||||
@@ -40,7 +40,6 @@ public class FeaturesStageProcedureRelation implements Serializable {
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
|
||||
@@ -38,6 +38,30 @@ public class ProductWorkingprocedureRelation implements Serializable {
|
||||
@ApiModelProperty("1 可用,0 不可用")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("node.shape")
|
||||
private String shape;
|
||||
|
||||
@ApiModelProperty("node.x")
|
||||
private Integer x;
|
||||
|
||||
@ApiModelProperty("node.y")
|
||||
private Integer y;
|
||||
|
||||
@ApiModelProperty("node.width")
|
||||
private Integer width;
|
||||
|
||||
@ApiModelProperty("node.width")
|
||||
private Integer height;
|
||||
|
||||
@ApiModelProperty("node.lable")
|
||||
private String lable;
|
||||
|
||||
@ApiModelProperty("字体颜色")
|
||||
private String fontcolor;
|
||||
|
||||
@ApiModelProperty("背景颜色")
|
||||
private String backcolor;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
@@ -23,6 +23,22 @@ public class ProductWorkingprocedureRelationExcel {
|
||||
private Integer sequence;
|
||||
@Excel(name = "1 可用,0 不可用")
|
||||
private Integer status;
|
||||
@Excel(name = "node.shape")
|
||||
private String shape;
|
||||
@Excel(name = "node.x")
|
||||
private Integer x;
|
||||
@Excel(name = "node.y")
|
||||
private Integer y;
|
||||
@Excel(name = "node.width")
|
||||
private Integer width;
|
||||
@Excel(name = "node.width")
|
||||
private Integer height;
|
||||
@Excel(name = "node.lable")
|
||||
private String lable;
|
||||
@Excel(name = "字体颜色")
|
||||
private String fontcolor;
|
||||
@Excel(name = "背景颜色")
|
||||
private String backcolor;
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
@Excel(name = "删除标志,是否有效:1 可用 0不可用")
|
||||
|
||||
@@ -17,4 +17,5 @@ import java.util.Map;
|
||||
@Mapper
|
||||
public interface FeaturesStageProcedureRelationMapper extends BaseDao<FeaturesStageProcedureRelation> {
|
||||
|
||||
void deleteByStageProcedure(Map<String, Object> params);
|
||||
}
|
||||
@@ -4,6 +4,8 @@ import com.cnbm.common.dao.BaseDao;
|
||||
import com.cnbm.basic.entity.ProductFactoryRelation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品-工厂 关系表
|
||||
*
|
||||
@@ -12,5 +14,5 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductFactoryRelationMapper extends BaseDao<ProductFactoryRelation> {
|
||||
|
||||
List<Long> getFactoryListByProductId(Long productId);
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cnbm.basic.mapper;
|
||||
|
||||
import com.cnbm.basic.dto.FeaturesProcedureDTO;
|
||||
import com.cnbm.basic.dto.FeaturesStageProcedureRelationDTO;
|
||||
import com.cnbm.basic.dto.ProductFeaturesDTO;
|
||||
import com.cnbm.common.dao.BaseDao;
|
||||
import com.cnbm.basic.entity.ProductFeatures;
|
||||
@@ -18,5 +20,13 @@ import java.util.Map;
|
||||
public interface ProductFeaturesMapper extends BaseDao<ProductFeatures> {
|
||||
List<ProductFeaturesDTO> getProductFeaturesByProductId(Long id);
|
||||
|
||||
List<ProductFeaturesDTO> getFeaturesByStageProcedure(Map<String, Object> params);
|
||||
List<FeaturesProcedureDTO> getFeaturesByStageProcedure(Map<String, Object> params);
|
||||
|
||||
List<ProductFeaturesDTO> getFeaturesList(Map<String, Object> params);
|
||||
|
||||
String getControlGraphNameById(Long id);
|
||||
|
||||
List<ProductFeaturesDTO> list();
|
||||
|
||||
List<ProductFeaturesDTO> getProductFeaturesByType(Integer type);
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.cnbm.basic.entity.Product;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -18,4 +19,5 @@ import java.util.Map;
|
||||
@Mapper
|
||||
public interface ProductMapper extends BaseDao<Product> {
|
||||
// IPage<ProductDTO> page(Map<String, Object> params);
|
||||
List<ProductDTO> list();
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.cnbm.basic.mapper;
|
||||
|
||||
import com.cnbm.basic.dto.ProductWorkingprocedureRelationDTO;
|
||||
import com.cnbm.common.dao.BaseDao;
|
||||
import com.cnbm.basic.entity.ProductWorkingprocedureRelation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工序 表
|
||||
*
|
||||
@@ -12,5 +15,5 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductWorkingprocedureRelationMapper extends BaseDao<ProductWorkingprocedureRelation> {
|
||||
|
||||
List<ProductWorkingprocedureRelationDTO> getWorkingprocedureByProductId(Long productId);
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.cnbm.basic.mapper;
|
||||
|
||||
import com.cnbm.basic.dto.ShiftDTO;
|
||||
import com.cnbm.common.dao.BaseDao;
|
||||
import com.cnbm.basic.entity.Shift;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班次 表
|
||||
*
|
||||
@@ -12,5 +15,6 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
*/
|
||||
@Mapper
|
||||
public interface ShiftMapper extends BaseDao<Shift> {
|
||||
|
||||
|
||||
List<ShiftDTO> list();
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.cnbm.basic.mapper;
|
||||
|
||||
import com.cnbm.basic.dto.TeamDTO;
|
||||
import com.cnbm.common.dao.BaseDao;
|
||||
import com.cnbm.basic.entity.Team;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班组 表
|
||||
*
|
||||
@@ -12,5 +15,6 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
*/
|
||||
@Mapper
|
||||
public interface TeamMapper extends BaseDao<Team> {
|
||||
|
||||
|
||||
List<TeamDTO> list();
|
||||
}
|
||||
@@ -1,9 +1,13 @@
|
||||
package com.cnbm.basic.mapper;
|
||||
|
||||
import com.cnbm.basic.dto.WorkingProcedureDTO;
|
||||
import com.cnbm.basic.dto.WorkingProcedureTypeDTO;
|
||||
import com.cnbm.common.dao.BaseDao;
|
||||
import com.cnbm.basic.entity.WorkingProcedureType;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工序类型表 表
|
||||
*
|
||||
@@ -12,5 +16,6 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
*/
|
||||
@Mapper
|
||||
public interface WorkingProcedureTypeMapper extends BaseDao<WorkingProcedureType> {
|
||||
|
||||
|
||||
List<WorkingProcedureTypeDTO> list();
|
||||
}
|
||||
@@ -26,4 +26,6 @@ public interface IFeaturesStageProcedureRelationService extends CrudService<Feat
|
||||
void delete(Long[] ids);
|
||||
|
||||
void batchInsert(FeaturesStageProcedureRelationDTO[] lists);
|
||||
|
||||
void deleteByStageProcedure(Map<String, Object> params);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cnbm.basic.service;
|
||||
|
||||
import com.cnbm.basic.dto.ProductWorkingprocedureRelationDTO;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.CrudService;
|
||||
import com.cnbm.basic.dto.ProductFactoryRelationDTO;
|
||||
@@ -25,4 +26,6 @@ public interface IProductFactoryRelationService extends CrudService<ProductFacto
|
||||
|
||||
void delete(Long[] ids);
|
||||
|
||||
void batchInsertFactory(ProductFactoryRelationDTO[] lists);
|
||||
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cnbm.basic.service;
|
||||
|
||||
import com.cnbm.basic.dto.FactoryDTO;
|
||||
import com.cnbm.basic.dto.FeaturesProcedureDTO;
|
||||
import com.cnbm.basic.dto.FeaturesStageProcedureRelationDTO;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.CrudService;
|
||||
@@ -28,5 +30,13 @@ public interface IProductFeaturesService extends CrudService<ProductFeatures, Pr
|
||||
|
||||
List<ProductFeaturesDTO> getProductFeaturesByProductId(Long id);
|
||||
|
||||
List<ProductFeaturesDTO> getFeaturesByStageProcedure(Map<String, Object> params);
|
||||
List<FeaturesProcedureDTO> getFeaturesByStageProcedure(Map<String, Object> params);
|
||||
|
||||
void batchUpdate(ProductFeaturesDTO[] lists);
|
||||
|
||||
List<ProductFeaturesDTO> getFeaturesList(Map<String, Object> params);
|
||||
|
||||
List<ProductFeaturesDTO> list();
|
||||
|
||||
List<ProductFeaturesDTO> getProductFeaturesByType(Integer type);
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import com.cnbm.basic.dto.ProductDTO;
|
||||
import com.cnbm.basic.entity.Product;
|
||||
import com.cnbm.common.vo.IdVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -27,4 +28,6 @@ public interface IProductService extends CrudService<Product, ProductDTO> {
|
||||
|
||||
boolean changeStatus(Long id);
|
||||
|
||||
List<ProductDTO> list();
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cnbm.basic.service;
|
||||
|
||||
import com.cnbm.basic.dto.SequenceDTO;
|
||||
import com.cnbm.basic.dto.WorkingProcedureDTO;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.CrudService;
|
||||
@@ -29,4 +30,8 @@ public interface IProductWorkingprocedureRelationService extends CrudService<Pro
|
||||
List<ProductWorkingprocedureRelationDTO> getWorkingprocedureByProductId(Long productId);
|
||||
|
||||
void batchInsertWorkingprocedure(ProductWorkingprocedureRelationDTO[] lists);
|
||||
|
||||
void sequenceUp(SequenceDTO sequenceDTO);
|
||||
|
||||
void sequenceDown(SequenceDTO sequenceDTO);
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import com.cnbm.common.service.CrudService;
|
||||
import com.cnbm.basic.dto.ShiftDTO;
|
||||
import com.cnbm.basic.entity.Shift;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -23,4 +24,6 @@ public interface IShiftService extends CrudService<Shift, ShiftDTO> {
|
||||
void update(ShiftDTO dto);
|
||||
|
||||
void delete(Long[] ids);
|
||||
|
||||
List<ShiftDTO> list();
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import com.cnbm.common.service.CrudService;
|
||||
import com.cnbm.basic.dto.TeamDTO;
|
||||
import com.cnbm.basic.entity.Team;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -23,4 +24,6 @@ public interface ITeamService extends CrudService<Team, TeamDTO> {
|
||||
void update(TeamDTO dto);
|
||||
|
||||
void delete(Long[] ids);
|
||||
|
||||
List<TeamDTO> list();
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cnbm.basic.service;
|
||||
|
||||
import com.cnbm.basic.dto.WorkingProcedureTypeDTO;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.CrudService;
|
||||
import com.cnbm.basic.dto.WorkingProcedureDTO;
|
||||
@@ -30,4 +31,8 @@ public interface IWorkingProcedureService extends CrudService<WorkingProcedure,
|
||||
List<WorkingProcedureDTO> getWorkingProcedureByProductId(Long productId);
|
||||
|
||||
List<WorkingProcedureDTO> list();
|
||||
|
||||
List<WorkingProcedure> listByType(Long typeId);
|
||||
|
||||
List<WorkingProcedureTypeDTO> listWithType();
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.cnbm.basic.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.BaseSupportUtils;
|
||||
import com.cnbm.basic.dto.MachineDTO;
|
||||
import com.cnbm.basic.dto.ProductTypeDTO;
|
||||
import com.cnbm.basic.entity.ProductType;
|
||||
@@ -67,6 +68,7 @@ public class FactoryServiceImpl extends CrudServiceImpl<FactoryMapper, Factory,
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(FactoryDTO dto) {
|
||||
Factory entity = ConvertUtils.sourceToTarget(dto, Factory.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
|
||||
@@ -74,6 +76,7 @@ public class FactoryServiceImpl extends CrudServiceImpl<FactoryMapper, Factory,
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(FactoryDTO dto) {
|
||||
Factory entity = ConvertUtils.sourceToTarget(dto, Factory.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.cnbm.basic.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.BaseSupportUtils;
|
||||
import com.cnbm.basic.dto.ProductFeaturesDTO;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
@@ -64,6 +65,7 @@ public class FeaturesStageProcedureRelationServiceImpl extends CrudServiceImpl<F
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(FeaturesStageProcedureRelationDTO dto) {
|
||||
FeaturesStageProcedureRelation entity = ConvertUtils.sourceToTarget(dto, FeaturesStageProcedureRelation.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
|
||||
@@ -71,6 +73,7 @@ public class FeaturesStageProcedureRelationServiceImpl extends CrudServiceImpl<F
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(FeaturesStageProcedureRelationDTO dto) {
|
||||
FeaturesStageProcedureRelation entity = ConvertUtils.sourceToTarget(dto, FeaturesStageProcedureRelation.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@@ -86,8 +89,17 @@ public class FeaturesStageProcedureRelationServiceImpl extends CrudServiceImpl<F
|
||||
public void batchInsert(FeaturesStageProcedureRelationDTO[] lists) {
|
||||
for(FeaturesStageProcedureRelationDTO dto:lists){
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
BaseSupportUtils.setCommonField(dto);
|
||||
save(dto);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteByStageProcedure(Map<String, Object> params){
|
||||
|
||||
mapper.deleteByStageProcedure(params);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.cnbm.admin.utils.BaseSupportUtils;
|
||||
import com.cnbm.basic.entity.Platform;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
@@ -12,6 +13,7 @@ import com.cnbm.basic.mapper.MachineMapper;
|
||||
import com.cnbm.basic.entity.Machine;
|
||||
import com.cnbm.basic.service.IMachineService;
|
||||
import com.cnbm.common.utils.ConvertUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -36,8 +38,12 @@ public class MachineServiceImpl extends CrudServiceImpl<MachineMapper, Machine,
|
||||
|
||||
@Override
|
||||
public QueryWrapper<Machine> getWrapper(Map<String, Object> params){
|
||||
String name = (String)params.get("name");
|
||||
String code = (String)params.get("code");
|
||||
|
||||
QueryWrapper<Machine> wrapper = new QueryWrapper<>();
|
||||
wrapper.like(StringUtils.isNotBlank(name), "name", name);
|
||||
wrapper.like(StringUtils.isNotBlank(code), "code", code);
|
||||
wrapper.eq(ObjectUtils.isNotNull(params.get("status")), "status", params.get("status"));
|
||||
|
||||
return wrapper;
|
||||
@@ -90,6 +96,7 @@ public class MachineServiceImpl extends CrudServiceImpl<MachineMapper, Machine,
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(MachineDTO dto) {
|
||||
Machine entity = ConvertUtils.sourceToTarget(dto, Machine.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
|
||||
@@ -97,6 +104,7 @@ public class MachineServiceImpl extends CrudServiceImpl<MachineMapper, Machine,
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(MachineDTO dto) {
|
||||
Machine entity = ConvertUtils.sourceToTarget(dto, Machine.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.cnbm.basic.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.BaseSupportUtils;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
import com.cnbm.basic.dto.MeasureToolDTO;
|
||||
@@ -61,6 +62,7 @@ public class MeasureToolServiceImpl extends CrudServiceImpl<MeasureToolMapper, M
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(MeasureToolDTO dto) {
|
||||
MeasureTool entity = ConvertUtils.sourceToTarget(dto, MeasureTool.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
|
||||
@@ -68,6 +70,7 @@ public class MeasureToolServiceImpl extends CrudServiceImpl<MeasureToolMapper, M
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(MeasureToolDTO dto) {
|
||||
MeasureTool entity = ConvertUtils.sourceToTarget(dto, MeasureTool.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.cnbm.basic.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.BaseSupportUtils;
|
||||
import com.cnbm.basic.dto.FactoryDTO;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
@@ -34,8 +35,12 @@ private PlatformMapper mapper;
|
||||
|
||||
@Override
|
||||
public QueryWrapper<Platform> getWrapper(Map<String, Object> params){
|
||||
String name = (String)params.get("name");
|
||||
String code = (String)params.get("code");
|
||||
|
||||
QueryWrapper<Platform> wrapper = new QueryWrapper<>();
|
||||
wrapper.like(StringUtils.isNotBlank(name), "name", name);
|
||||
wrapper.like(StringUtils.isNotBlank(code), "code", code);
|
||||
wrapper.eq(ObjectUtils.isNotNull(params.get("status")), "status", params.get("status"));
|
||||
|
||||
return wrapper;
|
||||
@@ -60,6 +65,7 @@ private PlatformMapper mapper;
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(PlatformDTO dto) {
|
||||
Platform entity = ConvertUtils.sourceToTarget(dto, Platform.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
|
||||
@@ -67,6 +73,7 @@ private PlatformMapper mapper;
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(PlatformDTO dto) {
|
||||
Platform entity = ConvertUtils.sourceToTarget(dto, Platform.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.cnbm.basic.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.cnbm.admin.utils.BaseSupportUtils;
|
||||
import com.cnbm.basic.dto.ProductWorkingprocedureRelationDTO;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
import com.cnbm.basic.dto.ProductFactoryRelationDTO;
|
||||
@@ -9,6 +11,9 @@ import com.cnbm.basic.mapper.ProductFactoryRelationMapper;
|
||||
import com.cnbm.basic.entity.ProductFactoryRelation;
|
||||
import com.cnbm.basic.service.IProductFactoryRelationService;
|
||||
import com.cnbm.common.utils.ConvertUtils;
|
||||
import com.cnbm.common.validator.ValidatorUtils;
|
||||
import com.cnbm.common.validator.group.AddGroup;
|
||||
import com.cnbm.common.validator.group.DefaultGroup;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -54,6 +59,7 @@ public class ProductFactoryRelationServiceImpl extends CrudServiceImpl<ProductFa
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(ProductFactoryRelationDTO dto) {
|
||||
ProductFactoryRelation entity = ConvertUtils.sourceToTarget(dto, ProductFactoryRelation.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
|
||||
@@ -61,6 +67,7 @@ public class ProductFactoryRelationServiceImpl extends CrudServiceImpl<ProductFa
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(ProductFactoryRelationDTO dto) {
|
||||
ProductFactoryRelation entity = ConvertUtils.sourceToTarget(dto, ProductFactoryRelation.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@@ -71,4 +78,14 @@ public class ProductFactoryRelationServiceImpl extends CrudServiceImpl<ProductFa
|
||||
deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void batchInsertFactory(ProductFactoryRelationDTO[] lists) {
|
||||
for(ProductFactoryRelationDTO dto:lists){
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
BaseSupportUtils.setCommonField(dto);
|
||||
save(dto);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.cnbm.basic.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.cnbm.admin.utils.BaseSupportUtils;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
import com.cnbm.basic.dto.ProductFeaturesHisDTO;
|
||||
@@ -55,6 +56,7 @@ public class ProductFeaturesHisServiceImpl extends CrudServiceImpl<ProductFeatur
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(ProductFeaturesHisDTO dto) {
|
||||
ProductFeaturesHis entity = ConvertUtils.sourceToTarget(dto, ProductFeaturesHis.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
|
||||
@@ -62,6 +64,7 @@ public class ProductFeaturesHisServiceImpl extends CrudServiceImpl<ProductFeatur
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(ProductFeaturesHisDTO dto) {
|
||||
ProductFeaturesHis entity = ConvertUtils.sourceToTarget(dto, ProductFeaturesHis.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,19 +4,20 @@ 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.params.IdParam;
|
||||
import com.cnbm.basic.dto.FeaturesStageProcedureRelationDTO;
|
||||
import com.cnbm.basic.dto.ProductFeaturesHisDTO;
|
||||
import com.cnbm.basic.dto.WorkingProcedureDTO;
|
||||
import com.cnbm.admin.utils.BaseSupportUtils;
|
||||
import com.cnbm.basic.dto.*;
|
||||
import com.cnbm.basic.entity.ProductFeaturesHis;
|
||||
import com.cnbm.basic.entity.ProductWorkingprocedureRelation;
|
||||
import com.cnbm.basic.entity.WorkingProcedure;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
import com.cnbm.basic.dto.ProductFeaturesDTO;
|
||||
import com.cnbm.basic.mapper.ProductFeaturesMapper;
|
||||
import com.cnbm.basic.entity.ProductFeatures;
|
||||
import com.cnbm.basic.service.IProductFeaturesService;
|
||||
import com.cnbm.common.utils.ConvertUtils;
|
||||
import com.cnbm.common.validator.ValidatorUtils;
|
||||
import com.cnbm.common.validator.group.DefaultGroup;
|
||||
import com.cnbm.common.validator.group.UpdateGroup;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -64,7 +65,9 @@ public class ProductFeaturesServiceImpl extends CrudServiceImpl<ProductFeaturesM
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(ProductFeaturesDTO dto) {
|
||||
|
||||
ProductFeatures entity = ConvertUtils.sourceToTarget(dto, ProductFeatures.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
|
||||
@@ -74,6 +77,16 @@ public class ProductFeaturesServiceImpl extends CrudServiceImpl<ProductFeaturesM
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(ProductFeaturesDTO dto) {
|
||||
//若控制图配置为“单值移动极差”,样本量为1
|
||||
// if (dto.getControlGraphName()=="单值移动极差"){
|
||||
// dto.setSampleSize(1);
|
||||
// }
|
||||
if(dto.getControlGraphId()!=null){
|
||||
String controlGraphName = mapper.getControlGraphNameById(dto.getControlGraphId());
|
||||
if((controlGraphName!=null) && (controlGraphName.equals("单值移动极差"))) {
|
||||
dto.setSampleSize(1);
|
||||
}
|
||||
}
|
||||
//当产品特性出现update的时候,就会把旧数据 全量备份到这张表
|
||||
ProductFeatures oentity = baseDao.selectById(dto.getId());
|
||||
ProductFeaturesHisDTO history = ConvertUtils.sourceToTarget(oentity, ProductFeaturesHisDTO.class);
|
||||
@@ -82,6 +95,7 @@ public class ProductFeaturesServiceImpl extends CrudServiceImpl<ProductFeaturesM
|
||||
productFeaturesHisServiceImpl.save(history);
|
||||
//更新
|
||||
ProductFeatures entity = ConvertUtils.sourceToTarget(dto, ProductFeatures.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
|
||||
}
|
||||
@@ -124,8 +138,40 @@ public class ProductFeaturesServiceImpl extends CrudServiceImpl<ProductFeaturesM
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductFeaturesDTO> getFeaturesByStageProcedure(Map<String, Object> params){
|
||||
List<ProductFeaturesDTO> list = mapper.getFeaturesByStageProcedure(params);
|
||||
public List<FeaturesProcedureDTO> getFeaturesByStageProcedure(Map<String, Object> params){
|
||||
List<FeaturesProcedureDTO> list = mapper.getFeaturesByStageProcedure(params);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void batchUpdate(ProductFeaturesDTO[] lists) {
|
||||
for(ProductFeaturesDTO dto:lists){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
BaseSupportUtils.setUpdateCommonField(dto);
|
||||
update(dto);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductFeaturesDTO> getFeaturesList(Map<String, Object> params){
|
||||
List<ProductFeaturesDTO> list = mapper.getFeaturesList(params);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<ProductFeaturesDTO> list() {
|
||||
List<ProductFeaturesDTO> list = mapper.list();
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<ProductFeaturesDTO> getProductFeaturesByType(Integer type) {
|
||||
List<ProductFeaturesDTO> listByType = mapper.getProductFeaturesByType(type);
|
||||
return listByType;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.cnbm.admin.utils.BaseSupportUtils;
|
||||
import com.cnbm.basic.entity.ProductType;
|
||||
import com.cnbm.basic.mapper.ProductFactoryRelationMapper;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
import com.cnbm.basic.dto.ProductDTO;
|
||||
@@ -20,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -46,7 +49,7 @@ public class ProductServiceImpl extends CrudServiceImpl<ProductMapper, Product,
|
||||
wrapper.like(StringUtils.isNotBlank(code), "code", code);
|
||||
wrapper.eq(ObjectUtils.isNotNull(params.get("status")), "status", params.get("status"));
|
||||
wrapper.eq(ObjectUtils.isNotNull(params.get("product_type_id")), "product_type_id", params.get("product_type_id"));
|
||||
wrapper.eq(StringUtils.isNotBlank(inspection_stage), "inspection_stage", inspection_stage);
|
||||
wrapper.like(StringUtils.isNotBlank(inspection_stage), "inspection_stage", inspection_stage);
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@@ -76,16 +79,25 @@ public class ProductServiceImpl extends CrudServiceImpl<ProductMapper, Product,
|
||||
return productDTOPageData;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ProductFactoryRelationMapper relationMapper;
|
||||
|
||||
@Override
|
||||
public ProductDTO get(Long id) {
|
||||
Product entity = baseDao.selectById(id);
|
||||
return ConvertUtils.sourceToTarget(entity, ProductDTO.class);
|
||||
ProductDTO dto = ConvertUtils.sourceToTarget(entity, ProductDTO.class);
|
||||
|
||||
List<Long> factoryList = relationMapper.getFactoryListByProductId(id);
|
||||
dto.setFactoryList(factoryList);
|
||||
//return ConvertUtils.sourceToTarget(entity, ProductDTO.class);
|
||||
return dto;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public IdVo add(ProductDTO dto) {
|
||||
Product entity = ConvertUtils.sourceToTarget(dto, Product.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
//返回新增产品id
|
||||
return IdVo.builder().id(entity.getId()).build();
|
||||
@@ -95,6 +107,7 @@ public class ProductServiceImpl extends CrudServiceImpl<ProductMapper, Product,
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(ProductDTO dto) {
|
||||
Product entity = ConvertUtils.sourceToTarget(dto, Product.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@@ -115,4 +128,11 @@ public class ProductServiceImpl extends CrudServiceImpl<ProductMapper, Product,
|
||||
deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<ProductDTO> list() {
|
||||
List<ProductDTO> list = mapper.list();
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.cnbm.admin.dto.SysDictDataDTO;
|
||||
import com.cnbm.admin.entity.SysDictDataEntity;
|
||||
import com.cnbm.admin.utils.BaseSupportUtils;
|
||||
import com.cnbm.basic.dto.FactoryDTO;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
@@ -68,6 +69,7 @@ public class ProductTypeServiceImpl extends CrudServiceImpl<ProductTypeMapper, P
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(ProductTypeDTO dto) {
|
||||
ProductType entity = ConvertUtils.sourceToTarget(dto, ProductType.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
|
||||
@@ -75,6 +77,7 @@ public class ProductTypeServiceImpl extends CrudServiceImpl<ProductTypeMapper, P
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(ProductTypeDTO dto) {
|
||||
ProductType entity = ConvertUtils.sourceToTarget(dto, ProductType.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,10 @@ package com.cnbm.basic.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.BaseSupportUtils;
|
||||
import com.cnbm.basic.dto.ProductFeaturesDTO;
|
||||
import com.cnbm.basic.dto.SequenceDTO;
|
||||
import com.cnbm.basic.dto.WorkingProcedureDTO;
|
||||
import com.cnbm.basic.entity.WorkingProcedure;
|
||||
import com.cnbm.basic.mapper.ProductMapper;
|
||||
@@ -16,14 +20,13 @@ import com.cnbm.common.utils.ConvertUtils;
|
||||
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 org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 工序 表
|
||||
@@ -34,6 +37,9 @@ import java.util.Map;
|
||||
@Service
|
||||
public class ProductWorkingprocedureRelationServiceImpl extends CrudServiceImpl<ProductWorkingprocedureRelationMapper, ProductWorkingprocedureRelation, ProductWorkingprocedureRelationDTO> implements IProductWorkingprocedureRelationService {
|
||||
|
||||
@Autowired
|
||||
private ProductWorkingprocedureRelationMapper mapper;
|
||||
|
||||
@Override
|
||||
public QueryWrapper<ProductWorkingprocedureRelation> getWrapper(Map<String, Object> params){
|
||||
String id = (String)params.get("id");
|
||||
@@ -59,17 +65,40 @@ public class ProductWorkingprocedureRelationServiceImpl extends CrudServiceImpl<
|
||||
return ConvertUtils.sourceToTarget(entity, ProductWorkingprocedureRelationDTO.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(ProductWorkingprocedureRelationDTO dto) {
|
||||
ProductWorkingprocedureRelation entity = ConvertUtils.sourceToTarget(dto, ProductWorkingprocedureRelation.class);
|
||||
insert(entity);
|
||||
//判断数据是否已经绑定过
|
||||
QueryWrapper<ProductWorkingprocedureRelation> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq(ObjectUtils.isNotNull(dto.getProductId()),"product_id",dto.getProductId())
|
||||
.eq(ObjectUtils.isNotNull(dto.getWorkingProcedureId()),"working_procedure_id",dto.getWorkingProcedureId());
|
||||
ProductWorkingprocedureRelation test = mapper.selectOne(wrapper);
|
||||
|
||||
if(Objects.isNull(test)){
|
||||
ProductWorkingprocedureRelation entity = ConvertUtils.sourceToTarget(dto, ProductWorkingprocedureRelation.class);
|
||||
//设置工序顺序
|
||||
List<ProductWorkingprocedureRelationDTO> list = getWorkingprocedureByProductId(dto.getProductId());
|
||||
if (list.isEmpty()) {
|
||||
entity.setSequence(1);
|
||||
} else {
|
||||
ProductWorkingprocedureRelationDTO lastDto = list.get(list.size() - 1);
|
||||
Integer lastSequence = lastDto.getSequence();
|
||||
entity.setSequence(lastSequence + 1);
|
||||
}
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
else{
|
||||
dto.setWorkingProcedureId(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(ProductWorkingprocedureRelationDTO dto) {
|
||||
ProductWorkingprocedureRelation entity = ConvertUtils.sourceToTarget(dto, ProductWorkingprocedureRelation.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@@ -80,6 +109,7 @@ public class ProductWorkingprocedureRelationServiceImpl extends CrudServiceImpl<
|
||||
deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/*
|
||||
@Autowired
|
||||
private WorkingProcedureServiceImpl workingProcedureServiceImpl;
|
||||
|
||||
@@ -103,14 +133,69 @@ public class ProductWorkingprocedureRelationServiceImpl extends CrudServiceImpl<
|
||||
}
|
||||
return dtoList;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public List<ProductWorkingprocedureRelationDTO> getWorkingprocedureByProductId(Long productId){
|
||||
List<ProductWorkingprocedureRelationDTO> list= mapper.getWorkingprocedureByProductId(productId);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void batchInsertWorkingprocedure(ProductWorkingprocedureRelationDTO[] lists) {
|
||||
for(ProductWorkingprocedureRelationDTO dto:lists){
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
BaseSupportUtils.setCommonField(dto);
|
||||
save(dto);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void sequenceUp(SequenceDTO sequenceDTO)
|
||||
{
|
||||
Integer index = sequenceDTO.getIndex();
|
||||
Long productId = sequenceDTO.getProductId();
|
||||
//排序为最前不能再上移
|
||||
if(index!= 1){
|
||||
List<ProductWorkingprocedureRelationDTO> list = getWorkingprocedureByProductId(productId);
|
||||
ProductWorkingprocedureRelationDTO dto = list.get(index-1);
|
||||
ProductWorkingprocedureRelationDTO beforeDto = list.get(index-2);
|
||||
|
||||
//交换顺序
|
||||
Integer dtoSequence = dto.getSequence();
|
||||
Integer beforeDtoSequence = beforeDto.getSequence();
|
||||
|
||||
dto.setSequence(beforeDtoSequence);
|
||||
beforeDto.setSequence(dtoSequence);
|
||||
|
||||
update(dto);
|
||||
update(beforeDto);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void sequenceDown(SequenceDTO sequenceDTO)
|
||||
{
|
||||
Integer index = sequenceDTO.getIndex();
|
||||
Long productId = sequenceDTO.getProductId();
|
||||
List<ProductWorkingprocedureRelationDTO> list = getWorkingprocedureByProductId(productId);
|
||||
//排序为最后不能再下移
|
||||
if(index !=list.size()){
|
||||
ProductWorkingprocedureRelationDTO dto = list.get(index-1);
|
||||
ProductWorkingprocedureRelationDTO afterDto = list.get(index);
|
||||
|
||||
//交换顺序
|
||||
Integer dtoSequence = dto.getSequence();
|
||||
Integer afterDtoSequence = afterDto.getSequence();
|
||||
|
||||
dto.setSequence(afterDtoSequence);
|
||||
afterDto.setSequence(dtoSequence);
|
||||
|
||||
update(dto);
|
||||
update(afterDto);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.cnbm.basic.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.cnbm.admin.utils.BaseSupportUtils;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
import com.cnbm.basic.dto.ShiftDTO;
|
||||
@@ -10,10 +11,12 @@ import com.cnbm.basic.entity.Shift;
|
||||
import com.cnbm.basic.service.IShiftService;
|
||||
import com.cnbm.common.utils.ConvertUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -25,6 +28,9 @@ import java.util.Map;
|
||||
@Service
|
||||
public class ShiftServiceImpl extends CrudServiceImpl<ShiftMapper, Shift, ShiftDTO> implements IShiftService {
|
||||
|
||||
@Autowired
|
||||
private ShiftMapper mapper;
|
||||
|
||||
@Override
|
||||
public QueryWrapper<Shift> getWrapper(Map<String, Object> params){
|
||||
String id = (String)params.get("id");
|
||||
@@ -55,6 +61,7 @@ public class ShiftServiceImpl extends CrudServiceImpl<ShiftMapper, Shift, ShiftD
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(ShiftDTO dto) {
|
||||
Shift entity = ConvertUtils.sourceToTarget(dto, Shift.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
|
||||
@@ -62,6 +69,7 @@ public class ShiftServiceImpl extends CrudServiceImpl<ShiftMapper, Shift, ShiftD
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(ShiftDTO dto) {
|
||||
Shift entity = ConvertUtils.sourceToTarget(dto, Shift.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@@ -72,4 +80,11 @@ public class ShiftServiceImpl extends CrudServiceImpl<ShiftMapper, Shift, ShiftD
|
||||
deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<ShiftDTO> list() {
|
||||
List<ShiftDTO> list = mapper.list();
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,8 +2,7 @@ package com.cnbm.basic.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.cnbm.basic.dto.ProductTypeDTO;
|
||||
import com.cnbm.basic.entity.ProductType;
|
||||
import com.cnbm.admin.utils.BaseSupportUtils;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
import com.cnbm.basic.dto.TeamDTO;
|
||||
@@ -12,11 +11,13 @@ import com.cnbm.basic.entity.Team;
|
||||
import com.cnbm.basic.service.ITeamService;
|
||||
import com.cnbm.common.utils.ConvertUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -28,6 +29,9 @@ import java.util.Map;
|
||||
@Service
|
||||
public class TeamServiceImpl extends CrudServiceImpl<TeamMapper, Team, TeamDTO> implements ITeamService {
|
||||
|
||||
@Autowired
|
||||
private TeamMapper mapper;
|
||||
|
||||
@Override
|
||||
public QueryWrapper<Team> getWrapper(Map<String, Object> params){
|
||||
String id = (String)params.get("id");
|
||||
@@ -57,6 +61,7 @@ public class TeamServiceImpl extends CrudServiceImpl<TeamMapper, Team, TeamDTO>
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(TeamDTO dto) {
|
||||
Team entity = ConvertUtils.sourceToTarget(dto, Team.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
|
||||
@@ -64,6 +69,7 @@ public class TeamServiceImpl extends CrudServiceImpl<TeamMapper, Team, TeamDTO>
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(TeamDTO dto) {
|
||||
Team entity = ConvertUtils.sourceToTarget(dto, Team.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@@ -74,4 +80,11 @@ public class TeamServiceImpl extends CrudServiceImpl<TeamMapper, Team, TeamDTO>
|
||||
deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<TeamDTO> list() {
|
||||
List<TeamDTO> list = mapper.list();
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.cnbm.basic.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.BaseSupportUtils;
|
||||
import com.cnbm.basic.dto.FactoryDTO;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
@@ -11,6 +12,7 @@ import com.cnbm.basic.entity.Unit;
|
||||
import com.cnbm.basic.mapper.UnitMapper;
|
||||
import com.cnbm.basic.service.IUnitService;
|
||||
import com.cnbm.common.utils.ConvertUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -33,8 +35,12 @@ public class UnitServiceImpl extends CrudServiceImpl<UnitMapper, Unit, UnitDTO>
|
||||
|
||||
@Override
|
||||
public QueryWrapper<Unit> getWrapper(Map<String, Object> params){
|
||||
String name = (String)params.get("name");
|
||||
String code = (String)params.get("code");
|
||||
|
||||
QueryWrapper<Unit> wrapper = new QueryWrapper<>();
|
||||
wrapper.like(StringUtils.isNotBlank(name), "name", name);
|
||||
wrapper.like(StringUtils.isNotBlank(code), "code", code);
|
||||
wrapper.eq(ObjectUtils.isNotNull(params.get("status")), "status", params.get("status"));
|
||||
|
||||
return wrapper;
|
||||
@@ -59,6 +65,7 @@ public class UnitServiceImpl extends CrudServiceImpl<UnitMapper, Unit, UnitDTO>
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(UnitDTO dto) {
|
||||
Unit entity = ConvertUtils.sourceToTarget(dto, Unit.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
|
||||
@@ -66,6 +73,7 @@ public class UnitServiceImpl extends CrudServiceImpl<UnitMapper, Unit, UnitDTO>
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(UnitDTO dto) {
|
||||
Unit entity = ConvertUtils.sourceToTarget(dto, Unit.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,15 @@ package com.cnbm.basic.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.BaseSupportUtils;
|
||||
import com.cnbm.basic.dto.UnitDTO;
|
||||
import com.cnbm.basic.dto.WorkingProcedureTypeDTO;
|
||||
import com.cnbm.basic.entity.Machine;
|
||||
import com.cnbm.basic.entity.ProductWorkingprocedureRelation;
|
||||
import com.cnbm.basic.entity.WorkingProcedureType;
|
||||
import com.cnbm.basic.mapper.ProductWorkingprocedureRelationMapper;
|
||||
import com.cnbm.basic.mapper.UnitMapper;
|
||||
import com.cnbm.basic.mapper.WorkingProcedureTypeMapper;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
import com.cnbm.basic.dto.WorkingProcedureDTO;
|
||||
@@ -105,6 +108,7 @@ public class WorkingProcedureServiceImpl extends CrudServiceImpl<WorkingProcedur
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(WorkingProcedureDTO dto) {
|
||||
WorkingProcedure entity = ConvertUtils.sourceToTarget(dto, WorkingProcedure.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
|
||||
@@ -112,6 +116,7 @@ public class WorkingProcedureServiceImpl extends CrudServiceImpl<WorkingProcedur
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(WorkingProcedureDTO dto) {
|
||||
WorkingProcedure entity = ConvertUtils.sourceToTarget(dto, WorkingProcedure.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@@ -153,11 +158,36 @@ public class WorkingProcedureServiceImpl extends CrudServiceImpl<WorkingProcedur
|
||||
@Autowired
|
||||
private WorkingProcedureMapper workingProcedureMapper;
|
||||
|
||||
@Autowired
|
||||
private WorkingProcedureTypeMapper workingProcedureTypeMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<WorkingProcedureDTO> list() {
|
||||
List<WorkingProcedureDTO> list = workingProcedureMapper.list();
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<WorkingProcedure> listByType(Long typeId) {
|
||||
QueryWrapper<WorkingProcedure> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq(ObjectUtils.isNotNull(typeId), "working_procedure_type_id", typeId);
|
||||
List<WorkingProcedure> listOfType = workingProcedureMapper.selectList(wrapper);
|
||||
|
||||
return listOfType;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<WorkingProcedureTypeDTO> listWithType () {
|
||||
List<WorkingProcedureTypeDTO> workingProcedureTypeDTOList = workingProcedureTypeMapper.list();
|
||||
for(WorkingProcedureTypeDTO workingProcedureTypeDTO: workingProcedureTypeDTOList){
|
||||
List<WorkingProcedure> workingProcedureList = listByType(workingProcedureTypeDTO.getId());
|
||||
if(workingProcedureList!=null & workingProcedureList.size() > 0)
|
||||
workingProcedureTypeDTO.setWorkingProcedureList(workingProcedureList);
|
||||
}
|
||||
return workingProcedureTypeDTOList;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.cnbm.basic.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.BaseSupportUtils;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
import com.cnbm.basic.dto.WorkingProcedureTypeDTO;
|
||||
@@ -29,8 +30,12 @@ public class WorkingProcedureTypeServiceImpl extends CrudServiceImpl<WorkingProc
|
||||
|
||||
@Override
|
||||
public QueryWrapper<WorkingProcedureType> getWrapper(Map<String, Object> params){
|
||||
String name = (String)params.get("name");
|
||||
String code = (String)params.get("code");
|
||||
|
||||
QueryWrapper<WorkingProcedureType> wrapper = new QueryWrapper<>();
|
||||
wrapper.like(StringUtils.isNotBlank(name), "name", name);
|
||||
wrapper.like(StringUtils.isNotBlank(code), "code", code);
|
||||
wrapper.eq(ObjectUtils.isNotNull(params.get("status")), "status", params.get("status"));
|
||||
|
||||
return wrapper;
|
||||
@@ -55,6 +60,7 @@ public class WorkingProcedureTypeServiceImpl extends CrudServiceImpl<WorkingProc
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(WorkingProcedureTypeDTO dto) {
|
||||
WorkingProcedureType entity = ConvertUtils.sourceToTarget(dto, WorkingProcedureType.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
|
||||
@@ -62,6 +68,7 @@ public class WorkingProcedureTypeServiceImpl extends CrudServiceImpl<WorkingProc
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(WorkingProcedureTypeDTO dto) {
|
||||
WorkingProcedureType entity = ConvertUtils.sourceToTarget(dto, WorkingProcedureType.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,4 +17,12 @@
|
||||
<id column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<select id="deleteByStageProcedure">
|
||||
delete fspr from features_stage_procedure_relation fspr
|
||||
inner join product_workingprocedure_relation pwr ON pwr.working_procedure_id=fspr.working_procedure_id
|
||||
where fspr.working_procedure_id = #{workingProcedureId}
|
||||
and fspr.inspection_stage = #{inspectionStage}
|
||||
and pwr.product_id = #{productId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -2,4 +2,9 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cnbm.basic.mapper.ProductFactoryRelationMapper">
|
||||
|
||||
<select id="getFactoryListByProductId" resultType="Long">
|
||||
select factory_id from product_factory_relation
|
||||
where product_id = #{productId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -14,12 +14,33 @@
|
||||
order by p.id asc
|
||||
</select>
|
||||
|
||||
<select id="getFeaturesByStageProcedure" resultType="com.cnbm.basic.dto.FeaturesProcedureDTO">
|
||||
select pf.id as productFeaturesId, fspr.working_procedure_id as workingProcedureId
|
||||
from features_stage_procedure_relation fspr
|
||||
LEFT JOIN product_features pf ON pf.id=fspr.product_features_id
|
||||
<where>
|
||||
fspr.valid = 1
|
||||
<if test="productId != null">
|
||||
and pf.product_id = #{productId}
|
||||
</if>
|
||||
<if test="inspectionStage != null">
|
||||
and fspr.inspection_stage = #{inspectionStage}
|
||||
</if>
|
||||
</where>
|
||||
order by pf.id asc
|
||||
</select>
|
||||
|
||||
<!--
|
||||
<select id="getFeaturesByStageProcedure" resultType="com.cnbm.basic.dto.ProductFeaturesDTO">
|
||||
select *
|
||||
from product_features pf
|
||||
LEFT JOIN features_stage_procedure_relation fspr ON pf.id=fspr.product_features_id
|
||||
LEFT JOIN product_workingprocedure_relation pwr ON pwr.working_procedure_id=fspr.working_procedure_id
|
||||
<where>
|
||||
fspr.valid = 1
|
||||
<if test="productId != null">
|
||||
and pwr.product_id = #{productId}
|
||||
</if>
|
||||
<if test="inspectionStage != null">
|
||||
and fspr.inspection_stage = #{inspectionStage}
|
||||
</if>
|
||||
@@ -29,4 +50,41 @@
|
||||
</where>
|
||||
order by pf.id asc
|
||||
</select>
|
||||
-->
|
||||
<select id="getFeaturesList" resultType="com.cnbm.basic.dto.ProductFeaturesDTO">
|
||||
select pf.*,m.name as measureToolName,u.name as unitName,c.name as controlGraphName
|
||||
from product_features pf
|
||||
left join features_stage_procedure_relation fspr ON pf.id=fspr.product_features_id
|
||||
LEFT JOIN measure_tool m ON pf.measure_tool_id=m.id
|
||||
LEFT JOIN unit u ON pf.unit_id=u.id
|
||||
LEFT JOIN control_graph c ON pf.control_graph_id=c.id
|
||||
<where>
|
||||
fspr.valid = 1
|
||||
<if test="productId != null">
|
||||
and pf.product_id = #{productId}
|
||||
</if>
|
||||
<if test="inspectionStage != null">
|
||||
and fspr.inspection_stage = #{inspectionStage}
|
||||
</if>
|
||||
</where>
|
||||
order by pf.id asc
|
||||
</select>
|
||||
|
||||
<select id="getControlGraphNameById" resultType="String">
|
||||
select name from control_graph where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="list" resultType="com.cnbm.basic.dto.ProductFeaturesDTO">
|
||||
select * from product_features
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
<select id="getProductFeaturesByType" resultType="com.cnbm.basic.dto.ProductFeaturesDTO">
|
||||
select * from product_features
|
||||
<where>
|
||||
valid = 1 AND type = #{type}
|
||||
</where>
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -2,4 +2,9 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cnbm.basic.mapper.ProductMapper">
|
||||
|
||||
<select id="list" resultType="com.cnbm.basic.dto.ProductDTO">
|
||||
select * from product
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -2,4 +2,19 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cnbm.basic.mapper.ProductWorkingprocedureRelationMapper">
|
||||
|
||||
<select id="getWorkingprocedureByProductId" resultType="com.cnbm.basic.dto.ProductWorkingprocedureRelationDTO">
|
||||
select pwr.*, wp.name as workingProcedureName, wp.code as workingProcedureCode
|
||||
from product_workingprocedure_relation pwr
|
||||
LEFT JOIN working_procedure wp ON pwr.working_procedure_id=wp.id
|
||||
<where>
|
||||
pwr.valid = 1
|
||||
<if test="productId != null">
|
||||
and pwr.product_id=#{productId}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
order by pwr.sequence asc
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -2,4 +2,9 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cnbm.basic.mapper.ShiftMapper">
|
||||
|
||||
<select id="list" resultType="com.cnbm.basic.dto.ShiftDTO">
|
||||
select * from shift
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -2,4 +2,9 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cnbm.basic.mapper.TeamMapper">
|
||||
|
||||
<select id="list" resultType="com.cnbm.basic.dto.TeamDTO">
|
||||
select * from team
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
<mapper namespace="com.cnbm.basic.mapper.WorkingProcedureMapper">
|
||||
|
||||
<select id="list" resultType="com.cnbm.basic.dto.WorkingProcedureDTO">
|
||||
select * from working_procedure
|
||||
order by id asc
|
||||
select wp.*,wpt.name as workingProcedureTypeName from working_procedure wp
|
||||
LEFT JOIN working_procedure_type wpt ON wp.working_procedure_type_id=wpt.id
|
||||
order by wp.id asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cnbm.basic.mapper.WorkingProcedureTypeMapper">
|
||||
|
||||
<select id="list" resultType="com.cnbm.basic.dto.WorkingProcedureTypeDTO">
|
||||
select * from working_procedure_type
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -15,5 +15,12 @@
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-math3</artifactId>
|
||||
<version>3.6.1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -28,7 +28,6 @@ public class Math {
|
||||
d[6] = new Double(10.2);
|
||||
d[7] = new Double(11.7);
|
||||
|
||||
;
|
||||
System.out.println("均值: "+getMean(d)+",,标准差:"+StandardDiviation(d)+",极差:"+range(d));
|
||||
}
|
||||
|
||||
|
||||
793
ym-common/src/main/java/com/cnbm/common/spc/math/Matrix.java
Normal file
793
ym-common/src/main/java/com/cnbm/common/spc/math/Matrix.java
Normal file
@@ -0,0 +1,793 @@
|
||||
package com.cnbm.common.spc.math;
|
||||
|
||||
import com.cnbm.common.spc.math.entity.T2GraphEntity;
|
||||
import org.apache.commons.math3.distribution.FDistribution;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Desc: ""
|
||||
* @Author: caixiang
|
||||
* @DATE: 2022/9/2 15:33
|
||||
*/
|
||||
public class Matrix {
|
||||
// public static void main(String[] args) {
|
||||
// double[] xbarbar = new double[2];
|
||||
// xbarbar[0] = 115.6084;
|
||||
// xbarbar[1] = 1.0564;
|
||||
//
|
||||
// double[] xi = new double[2];
|
||||
// xi[0] = 115.84;
|
||||
// xi[1] = 1.078;
|
||||
//
|
||||
// double[] xi2 = new double[2];
|
||||
// xi2[0] = 115.76;
|
||||
// xi2[1] = 1.072;
|
||||
//
|
||||
// double[] xi3 = new double[2];
|
||||
// xi3[0] = 115.11;
|
||||
// xi3[1] = 1.015;
|
||||
//
|
||||
// double[] xi4 = new double[2];
|
||||
// xi4[0] = 116.02;
|
||||
// xi4[1] = 1.089;
|
||||
//
|
||||
// double[] xi5 = new double[2];
|
||||
// xi5[0] = 115.80;
|
||||
// xi5[1] = 1.090;
|
||||
//
|
||||
// System.out.println("Ti1:"+ forTi2(xi,xbarbar)*10);
|
||||
// System.out.println("Ti2:"+ forTi2(xi2,xbarbar)*10);
|
||||
// System.out.println("Ti3:"+ forTi2(xi3,xbarbar)*10);
|
||||
// System.out.println("Ti4:"+ forTi2(xi4,xbarbar)*10);
|
||||
// System.out.println("Ti4:"+ forTi2(xi5,xbarbar)*10);
|
||||
//// double ti = 10*()
|
||||
//
|
||||
//
|
||||
//
|
||||
// //创建一个F分布对象,参数为自由度
|
||||
// FDistribution fd = new FDistribution(2,179);
|
||||
// //当α=0.05时,参数为1-α=0.95
|
||||
// double v = fd.inverseCumulativeProbability(0.99865);
|
||||
// //输出值
|
||||
// System.out.println("v: "+v*342/179);
|
||||
//
|
||||
//
|
||||
// //m = 25 n = 1 p = 3
|
||||
// FDistribution fd2 = new FDistribution(3,21);
|
||||
// //当α=0.05时,参数为1-α=0.95
|
||||
// double v2 = fd2.inverseCumulativeProbability(0.99865);
|
||||
// //输出值
|
||||
// System.out.println("v2: "+v2);
|
||||
// }
|
||||
|
||||
// public static void main(String[] args) {
|
||||
//
|
||||
// double[] xlv = new double[5];
|
||||
// xlv[0] = 155;
|
||||
// xlv[1] = 170;
|
||||
// xlv[2] = 160;
|
||||
// xlv[3] = 162;
|
||||
// xlv[4] = 163;
|
||||
//
|
||||
// double[] weigth = new double[5];
|
||||
// weigth[0] = 125;
|
||||
// weigth[1] = 162;
|
||||
// weigth[2] = 139;
|
||||
// weigth[3] = 150;
|
||||
// weigth[4] = 146;
|
||||
//
|
||||
// double x1bar = getBar(xlv);
|
||||
// double x2bar = getBar(weigth);
|
||||
// System.out.println();
|
||||
// double s11 = forS11(xlv,x1bar);
|
||||
// double s12 = forS12(weigth,x1bar,xlv,x2bar);
|
||||
// double s22 = forS22(weigth,x2bar);
|
||||
// System.out.println();
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
public static double[][] initialDemoSource(){
|
||||
double[][] source = new double[60][6];
|
||||
source[0][0] = 1;
|
||||
source[0][1] = 1;
|
||||
source[0][2] = 155;
|
||||
source[0][3] = 100;
|
||||
source[0][4] = 60;
|
||||
source[0][5] = 125;
|
||||
|
||||
source[1][0] = 1;
|
||||
source[1][1] = 2;
|
||||
source[1][2] = 170;
|
||||
source[1][3] = 120;
|
||||
source[1][4] = 82;
|
||||
source[1][5] = 162;
|
||||
|
||||
source[2][0] = 1;
|
||||
source[2][1] = 3;
|
||||
source[2][2] = 160;
|
||||
source[2][3] = 132;
|
||||
source[2][4] = 71;
|
||||
source[2][5] = 139;
|
||||
|
||||
source[3][0] = 1;
|
||||
source[3][1] = 4;
|
||||
source[3][2] = 162;
|
||||
source[3][3] = 139;
|
||||
source[3][4] = 70;
|
||||
source[3][5] = 150;
|
||||
|
||||
source[4][0] = 1;
|
||||
source[4][1] = 5;
|
||||
source[4][2] = 163;
|
||||
source[4][3] = 110;
|
||||
source[4][4] = 80;
|
||||
source[4][5] = 146;
|
||||
|
||||
source[5][0] = 2;
|
||||
source[5][1] = 1;
|
||||
source[5][2] = 157;
|
||||
source[5][3] = 110;
|
||||
source[5][4] = 59;
|
||||
source[5][5] = 124;
|
||||
|
||||
source[6][0] = 2;
|
||||
source[6][1] = 2;
|
||||
source[6][2] = 171;
|
||||
source[6][3] = 122;
|
||||
source[6][4] = 81;
|
||||
source[6][5] = 163;
|
||||
|
||||
source[7][0] = 2;
|
||||
source[7][1] = 3;
|
||||
source[7][2] = 162;
|
||||
source[7][3] = 133;
|
||||
source[7][4] = 73;
|
||||
source[7][5] = 139;
|
||||
|
||||
source[8][0] = 2;
|
||||
source[8][1] = 4;
|
||||
source[8][2] = 165;
|
||||
source[8][3] = 140;
|
||||
source[8][4] = 72;
|
||||
source[8][5] = 152;
|
||||
|
||||
source[9][0] = 2;
|
||||
source[9][1] = 5;
|
||||
source[9][2] = 161;
|
||||
source[9][3] = 112;
|
||||
source[9][4] = 81;
|
||||
source[9][5] = 147;
|
||||
|
||||
source[10][0] = 3;
|
||||
source[10][1] = 1;
|
||||
source[10][2] = 153;
|
||||
source[10][3] = 110;
|
||||
source[10][4] = 63;
|
||||
source[10][5] = 123;
|
||||
|
||||
|
||||
source[11][0] = 3;
|
||||
source[11][1] = 2;
|
||||
source[11][2] = 169;
|
||||
source[11][3] = 120;
|
||||
source[11][4] = 86;
|
||||
source[11][5] = 161;
|
||||
|
||||
|
||||
source[12][0] = 3;
|
||||
source[12][1] = 3;
|
||||
source[12][2] = 161;
|
||||
source[12][3] = 133;
|
||||
source[12][4] = 79;
|
||||
source[12][5] = 141;
|
||||
|
||||
|
||||
source[13][0] = 3;
|
||||
source[13][1] = 4;
|
||||
source[13][2] = 160;
|
||||
source[13][3] = 140;
|
||||
source[13][4] = 72;
|
||||
source[13][5] = 153;
|
||||
|
||||
|
||||
source[14][0] = 3;
|
||||
source[14][1] = 5;
|
||||
source[14][2] = 159;
|
||||
source[14][3] = 118;
|
||||
source[14][4] = 82;
|
||||
source[14][5] = 149;
|
||||
|
||||
source[15][0] = 4;
|
||||
source[15][1] = 1;
|
||||
source[15][2] = 157;
|
||||
source[15][3] = 109;
|
||||
source[15][4] = 60;
|
||||
source[15][5] = 126;
|
||||
|
||||
|
||||
source[16][0] = 4;
|
||||
source[16][1] = 2;
|
||||
source[16][2] = 171;
|
||||
source[16][3] = 126;
|
||||
source[16][4] = 81;
|
||||
source[16][5] = 163;
|
||||
|
||||
|
||||
source[17][0] = 4;
|
||||
source[17][1] = 3;
|
||||
source[17][2] = 162;
|
||||
source[17][3] = 135;
|
||||
source[17][4] = 72;
|
||||
source[17][5] = 142;
|
||||
|
||||
|
||||
source[18][0] = 4;
|
||||
source[18][1] = 4;
|
||||
source[18][2] = 163;
|
||||
source[18][3] = 135;
|
||||
source[18][4] = 70;
|
||||
source[18][5] = 151;
|
||||
|
||||
|
||||
source[19][0] = 4;
|
||||
source[19][1] = 5;
|
||||
source[19][2] = 164;
|
||||
source[19][3] = 108;
|
||||
source[19][4] = 72;
|
||||
source[19][5] = 147;
|
||||
|
||||
source[20][0] = 5;
|
||||
source[20][1] = 1;
|
||||
source[20][2] = 156;
|
||||
source[20][3] = 108;
|
||||
source[20][4] = 70;
|
||||
source[20][5] = 126;
|
||||
|
||||
|
||||
source[21][0] = 5;
|
||||
source[21][1] = 2;
|
||||
source[21][2] = 172;
|
||||
source[21][3] = 113;
|
||||
source[21][4] = 80;
|
||||
source[21][5] = 162;
|
||||
|
||||
|
||||
source[22][0] = 5;
|
||||
source[22][1] = 3;
|
||||
source[22][2] = 162;
|
||||
source[22][3] = 130;
|
||||
source[22][4] = 70;
|
||||
source[22][5] = 141;
|
||||
|
||||
|
||||
source[23][0] = 5;
|
||||
source[23][1] = 4;
|
||||
source[23][2] = 162;
|
||||
source[23][3] = 142;
|
||||
source[23][4] = 76;
|
||||
source[23][5] = 150;
|
||||
|
||||
|
||||
source[24][0] = 5;
|
||||
source[24][1] = 5;
|
||||
source[24][2] = 164;
|
||||
source[24][3] = 110;
|
||||
source[24][4] = 83;
|
||||
source[24][5] = 146;
|
||||
|
||||
source[25][0] = 6;
|
||||
source[25][1] = 1;
|
||||
source[25][2] = 157;
|
||||
source[25][3] = 100;
|
||||
source[25][4] = 60;
|
||||
source[25][5] = 128;
|
||||
|
||||
|
||||
source[26][0] = 6;
|
||||
source[26][1] = 2;
|
||||
source[26][2] = 167;
|
||||
source[26][3] = 122;
|
||||
source[26][4] = 80;
|
||||
source[26][5] = 162;
|
||||
|
||||
|
||||
source[27][0] = 6;
|
||||
source[27][1] = 3;
|
||||
source[27][2] = 156;
|
||||
source[27][3] = 133;
|
||||
source[27][4] = 73;
|
||||
source[27][5] = 142;
|
||||
|
||||
|
||||
source[28][0] = 6;
|
||||
source[28][1] = 4;
|
||||
source[28][2] = 161;
|
||||
source[28][3] = 140;
|
||||
source[28][4] = 76;
|
||||
source[28][5] = 150;
|
||||
|
||||
|
||||
source[29][0] = 6;
|
||||
source[29][1] = 5;
|
||||
source[29][2] = 164;
|
||||
source[29][3] = 111;
|
||||
source[29][4] = 82;
|
||||
source[29][5] = 147;
|
||||
|
||||
source[30][0] = 7;
|
||||
source[30][1] = 1;
|
||||
source[30][2] = 157;
|
||||
source[30][3] = 106;
|
||||
source[30][4] = 62;
|
||||
source[30][5] = 127;
|
||||
|
||||
|
||||
source[31][0] = 7;
|
||||
source[31][1] = 2;
|
||||
source[31][2] = 167;
|
||||
source[31][3] = 130;
|
||||
source[31][4] = 83;
|
||||
source[31][5] = 162;
|
||||
|
||||
|
||||
source[32][0] = 7;
|
||||
source[32][1] = 3;
|
||||
source[32][2] = 162;
|
||||
source[32][3] = 125;
|
||||
source[32][4] = 73;
|
||||
source[32][5] = 142;
|
||||
|
||||
|
||||
source[33][0] = 7;
|
||||
source[33][1] = 4;
|
||||
source[33][2] = 161;
|
||||
source[33][3] = 144;
|
||||
source[33][4] = 76;
|
||||
source[33][5] = 152;
|
||||
|
||||
|
||||
source[34][0] = 7;
|
||||
source[34][1] = 5;
|
||||
source[34][2] = 160;
|
||||
source[34][3] = 118;
|
||||
source[34][4] = 85;
|
||||
source[34][5] = 147;
|
||||
|
||||
source[35][0] = 8;
|
||||
source[35][1] = 1;
|
||||
source[35][2] = 159;
|
||||
source[35][3] = 108;
|
||||
source[35][4] = 62;
|
||||
source[35][5] = 128;
|
||||
|
||||
|
||||
source[36][0] = 8;
|
||||
source[36][1] = 2;
|
||||
source[36][2] = 167;
|
||||
source[36][3] = 118;
|
||||
source[36][4] = 84;
|
||||
source[36][5] = 162;
|
||||
|
||||
|
||||
source[37][0] = 8;
|
||||
source[37][1] = 3;
|
||||
source[37][2] = 161;
|
||||
source[37][3] = 120;
|
||||
source[37][4] = 73;
|
||||
source[37][5] = 144;
|
||||
|
||||
|
||||
source[38][0] = 8;
|
||||
source[38][1] = 4;
|
||||
source[38][2] = 164;
|
||||
source[38][3] = 135;
|
||||
source[38][4] = 76;
|
||||
source[38][5] = 151;
|
||||
|
||||
|
||||
source[39][0] = 8;
|
||||
source[39][1] = 5;
|
||||
source[39][2] = 160;
|
||||
source[39][3] = 101;
|
||||
source[39][4] = 81;
|
||||
source[39][5] = 146;
|
||||
|
||||
source[40][0] = 9;
|
||||
source[40][1] = 1;
|
||||
source[40][2] = 157;
|
||||
source[40][3] = 97;
|
||||
source[40][4] = 57;
|
||||
source[40][5] = 126;
|
||||
|
||||
|
||||
source[41][0] = 9;
|
||||
source[41][1] = 2;
|
||||
source[41][2] = 171;
|
||||
source[41][3] = 130;
|
||||
source[41][4] = 72;
|
||||
source[41][5] = 162;
|
||||
|
||||
|
||||
source[42][0] = 9;
|
||||
source[42][1] = 3;
|
||||
source[42][2] = 162;
|
||||
source[42][3] = 134;
|
||||
source[42][4] = 68;
|
||||
source[42][5] = 144;
|
||||
|
||||
|
||||
source[43][0] = 9;
|
||||
source[43][1] = 4;
|
||||
source[43][2] = 164;
|
||||
source[43][3] = 143;
|
||||
source[43][4] = 70;
|
||||
source[43][5] = 150;
|
||||
|
||||
|
||||
source[44][0] = 9;
|
||||
source[44][1] = 5;
|
||||
source[44][2] = 166;
|
||||
source[44][3] = 114;
|
||||
source[44][4] = 80;
|
||||
source[44][5] = 147;
|
||||
|
||||
|
||||
source[45][0] = 10;
|
||||
source[45][1] = 1;
|
||||
source[45][2] = 157;
|
||||
source[45][3] = 107;
|
||||
source[45][4] = 62;
|
||||
source[45][5] = 124;
|
||||
|
||||
|
||||
source[46][0] = 10;
|
||||
source[46][1] = 2;
|
||||
source[46][2] = 172;
|
||||
source[46][3] = 122;
|
||||
source[46][4] = 81;
|
||||
source[46][5] = 160;
|
||||
|
||||
|
||||
source[47][0] = 10;
|
||||
source[47][1] = 3;
|
||||
source[47][2] = 163;
|
||||
source[47][3] = 135;
|
||||
source[47][4] = 72;
|
||||
source[47][5] = 143;
|
||||
|
||||
|
||||
source[48][0] = 10;
|
||||
source[48][1] = 4;
|
||||
source[48][2] = 164;
|
||||
source[48][3] = 141;
|
||||
source[48][4] = 70;
|
||||
source[48][5] = 148;
|
||||
|
||||
|
||||
source[49][0] = 10;
|
||||
source[49][1] = 5;
|
||||
source[49][2] = 166;
|
||||
source[49][3] = 118;
|
||||
source[49][4] = 82;
|
||||
source[49][5] = 146;
|
||||
|
||||
source[50][0] = 11;
|
||||
source[50][1] = 1;
|
||||
source[50][2] = 152;
|
||||
source[50][3] = 106;
|
||||
source[50][4] = 62;
|
||||
source[50][5] = 124;
|
||||
|
||||
|
||||
source[51][0] = 11;
|
||||
source[51][1] = 2;
|
||||
source[51][2] = 167;
|
||||
source[51][3] = 122;
|
||||
source[51][4] = 82;
|
||||
source[51][5] = 162;
|
||||
|
||||
|
||||
source[52][0] = 11;
|
||||
source[52][1] = 3;
|
||||
source[52][2] = 158;
|
||||
source[52][3] = 137;
|
||||
source[52][4] = 74;
|
||||
source[52][5] = 146;
|
||||
|
||||
|
||||
source[53][0] = 11;
|
||||
source[53][1] = 4;
|
||||
source[53][2] = 159;
|
||||
source[53][3] = 146;
|
||||
source[53][4] = 72;
|
||||
source[53][5] = 150;
|
||||
|
||||
|
||||
source[54][0] = 11;
|
||||
source[54][1] = 5;
|
||||
source[54][2] = 160;
|
||||
source[54][3] = 98;
|
||||
source[54][4] = 82;
|
||||
source[54][5] = 145;
|
||||
|
||||
source[55][0] = 12;
|
||||
source[55][1] = 1;
|
||||
source[55][2] = 153;
|
||||
source[55][3] = 106;
|
||||
source[55][4] = 62;
|
||||
source[55][5] = 122;
|
||||
|
||||
|
||||
source[56][0] = 12;
|
||||
source[56][1] = 2;
|
||||
source[56][2] = 168;
|
||||
source[56][3] = 125;
|
||||
source[56][4] = 85;
|
||||
source[56][5] = 164;
|
||||
|
||||
|
||||
source[57][0] = 12;
|
||||
source[57][1] = 3;
|
||||
source[57][2] = 159;
|
||||
source[57][3] = 137;
|
||||
source[57][4] = 72;
|
||||
source[57][5] = 144;
|
||||
|
||||
|
||||
source[58][0] = 12;
|
||||
source[58][1] = 4;
|
||||
source[58][2] = 162;
|
||||
source[58][3] = 146;
|
||||
source[58][4] = 73;
|
||||
source[58][5] = 149;
|
||||
|
||||
|
||||
source[59][0] = 12;
|
||||
source[59][1] = 5;
|
||||
source[59][2] = 167;
|
||||
source[59][3] = 99;
|
||||
source[59][4] = 70;
|
||||
source[59][5] = 148;
|
||||
return source;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
double[][] source = initialDemoSource();
|
||||
|
||||
T2GraphEntity[] all = new T2GraphEntity[12];
|
||||
|
||||
//取值
|
||||
for(int i=1;i<=12;i++){
|
||||
T2GraphEntity t = new T2GraphEntity();
|
||||
|
||||
for(int j=0;j<source.length;j++){
|
||||
if(source[j][0] == i){
|
||||
|
||||
//1=观察对象、2=心率 、3=收缩压 、4=舒张压 、5=体重 、
|
||||
t.getX1Source().add(source[j][1]);
|
||||
t.getX2Source().add(source[j][3]);
|
||||
}
|
||||
}
|
||||
all[i-1] = t;
|
||||
}
|
||||
|
||||
//计算每个子组的 x1bar、x2bar、S11、S12、S22
|
||||
System.out.println();
|
||||
for(int i=0;i<all.length;i++){
|
||||
T2GraphEntity t2 = all[i];
|
||||
double[] x1Source = ListTodouble(t2.getX1Source());
|
||||
double[] x2Source = ListTodouble(t2.getX2Source());
|
||||
double x1bar = getBar(x1Source);
|
||||
double x2bar = getBar(x2Source);
|
||||
t2.setX1bar(x1bar);
|
||||
t2.setX2bar(x2bar);
|
||||
t2.setS11(forS11(x1Source,x1bar));
|
||||
t2.setS12(forS12(x1Source,x1bar,x2Source,x2bar));
|
||||
t2.setS22(forS22(x2Source,x2bar));
|
||||
}
|
||||
|
||||
//计算母体的 x1barbar、x2barbar、S11bar、S12bar、S22bar
|
||||
double x1barbar = 0;
|
||||
double x2barbar = 0;
|
||||
double s11bar = 0;
|
||||
double s12bar = 0;
|
||||
double s22bar = 0;
|
||||
for(int i=0;i<all.length;i++){
|
||||
T2GraphEntity t2 = all[i];
|
||||
x1barbar += t2.getX1bar();
|
||||
x2barbar += t2.getX2bar();
|
||||
s11bar += t2.getS11();
|
||||
s12bar += t2.getS12();
|
||||
s22bar += t2.getS22();
|
||||
}
|
||||
x1barbar /= all.length;
|
||||
x2barbar /= all.length;
|
||||
s11bar /= all.length;
|
||||
s12bar /= all.length;
|
||||
s22bar /= all.length;
|
||||
|
||||
//算 Ti2
|
||||
double[][] sbar = new double[2][2];
|
||||
sbar[0][0] = s11bar;
|
||||
sbar[0][1] = s12bar;
|
||||
sbar[1][0] = s12bar;
|
||||
sbar[1][1] = s22bar;
|
||||
double[][] inverse = inverseSE(sbar);
|
||||
|
||||
double[] xbarbar = new double[2];
|
||||
xbarbar[0] = x1barbar;
|
||||
xbarbar[1] = x2barbar;
|
||||
for(int i=0;i<all.length;i++){
|
||||
T2GraphEntity t2 = all[i];
|
||||
double[] xibar = new double[2];
|
||||
xibar[0] = t2.getX1bar();
|
||||
xibar[1] = t2.getX2bar();
|
||||
double ti = forTi2(xibar, xbarbar, inverse);
|
||||
t2.setTi(ti*6);
|
||||
}
|
||||
System.out.println();
|
||||
|
||||
//算 ucl
|
||||
//创建一个F分布对象,参数为自由度
|
||||
FDistribution fd = new FDistribution(2,59);
|
||||
//当α=0.05时,参数为1-α=0.95
|
||||
double v = fd.inverseCumulativeProbability(0.99865);
|
||||
//输出值
|
||||
System.out.println("v: "+v);
|
||||
double m = 12;
|
||||
double n = 6;
|
||||
double p = 2;
|
||||
double head = (double) 110/(double)59;
|
||||
double ucl = head*v;
|
||||
System.out.println();
|
||||
|
||||
for(int i=0;i< all.length;i++){
|
||||
T2GraphEntity t2GraphEntity = all[i];
|
||||
System.out.println(i+" 位置: "+t2GraphEntity.getTi());
|
||||
}
|
||||
System.out.println("ucl:" + ucl);
|
||||
}
|
||||
|
||||
public static double[] ListTodouble(List<Double> list){
|
||||
Double[] doubles=new Double[list.size()];
|
||||
list.toArray(doubles);
|
||||
if(doubles==null){
|
||||
return null;
|
||||
}
|
||||
double[] result=new double[doubles.length];
|
||||
for(int i=0;i<doubles.length;i++){
|
||||
result[i]=doubles[i].doubleValue();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static double getBar(double[] d){
|
||||
return Arrays.stream(d).average().getAsDouble();
|
||||
}
|
||||
|
||||
public static double forS11(double[] source , double x1bar){
|
||||
double all = 0;
|
||||
for(int i=0;i<source.length;i++){
|
||||
double c = source[i]-x1bar;
|
||||
all += c*c;
|
||||
}
|
||||
return all/(source.length-1);
|
||||
}
|
||||
public static Double forS12(double[] source1 , double x1bar , double[] source2 , double x2bar){
|
||||
double all = 0;
|
||||
if(source1.length != source2.length){
|
||||
return null;
|
||||
}
|
||||
for(int i=0;i<source1.length;i++){
|
||||
double c1 = source1[i]-x1bar;
|
||||
double c2 = source2[i]-x2bar;
|
||||
all += c1*c2;
|
||||
}
|
||||
return all/(source1.length-1);
|
||||
}
|
||||
public static double forS22(double[] source , double x2bar){
|
||||
double all = 0;
|
||||
for(int i=0;i<source.length;i++){
|
||||
double c = source[i]-x2bar;
|
||||
all += c*c;
|
||||
}
|
||||
return all/(source.length-1);
|
||||
}
|
||||
|
||||
public static double forTi2(double[] xibar,double[] xbarbar,double[][] inverse) {
|
||||
|
||||
double[] xf = new double[2];
|
||||
xf[0] = xibar[0]-xbarbar[0];
|
||||
xf[1] = xibar[1]-xbarbar[1];
|
||||
|
||||
double[] ff = new double[2];
|
||||
ff[0] = xf[0]*inverse[0][0] + xf[1]*inverse[1][0];
|
||||
ff[1] = xf[0]*inverse[0][1] + xf[1]*inverse[1][1];
|
||||
|
||||
return ff[0]*xf[0] + ff[1]*xf[1];
|
||||
|
||||
}
|
||||
|
||||
public static double formatDouble(double d) {
|
||||
// 新方法,如果不需要四舍五入,可以使用RoundingMode.DOWN
|
||||
BigDecimal bg = new BigDecimal(d).setScale(4, RoundingMode.UP);
|
||||
return bg.doubleValue();
|
||||
}
|
||||
|
||||
//2阶矩阵 求逆
|
||||
public static double[][] inverseSE(double[][] source){
|
||||
double a = source[0][0];
|
||||
double b = source[0][1];
|
||||
double c = source[1][0];
|
||||
double d = source[1][1];
|
||||
double to = 1/(a*d-b*c);
|
||||
double[][] res = new double[2][2];
|
||||
// res[0][0] = formatDouble(d*to);
|
||||
// res[0][1] = formatDouble(b*to*-1);
|
||||
// res[1][0] = formatDouble(c*to*-1);
|
||||
// res[1][1] = formatDouble(a*to);
|
||||
res[0][0] = d*to;
|
||||
res[0][1] = b*to*-1;
|
||||
res[1][0] = c*to*-1;
|
||||
res[1][1] = a*to;
|
||||
return res;
|
||||
}
|
||||
|
||||
//获取矩阵的逆
|
||||
public static int[][] inverse(int[][] A) {
|
||||
int[][] B = new int[A.length][A[0].length];
|
||||
for (int i = 0; i < A.length; i++) {
|
||||
for (int j = 0; j < A[0].length; j++) {
|
||||
B[i][j] = A[i][j];
|
||||
}
|
||||
}
|
||||
int[][] C = new int[A.length][A[0].length];
|
||||
for (int i = 0; i < A.length; i++) {
|
||||
for (int j = 0; j < A[0].length; j++) {
|
||||
C[i][j] = (int) java.lang.Math.pow(-1, i + j) * determinant(minor(B, j, i));
|
||||
}
|
||||
}
|
||||
int[][] D = new int[A.length][A[0].length];
|
||||
for (int i = 0; i < A.length; i++) {
|
||||
for (int j = 0; j < A[0].length; j++) {
|
||||
D[i][j] = C[i][j] / determinant(A);
|
||||
}
|
||||
}
|
||||
return D;
|
||||
}
|
||||
//求解矩阵的行列式
|
||||
private static int determinant(int[][] a) {
|
||||
if (a.length == 1) {
|
||||
return a[0][0];
|
||||
}
|
||||
int det = 0;
|
||||
for (int i = 0; i < a[0].length; i++) {
|
||||
det += (int) java.lang.Math.pow(-1, i) * a[0][i] * determinant(minor(a, 0, i));
|
||||
}
|
||||
return det;
|
||||
}
|
||||
//求解二维矩阵在某一位置的伴随矩阵
|
||||
private static int[][] minor(int[][] b, int i, int j) {
|
||||
int[][] a = new int[b.length - 1][b[0].length - 1];
|
||||
for (int x = 0, y = 0; x < b.length; x++) {
|
||||
if (x == i) {
|
||||
continue;
|
||||
}
|
||||
for (int m = 0,n = 0; m < b[0].length; m++) {
|
||||
if (m == j) {
|
||||
continue;
|
||||
}
|
||||
a[y][n] = b[x][m];
|
||||
n++;
|
||||
}
|
||||
y++;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cnbm.common.spc.math;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -8,10 +10,13 @@ import lombok.Data;
|
||||
* @DATE: 2022/7/25 15:23
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "标准差结果类")
|
||||
public class StandardDiviation {
|
||||
//标准差
|
||||
//组内标准差
|
||||
@ApiModelProperty(value = "组内标准差")
|
||||
private Double normal;
|
||||
//总体标准差
|
||||
@ApiModelProperty(value = "总体标准差")
|
||||
private Double totality;
|
||||
|
||||
public StandardDiviation(Double normal, Double totality) {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.cnbm.common.spc.math.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Desc: ""
|
||||
* @Author: caixiang
|
||||
* @DATE: 2022/9/9 15:26
|
||||
*/
|
||||
@Data
|
||||
public class T2GraphEntity {
|
||||
private double x1bar;
|
||||
private double x2bar;
|
||||
private double s11;
|
||||
private double s12;
|
||||
private double s22;
|
||||
private double ti;
|
||||
private List<Double> x1Source;
|
||||
private List<Double> x2Source;
|
||||
|
||||
public T2GraphEntity(){
|
||||
x1Source = new ArrayList<>();
|
||||
x2Source = new ArrayList<>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,6 +23,8 @@ public class DataUtils {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<List<Date>> split(List<Date> value) {
|
||||
List<List<Date>> result = new ArrayList<>();
|
||||
|
||||
|
||||
@@ -86,4 +86,61 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.5.12</version>
|
||||
<configuration>
|
||||
<!--指定运行main函数的包-->
|
||||
<mainClass>com.cnbm.YmApplication</mainClass>
|
||||
<!--开启分层编译支持-->
|
||||
<layers>
|
||||
<enabled>true</enabled>
|
||||
<configuration>${project.basedir}/src/main/resources/layers.xml</configuration>
|
||||
</layers>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${docker.plugin.version}</version>
|
||||
<configuration>
|
||||
<imageName>ym-pass/${project.artifactId}</imageName>
|
||||
<dockerDirectory>${project.basedir}/</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -21,14 +21,11 @@ import springfox.documentation.spi.service.contexts.SecurityContext;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider;
|
||||
import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.google.common.collect.Lists.newArrayList;
|
||||
|
||||
/**
|
||||
* @Author weihongyang
|
||||
* @Date 2022/6/21 10:56 AM
|
||||
@@ -128,6 +125,7 @@ public class SwaggerConfig {
|
||||
.securitySchemes(Arrays.asList(new ApiKey("token", "token", "header")));
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
public Docket processInspectionApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
|
||||
@@ -65,16 +65,16 @@ spring:
|
||||
# username: postgres
|
||||
# password: 123456
|
||||
|
||||
influx:
|
||||
url: http://192.168.0.170:8086 # URL to connect to InfluxDB.
|
||||
username: caixiang # Username to use in the basic auth.
|
||||
password: 251128856 # Password to use in the basic auth.
|
||||
token: lkBsC27QZr1W50BSPlGxpTqNNpwuUk5uz1dZZRPSPbCG5VmNDDUo8P3UkZIhGWwfJwkuz6ZGZ7Et4_KBaG3gHw== # Token to use for the authorization.
|
||||
org: qgs # Default destination organization for writes and queries.
|
||||
bucket: qgs-bucket # Default destination bucket for writes.
|
||||
logLevel: BODY # The log level for logging the HTTP request and HTTP response. (Default: NONE)
|
||||
readTimeout: 5s # Read timeout for OkHttpClient. (Default: 10s)
|
||||
writeTimeout: 5s # Write timeout for OkHttpClient. (Default: 10s)
|
||||
connectTimeout: 5s # Connection timeout for OkHttpClient. (Default: 10s)
|
||||
#influx:
|
||||
# url: http://192.168.0.170:8086 # URL to connect to InfluxDB.
|
||||
# username: caixiang # Username to use in the basic auth.
|
||||
# password: 251128856 # Password to use in the basic auth.
|
||||
# token: lkBsC27QZr1W50BSPlGxpTqNNpwuUk5uz1dZZRPSPbCG5VmNDDUo8P3UkZIhGWwfJwkuz6ZGZ7Et4_KBaG3gHw== # Token to use for the authorization.
|
||||
# org: qgs # Default destination organization for writes and queries.
|
||||
# bucket: qgs-bucket # Default destination bucket for writes.
|
||||
# logLevel: BODY # The log level for logging the HTTP request and HTTP response. (Default: NONE)
|
||||
# readTimeout: 5s # Read timeout for OkHttpClient. (Default: 10s)
|
||||
# writeTimeout: 5s # Write timeout for OkHttpClient. (Default: 10s)
|
||||
# connectTimeout: 5s # Connection timeout for OkHttpClient. (Default: 10s)
|
||||
|
||||
# management.health.influx.enabled=true # Whether to enable InfluxDB 2.x health check.
|
||||
@@ -33,9 +33,9 @@ spring:
|
||||
enabled: true
|
||||
redis:
|
||||
database: 2
|
||||
host: redis.picaiba.com
|
||||
port: 6380
|
||||
password: '@WSXcde3' # 密码(默认为空)
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
password: '' # 密码(默认为空)
|
||||
timeout: 6000ms # 连接超时时长(毫秒)
|
||||
jedis:
|
||||
pool:
|
||||
|
||||
27
ym-gateway/src/main/resources/layers.xml
Normal file
27
ym-gateway/src/main/resources/layers.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<layers xmlns="http://www.springframework.org/schema/boot/layers"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/boot/layers
|
||||
https://www.springframework.org/schema/boot/layers/layers.xsd">
|
||||
<application>
|
||||
<into layer="spring-boot-loader">
|
||||
<include>org/springframework/boot/loader/**</include>
|
||||
</into>
|
||||
<into layer="application" />
|
||||
</application>
|
||||
<dependencies>
|
||||
<into layer="snapshot-dependencies">
|
||||
<include>*:*:*SNAPSHOT</include>
|
||||
</into>
|
||||
<into layer="company-dependencies">
|
||||
<include>com.cnbm:*</include>
|
||||
</into>
|
||||
<into layer="dependencies"/>
|
||||
</dependencies>
|
||||
<layerOrder>
|
||||
<layer>dependencies</layer>
|
||||
<layer>spring-boot-loader</layer>
|
||||
<layer>snapshot-dependencies</layer>
|
||||
<layer>company-dependencies</layer>
|
||||
<layer>application</layer>
|
||||
</layerOrder>
|
||||
</layers>
|
||||
@@ -19,7 +19,7 @@ public class CodeGenerator {
|
||||
|
||||
@Test
|
||||
public void test(){
|
||||
mybatisPlusGenerator(new String[]{"product_type"});
|
||||
mybatisPlusGenerator(new String[]{"unit"});
|
||||
}
|
||||
|
||||
public static void mybatisPlusGenerator(String[] include){
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.cnbm.generator.code.controller;
|
||||
|
||||
import com.cnbm.admin.annotation.LogOperation;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.utils.ExcelUtils;
|
||||
import com.cnbm.common.utils.Result;
|
||||
import com.cnbm.common.validator.AssertUtils;
|
||||
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.generator.code.dto.InspectionSheetDTO;
|
||||
import com.cnbm.generator.code.excel.InspectionSheetExcel;
|
||||
import com.cnbm.generator.code.service.IInspectionSheetService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 检验单 表 前端控制器
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-12-07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/code/inspectionSheet")
|
||||
@Api(tags="检验单 表")
|
||||
public class InspectionSheetController {
|
||||
@Autowired
|
||||
private IInspectionSheetService inspectionSheetService;
|
||||
|
||||
@GetMapping("page")
|
||||
@ApiOperation("分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", 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, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class)
|
||||
})
|
||||
@PreAuthorize("@ex.hasAuthority('code:inspectionSheet:page')")
|
||||
public Result<PageData<InspectionSheetDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
PageData<InspectionSheetDTO> page = inspectionSheetService.page(params);
|
||||
return new Result<PageData<InspectionSheetDTO>>().ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("信息")
|
||||
@PreAuthorize("@ex.hasAuthority('code:inspectionSheet:info')")
|
||||
public Result<InspectionSheetDTO> get(@PathVariable("id") Long id){
|
||||
InspectionSheetDTO data = inspectionSheetService.get(id);
|
||||
return new Result<InspectionSheetDTO>().ok(data);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
@LogOperation("保存")
|
||||
@PreAuthorize("@ex.hasAuthority('code:inspectionSheet:save')")
|
||||
public Result<Long> save(@RequestBody InspectionSheetDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
try {
|
||||
inspectionSheetService.save(dto);
|
||||
}catch (Exception e){
|
||||
return new Result<Long>().error(1,"没有发现检验参数");
|
||||
}
|
||||
return new Result<Long>().ok(dto.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
@PreAuthorize("@ex.hasAuthority('code:inspectionSheet:update')")
|
||||
public Result<Long> update(@RequestBody InspectionSheetDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
inspectionSheetService.update(dto);
|
||||
return new Result<Long>().ok(dto.getId());
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除")
|
||||
@LogOperation("删除")
|
||||
@PreAuthorize("@ex.hasAuthority('code:inspectionSheet:delete')")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
inspectionSheetService.delete(ids);
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
@LogOperation("导出")
|
||||
@PreAuthorize("@ex.hasAuthority('code:inspectionSheet:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<InspectionSheetDTO> list = inspectionSheetService.list(params);
|
||||
ExcelUtils.exportExcelToTarget(response, null, list, InspectionSheetExcel.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.cnbm.generator.code.controller;
|
||||
|
||||
import com.cnbm.admin.annotation.LogOperation;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.utils.ExcelUtils;
|
||||
import com.cnbm.common.utils.Result;
|
||||
import com.cnbm.common.validator.AssertUtils;
|
||||
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.generator.code.dto.ProductFeaturesDTO;
|
||||
import com.cnbm.generator.code.excel.ProductFeaturesExcel;
|
||||
import com.cnbm.generator.code.service.IProductFeaturesService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 产品特性 表 前端控制器
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-08-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/code/productFeatures")
|
||||
@Api(tags="产品特性 表")
|
||||
public class ProductFeaturesController {
|
||||
@Autowired
|
||||
private IProductFeaturesService productFeaturesService;
|
||||
|
||||
@GetMapping("page")
|
||||
@ApiOperation("分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", 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, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class)
|
||||
})
|
||||
@PreAuthorize("@ex.hasAuthority('code:productFeatures:page')")
|
||||
public Result<PageData<ProductFeaturesDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
PageData<ProductFeaturesDTO> page = productFeaturesService.page(params);
|
||||
|
||||
return new Result<PageData<ProductFeaturesDTO>>().ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("信息")
|
||||
@PreAuthorize("@ex.hasAuthority('code:productFeatures:info')")
|
||||
public Result<ProductFeaturesDTO> get(@PathVariable("id") Long id){
|
||||
ProductFeaturesDTO data = productFeaturesService.get(id);
|
||||
|
||||
return new Result<ProductFeaturesDTO>().ok(data);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
@LogOperation("保存")
|
||||
@PreAuthorize("@ex.hasAuthority('code:productFeatures:save')")
|
||||
public Result<Long> save(@RequestBody ProductFeaturesDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
|
||||
productFeaturesService.save(dto);
|
||||
|
||||
return new Result<Long>().ok(dto.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
@LogOperation("修改")
|
||||
@PreAuthorize("@ex.hasAuthority('code:productFeatures:update')")
|
||||
public Result<Long> update(@RequestBody ProductFeaturesDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
|
||||
productFeaturesService.update(dto);
|
||||
|
||||
return new Result<Long>().ok(dto.getId());
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除")
|
||||
@LogOperation("删除")
|
||||
@PreAuthorize("@ex.hasAuthority('code:productFeatures:delete')")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
|
||||
productFeaturesService.delete(ids);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
@LogOperation("导出")
|
||||
@PreAuthorize("@ex.hasAuthority('code:productFeatures:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<ProductFeaturesDTO> list = productFeaturesService.list(params);
|
||||
|
||||
ExcelUtils.exportExcelToTarget(response, null, list, ProductFeaturesExcel.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.cnbm.generator.code.controller;
|
||||
|
||||
import com.cnbm.admin.annotation.LogOperation;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.utils.ExcelUtils;
|
||||
import com.cnbm.common.utils.Result;
|
||||
import com.cnbm.common.validator.AssertUtils;
|
||||
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.generator.code.dto.ProductTypeDTO;
|
||||
import com.cnbm.generator.code.excel.ProductTypeExcel;
|
||||
import com.cnbm.generator.code.service.IProductTypeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 产品类型 表 前端控制器
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-08-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/code/productType")
|
||||
@Api(tags="产品类型 表")
|
||||
public class ProductTypeController {
|
||||
@Autowired
|
||||
private IProductTypeService productTypeService;
|
||||
|
||||
@GetMapping("page")
|
||||
@ApiOperation("分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", 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, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class)
|
||||
})
|
||||
@PreAuthorize("@ex.hasAuthority('code:productType:page')")
|
||||
public Result<PageData<ProductTypeDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
PageData<ProductTypeDTO> page = productTypeService.page(params);
|
||||
|
||||
return new Result<PageData<ProductTypeDTO>>().ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("信息")
|
||||
@PreAuthorize("@ex.hasAuthority('code:productType:info')")
|
||||
public Result<ProductTypeDTO> get(@PathVariable("id") Long id){
|
||||
ProductTypeDTO data = productTypeService.get(id);
|
||||
|
||||
return new Result<ProductTypeDTO>().ok(data);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
@LogOperation("保存")
|
||||
@PreAuthorize("@ex.hasAuthority('code:productType:save')")
|
||||
public Result<Long> save(@RequestBody ProductTypeDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
|
||||
productTypeService.save(dto);
|
||||
|
||||
return new Result<Long>().ok(dto.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
@LogOperation("修改")
|
||||
@PreAuthorize("@ex.hasAuthority('code:productType:update')")
|
||||
public Result<Long> update(@RequestBody ProductTypeDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
|
||||
productTypeService.update(dto);
|
||||
|
||||
return new Result<Long>().ok(dto.getId());
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除")
|
||||
@LogOperation("删除")
|
||||
@PreAuthorize("@ex.hasAuthority('code:productType:delete')")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
|
||||
productTypeService.delete(ids);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
@LogOperation("导出")
|
||||
@PreAuthorize("@ex.hasAuthority('code:productType:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<ProductTypeDTO> list = productTypeService.list(params);
|
||||
|
||||
ExcelUtils.exportExcelToTarget(response, null, list, ProductTypeExcel.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.cnbm.generator.code.controller;
|
||||
|
||||
import com.cnbm.admin.annotation.LogOperation;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.utils.ExcelUtils;
|
||||
import com.cnbm.common.utils.Result;
|
||||
import com.cnbm.common.validator.AssertUtils;
|
||||
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.generator.code.dto.UnitDTO;
|
||||
import com.cnbm.generator.code.excel.UnitExcel;
|
||||
import com.cnbm.generator.code.service.IUnitService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 单位 表 前端控制器
|
||||
*
|
||||
* @author why
|
||||
* @since 2023-01-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/code/unit")
|
||||
@Api(tags="单位 表")
|
||||
public class UnitController {
|
||||
@Autowired
|
||||
private IUnitService unitService;
|
||||
|
||||
@GetMapping("page")
|
||||
@ApiOperation("分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", 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, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class)
|
||||
})
|
||||
@PreAuthorize("@ex.hasAuthority('code:unit:page')")
|
||||
public Result<PageData<UnitDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
PageData<UnitDTO> page = unitService.page(params);
|
||||
|
||||
return new Result<PageData<UnitDTO>>().ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("信息")
|
||||
@PreAuthorize("@ex.hasAuthority('code:unit:info')")
|
||||
public Result<UnitDTO> get(@PathVariable("id") Long id){
|
||||
UnitDTO data = unitService.get(id);
|
||||
|
||||
return new Result<UnitDTO>().ok(data);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
@LogOperation("保存")
|
||||
@PreAuthorize("@ex.hasAuthority('code:unit:save')")
|
||||
public Result<Long> save(@RequestBody UnitDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
|
||||
unitService.save(dto);
|
||||
|
||||
return new Result<Long>().ok(dto.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
@LogOperation("修改")
|
||||
@PreAuthorize("@ex.hasAuthority('code:unit:update')")
|
||||
public Result<Long> update(@RequestBody UnitDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
|
||||
unitService.update(dto);
|
||||
|
||||
return new Result<Long>().ok(dto.getId());
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除")
|
||||
@LogOperation("删除")
|
||||
@PreAuthorize("@ex.hasAuthority('code:unit:delete')")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
|
||||
unitService.delete(ids);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
@LogOperation("导出")
|
||||
@PreAuthorize("@ex.hasAuthority('code:unit:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<UnitDTO> list = unitService.list(params);
|
||||
|
||||
ExcelUtils.exportExcelToTarget(response, null, list, UnitExcel.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.cnbm.generator.code.controller;
|
||||
|
||||
import com.cnbm.admin.annotation.LogOperation;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.utils.ExcelUtils;
|
||||
import com.cnbm.common.utils.Result;
|
||||
import com.cnbm.common.validator.AssertUtils;
|
||||
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.generator.code.dto.UserDTO;
|
||||
import com.cnbm.generator.code.excel.UserExcel;
|
||||
import com.cnbm.generator.code.service.IUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 系统用户 前端控制器
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-08-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/code/user")
|
||||
@Api(tags="系统用户")
|
||||
public class UserController {
|
||||
@Autowired
|
||||
private IUserService userService;
|
||||
|
||||
@GetMapping("page")
|
||||
@ApiOperation("分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", 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, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class)
|
||||
})
|
||||
@PreAuthorize("@ex.hasAuthority('code:user:page')")
|
||||
public Result<PageData<UserDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
PageData<UserDTO> page = userService.page(params);
|
||||
|
||||
return new Result<PageData<UserDTO>>().ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("信息")
|
||||
@PreAuthorize("@ex.hasAuthority('code:user:info')")
|
||||
public Result<UserDTO> get(@PathVariable("id") Long id){
|
||||
UserDTO data = userService.get(id);
|
||||
|
||||
return new Result<UserDTO>().ok(data);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
@LogOperation("保存")
|
||||
@PreAuthorize("@ex.hasAuthority('code:user:save')")
|
||||
public Result<Long> save(@RequestBody UserDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
|
||||
userService.save(dto);
|
||||
|
||||
return new Result<Long>().ok(dto.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
@LogOperation("修改")
|
||||
@PreAuthorize("@ex.hasAuthority('code:user:update')")
|
||||
public Result<Long> update(@RequestBody UserDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
|
||||
userService.update(dto);
|
||||
|
||||
return new Result<Long>().ok(dto.getId());
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除")
|
||||
@LogOperation("删除")
|
||||
@PreAuthorize("@ex.hasAuthority('code:user:delete')")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
|
||||
userService.delete(ids);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
@LogOperation("导出")
|
||||
@PreAuthorize("@ex.hasAuthority('code:user:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<UserDTO> list = userService.list(params);
|
||||
|
||||
ExcelUtils.exportExcelToTarget(response, null, list, UserExcel.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.cnbm.generator.code.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 检验单 表
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-12-07
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "检验单 表DTO对象")
|
||||
public class InspectionSheetDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "订单号,手动输入")
|
||||
private String orderNumber;
|
||||
|
||||
@ApiModelProperty(value = "批次号,手填")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty(value = "检验站点,手填")
|
||||
private String inspectionSite;
|
||||
|
||||
@ApiModelProperty(value = "产品id,关联product表")
|
||||
private Long productId;
|
||||
|
||||
@ApiModelProperty(value = "检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验")
|
||||
private Integer inspectionStage;
|
||||
|
||||
@ApiModelProperty(value = "工序id,关联working_procedure表")
|
||||
private Long workingProcedureId;
|
||||
|
||||
@ApiModelProperty(value = "机台id,关联machine表")
|
||||
private Long machineId;
|
||||
|
||||
@ApiModelProperty(value = "班次id,关联shift表")
|
||||
private Long shiftId;
|
||||
|
||||
@ApiModelProperty(value = "分组样本数(就是这个产品下所有检测参数 的 最大样本数),只给用户查看,值是后台自动计算的")
|
||||
private Integer numberOfGroupedSamples;
|
||||
|
||||
@ApiModelProperty(value = "样本大小(就是检验单(母体)下的子样个数),只给用户查看,值是后台自动计算的")
|
||||
private Integer numberOfSamples;
|
||||
|
||||
@ApiModelProperty(value = "缺陷数量,只给用户查看,值是后台自动计算的(是以 这个检验单下 样本子样 为单位的 )")
|
||||
private Integer numberOfDefects;
|
||||
|
||||
@ApiModelProperty(value = "不良数量,只给用户查看,值是后台自动计算的(是以 这个检验单下 样本子样 为单位的 )")
|
||||
private Integer defectiveQuantity;
|
||||
|
||||
@ApiModelProperty(value = "生产人")
|
||||
private String producer;
|
||||
|
||||
@ApiModelProperty(value = "检验人")
|
||||
private String inspector;
|
||||
|
||||
@ApiModelProperty(value = "产品特性类型:1 计量型;2 计数型")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "1 可用,0 不可用")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用")
|
||||
private Integer valid;
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private Long creatorId;
|
||||
|
||||
@ApiModelProperty(value = "创建人姓名")
|
||||
private String creatorName;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private Long updaterId;
|
||||
|
||||
@ApiModelProperty(value = "更新人姓名")
|
||||
private String updaterName;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.cnbm.generator.code.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 产品特性 表
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-08-23
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "产品特性 表DTO对象")
|
||||
public class ProductFeaturesDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long productId;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long measureToolId;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long unitId;
|
||||
|
||||
@ApiModelProperty(value = "产品特性 名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "产品特性 编码")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "产品特性类型:1 计量型;2 计数型")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "缺陷等级:1 致命缺陷;2 严重缺陷;3.轻微缺陷")
|
||||
private Integer defectLevel;
|
||||
|
||||
@ApiModelProperty(value = "产品特性 规格")
|
||||
private String specifications;
|
||||
|
||||
@ApiModelProperty(value = "检验参数 规格下线")
|
||||
private Float lsl;
|
||||
|
||||
@ApiModelProperty(value = "检验参数 规格中心线")
|
||||
private Float sl;
|
||||
|
||||
@ApiModelProperty(value = "检验参数 规格上线")
|
||||
private Float usl;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long workingProcedureId;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long controlGraphId;
|
||||
|
||||
@ApiModelProperty(value = "是否需要spc分析,1 yes;0 no")
|
||||
private Integer isSpc;
|
||||
|
||||
@ApiModelProperty(value = "样本大小,一般2-25之间。 会依据这个size 把所有待分析的数据 组成一个一个样本")
|
||||
private Integer sampleSize;
|
||||
|
||||
@ApiModelProperty(value = "采样频率,只用于展示")
|
||||
private String samplingFrequency;
|
||||
|
||||
@ApiModelProperty(value = "小数位数(限制 检验参数小数点后面位数),这个先放着后续再说。")
|
||||
private Integer decimalPlaces;
|
||||
|
||||
@ApiModelProperty(value = "目标cpk")
|
||||
private Float targetCpk;
|
||||
|
||||
@ApiModelProperty(value = "目标cpk")
|
||||
private Float targetPpk;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用")
|
||||
private Integer valid;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long creatorId;
|
||||
|
||||
@ApiModelProperty(value = "创建人姓名")
|
||||
private String creatorName;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long updaterId;
|
||||
|
||||
@ApiModelProperty(value = "更新人姓名")
|
||||
private String updaterName;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.cnbm.generator.code.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 产品类型 表
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-08-23
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "产品类型 表DTO对象")
|
||||
public class ProductTypeDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "产品类型 名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "产品类型 编码")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String descs;
|
||||
|
||||
@ApiModelProperty(value = "1 可用,0 不可用")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用")
|
||||
private Integer valid;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long creatorId;
|
||||
|
||||
@ApiModelProperty(value = "创建人姓名")
|
||||
private String creatorName;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long updaterId;
|
||||
|
||||
@ApiModelProperty(value = "更新人姓名")
|
||||
private String updaterName;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.cnbm.generator.code.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 单位 表
|
||||
*
|
||||
* @author why
|
||||
* @since 2023-01-12
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "单位 表DTO对象")
|
||||
public class UnitDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "单位 名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "单位 编码")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "单位类型,1 可计数,2 不可计数")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "1 可用,0 不可用")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用")
|
||||
private Integer valid;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long creatorId;
|
||||
|
||||
@ApiModelProperty(value = "创建人姓名")
|
||||
private String creatorName;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long updaterId;
|
||||
|
||||
@ApiModelProperty(value = "更新人姓名")
|
||||
private String updaterName;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.cnbm.generator.code.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 系统用户
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-08-23
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "系统用户DTO对象")
|
||||
public class UserDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "密码")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String realName;
|
||||
|
||||
@ApiModelProperty(value = "头像")
|
||||
private String headUrl;
|
||||
|
||||
@ApiModelProperty(value = "性别 0:男 1:女 2:保密")
|
||||
private Integer gender;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty(value = "部门ID")
|
||||
private Long deptId;
|
||||
|
||||
@ApiModelProperty(value = "超级管理员 0:否 1:是")
|
||||
private Integer superAdmin;
|
||||
|
||||
@ApiModelProperty(value = "状态 0:停用 1:正常")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "创建者")
|
||||
private Long creator;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createDate;
|
||||
|
||||
@ApiModelProperty(value = "更新者")
|
||||
private Long updater;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updateDate;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.cnbm.generator.code.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检验单 表
|
||||
* </p>
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-12-07
|
||||
*/
|
||||
@Data
|
||||
@TableName("inspection_sheet")
|
||||
@ApiModel(value = "InspectionSheet对象", description = "检验单 表")
|
||||
public class InspectionSheet implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("订单号,手动输入")
|
||||
private String orderNumber;
|
||||
|
||||
@ApiModelProperty("批次号,手填")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("检验站点,手填")
|
||||
private String inspectionSite;
|
||||
|
||||
@ApiModelProperty("产品id,关联product表")
|
||||
private Long productId;
|
||||
|
||||
@ApiModelProperty("检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验")
|
||||
private Integer inspectionStage;
|
||||
|
||||
@ApiModelProperty("工序id,关联working_procedure表")
|
||||
private Long workingProcedureId;
|
||||
|
||||
@ApiModelProperty("机台id,关联machine表")
|
||||
private Long machineId;
|
||||
|
||||
@ApiModelProperty("班次id,关联shift表")
|
||||
private Long shiftId;
|
||||
|
||||
@ApiModelProperty("分组样本数(就是这个产品下所有检测参数 的 最大样本数),只给用户查看,值是后台自动计算的")
|
||||
private Integer numberOfGroupedSamples;
|
||||
|
||||
@ApiModelProperty("样本大小(就是检验单(母体)下的子样个数),只给用户查看,值是后台自动计算的")
|
||||
private Integer numberOfSamples;
|
||||
|
||||
@ApiModelProperty("缺陷数量,只给用户查看,值是后台自动计算的(是以 这个检验单下 样本子样 为单位的 )")
|
||||
private Integer numberOfDefects;
|
||||
|
||||
@ApiModelProperty("不良数量,只给用户查看,值是后台自动计算的(是以 这个检验单下 样本子样 为单位的 )")
|
||||
private Integer defectiveQuantity;
|
||||
|
||||
@ApiModelProperty("生产人")
|
||||
private String producer;
|
||||
|
||||
@ApiModelProperty("检验人")
|
||||
private String inspector;
|
||||
|
||||
@ApiModelProperty("产品特性类型:1 计量型;2 计数型")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("1 可用,0 不可用")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
private Long creatorId;
|
||||
|
||||
@ApiModelProperty("创建人姓名")
|
||||
private String creatorName;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新人")
|
||||
private Long updaterId;
|
||||
|
||||
@ApiModelProperty("更新人姓名")
|
||||
private String updaterName;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty("版本号")
|
||||
private Integer version;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.cnbm.generator.code.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品特性 表
|
||||
* </p>
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-08-23
|
||||
*/
|
||||
@Data
|
||||
@TableName("product_features")
|
||||
@ApiModel(value = "ProductFeatures对象", description = "产品特性 表")
|
||||
public class ProductFeatures implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
private Long productId;
|
||||
|
||||
private Long measureToolId;
|
||||
|
||||
private Long unitId;
|
||||
|
||||
@ApiModelProperty("产品特性 名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("产品特性 编码")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("产品特性类型:1 计量型;2 计数型")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("缺陷等级:1 致命缺陷;2 严重缺陷;3.轻微缺陷")
|
||||
private Integer defectLevel;
|
||||
|
||||
@ApiModelProperty("产品特性 规格")
|
||||
private String specifications;
|
||||
|
||||
@ApiModelProperty("检验参数 规格下线")
|
||||
private Float lsl;
|
||||
|
||||
@ApiModelProperty("检验参数 规格中心线")
|
||||
private Float sl;
|
||||
|
||||
@ApiModelProperty("检验参数 规格上线")
|
||||
private Float usl;
|
||||
|
||||
private Long workingProcedureId;
|
||||
|
||||
private Long controlGraphId;
|
||||
|
||||
@ApiModelProperty("是否需要spc分析,1 yes;0 no")
|
||||
private Integer isSpc;
|
||||
|
||||
@ApiModelProperty("样本大小,一般2-25之间。 会依据这个size 把所有待分析的数据 组成一个一个样本")
|
||||
private Integer sampleSize;
|
||||
|
||||
@ApiModelProperty("采样频率,只用于展示")
|
||||
private String samplingFrequency;
|
||||
|
||||
@ApiModelProperty("小数位数(限制 检验参数小数点后面位数),这个先放着后续再说。")
|
||||
private Integer decimalPlaces;
|
||||
|
||||
@ApiModelProperty("目标cpk")
|
||||
private Float targetCpk;
|
||||
|
||||
@ApiModelProperty("目标cpk")
|
||||
private Float targetPpk;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
|
||||
private Integer valid;
|
||||
|
||||
private Long creatorId;
|
||||
|
||||
@ApiModelProperty("创建人姓名")
|
||||
private String creatorName;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private Long updaterId;
|
||||
|
||||
@ApiModelProperty("更新人姓名")
|
||||
private String updaterName;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty("版本号")
|
||||
private Integer version;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.cnbm.generator.code.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品类型 表
|
||||
* </p>
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-08-23
|
||||
*/
|
||||
@Data
|
||||
@TableName("product_type")
|
||||
@ApiModel(value = "ProductType对象", description = "产品类型 表")
|
||||
public class ProductType implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("产品类型 名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("产品类型 编码")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("描述")
|
||||
private String descs;
|
||||
|
||||
@ApiModelProperty("1 可用,0 不可用")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
private Long creatorId;
|
||||
|
||||
@ApiModelProperty("创建人姓名")
|
||||
private String creatorName;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private Long updaterId;
|
||||
|
||||
@ApiModelProperty("更新人姓名")
|
||||
private String updaterName;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty("版本号")
|
||||
private Integer version;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.cnbm.generator.code.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 单位 表
|
||||
* </p>
|
||||
*
|
||||
* @author why
|
||||
* @since 2023-01-12
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "Unit对象", description = "单位 表")
|
||||
public class Unit implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("单位 名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("单位 编码")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("单位类型,1 可计数,2 不可计数")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("1 可用,0 不可用")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
private Long creatorId;
|
||||
|
||||
@ApiModelProperty("创建人姓名")
|
||||
private String creatorName;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private Long updaterId;
|
||||
|
||||
@ApiModelProperty("更新人姓名")
|
||||
private String updaterName;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty("版本号")
|
||||
private Integer version;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.cnbm.generator.code.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统用户
|
||||
* </p>
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-08-23
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_user")
|
||||
@ApiModel(value = "User对象", description = "系统用户")
|
||||
public class User implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("用户名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("密码")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String realName;
|
||||
|
||||
@ApiModelProperty("头像")
|
||||
private String headUrl;
|
||||
|
||||
@ApiModelProperty("性别 0:男 1:女 2:保密")
|
||||
private Integer gender;
|
||||
|
||||
@ApiModelProperty("邮箱")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("部门ID")
|
||||
private Long deptId;
|
||||
|
||||
@ApiModelProperty("超级管理员 0:否 1:是")
|
||||
private Integer superAdmin;
|
||||
|
||||
@ApiModelProperty("状态 0:停用 1:正常")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("创建者")
|
||||
private Long creator;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createDate;
|
||||
|
||||
@ApiModelProperty("更新者")
|
||||
private Long updater;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateDate;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.cnbm.generator.code.excel;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 检验单 表
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-12-07
|
||||
*/
|
||||
@Data
|
||||
public class InspectionSheetExcel {
|
||||
@Excel(name = "ID")
|
||||
private Long id;
|
||||
@Excel(name = "订单号,手动输入")
|
||||
private String orderNumber;
|
||||
@Excel(name = "批次号,手填")
|
||||
private String batchNumber;
|
||||
@Excel(name = "检验站点,手填")
|
||||
private String inspectionSite;
|
||||
@Excel(name = "产品id,关联product表")
|
||||
private Long productId;
|
||||
@Excel(name = "检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验")
|
||||
private Integer inspectionStage;
|
||||
@Excel(name = "工序id,关联working_procedure表")
|
||||
private Long workingProcedureId;
|
||||
@Excel(name = "机台id,关联machine表")
|
||||
private Long machineId;
|
||||
@Excel(name = "班次id,关联shift表")
|
||||
private Long shiftId;
|
||||
@Excel(name = "分组样本数(就是这个产品下所有检测参数 的 最大样本数),只给用户查看,值是后台自动计算的")
|
||||
private Integer numberOfGroupedSamples;
|
||||
@Excel(name = "样本大小(就是检验单(母体)下的子样个数),只给用户查看,值是后台自动计算的")
|
||||
private Integer numberOfSamples;
|
||||
@Excel(name = "缺陷数量,只给用户查看,值是后台自动计算的(是以 这个检验单下 样本子样 为单位的 )")
|
||||
private Integer numberOfDefects;
|
||||
@Excel(name = "不良数量,只给用户查看,值是后台自动计算的(是以 这个检验单下 样本子样 为单位的 )")
|
||||
private Integer defectiveQuantity;
|
||||
@Excel(name = "生产人")
|
||||
private String producer;
|
||||
@Excel(name = "检验人")
|
||||
private String inspector;
|
||||
@Excel(name = "产品特性类型:1 计量型;2 计数型")
|
||||
private Integer type;
|
||||
@Excel(name = "1 可用,0 不可用")
|
||||
private Integer status;
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
@Excel(name = "删除标志,是否有效:1 可用 0不可用")
|
||||
private Integer valid;
|
||||
@Excel(name = "创建人")
|
||||
private Long creatorId;
|
||||
@Excel(name = "创建人姓名")
|
||||
private String creatorName;
|
||||
@Excel(name = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@Excel(name = "更新人")
|
||||
private Long updaterId;
|
||||
@Excel(name = "更新人姓名")
|
||||
private String updaterName;
|
||||
@Excel(name = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
@Excel(name = "版本号")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.cnbm.generator.code.excel;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 产品特性 表
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-08-23
|
||||
*/
|
||||
@Data
|
||||
public class ProductFeaturesExcel {
|
||||
@Excel(name = "")
|
||||
private Long id;
|
||||
@Excel(name = "")
|
||||
private Long productId;
|
||||
@Excel(name = "")
|
||||
private Long measureToolId;
|
||||
@Excel(name = "")
|
||||
private Long unitId;
|
||||
@Excel(name = "产品特性 名")
|
||||
private String name;
|
||||
@Excel(name = "产品特性 编码")
|
||||
private String code;
|
||||
@Excel(name = "产品特性类型:1 计量型;2 计数型")
|
||||
private Integer type;
|
||||
@Excel(name = "缺陷等级:1 致命缺陷;2 严重缺陷;3.轻微缺陷")
|
||||
private Integer defectLevel;
|
||||
@Excel(name = "产品特性 规格")
|
||||
private String specifications;
|
||||
@Excel(name = "检验参数 规格下线")
|
||||
private Float lsl;
|
||||
@Excel(name = "检验参数 规格中心线")
|
||||
private Float sl;
|
||||
@Excel(name = "检验参数 规格上线")
|
||||
private Float usl;
|
||||
@Excel(name = "")
|
||||
private Long workingProcedureId;
|
||||
@Excel(name = "")
|
||||
private Long controlGraphId;
|
||||
@Excel(name = "是否需要spc分析,1 yes;0 no")
|
||||
private Integer isSpc;
|
||||
@Excel(name = "样本大小,一般2-25之间。 会依据这个size 把所有待分析的数据 组成一个一个样本")
|
||||
private Integer sampleSize;
|
||||
@Excel(name = "采样频率,只用于展示")
|
||||
private String samplingFrequency;
|
||||
@Excel(name = "小数位数(限制 检验参数小数点后面位数),这个先放着后续再说。")
|
||||
private Integer decimalPlaces;
|
||||
@Excel(name = "目标cpk")
|
||||
private Float targetCpk;
|
||||
@Excel(name = "目标cpk")
|
||||
private Float targetPpk;
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
@Excel(name = "删除标志,是否有效:1 可用 0不可用")
|
||||
private Integer valid;
|
||||
@Excel(name = "")
|
||||
private Long creatorId;
|
||||
@Excel(name = "创建人姓名")
|
||||
private String creatorName;
|
||||
@Excel(name = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@Excel(name = "")
|
||||
private Long updaterId;
|
||||
@Excel(name = "更新人姓名")
|
||||
private String updaterName;
|
||||
@Excel(name = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
@Excel(name = "版本号")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.cnbm.generator.code.excel;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 产品类型 表
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-08-23
|
||||
*/
|
||||
@Data
|
||||
public class ProductTypeExcel {
|
||||
@Excel(name = "")
|
||||
private Long id;
|
||||
@Excel(name = "产品类型 名")
|
||||
private String name;
|
||||
@Excel(name = "产品类型 编码")
|
||||
private String code;
|
||||
@Excel(name = "描述")
|
||||
private String descs;
|
||||
@Excel(name = "1 可用,0 不可用")
|
||||
private Integer status;
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
@Excel(name = "删除标志,是否有效:1 可用 0不可用")
|
||||
private Integer valid;
|
||||
@Excel(name = "")
|
||||
private Long creatorId;
|
||||
@Excel(name = "创建人姓名")
|
||||
private String creatorName;
|
||||
@Excel(name = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@Excel(name = "")
|
||||
private Long updaterId;
|
||||
@Excel(name = "更新人姓名")
|
||||
private String updaterName;
|
||||
@Excel(name = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
@Excel(name = "版本号")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.cnbm.generator.code.excel;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 单位 表
|
||||
*
|
||||
* @author why
|
||||
* @since 2023-01-12
|
||||
*/
|
||||
@Data
|
||||
public class UnitExcel {
|
||||
@Excel(name = "")
|
||||
private Long id;
|
||||
@Excel(name = "单位 名")
|
||||
private String name;
|
||||
@Excel(name = "单位 编码")
|
||||
private String code;
|
||||
@Excel(name = "单位类型,1 可计数,2 不可计数")
|
||||
private Integer type;
|
||||
@Excel(name = "1 可用,0 不可用")
|
||||
private Integer status;
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
@Excel(name = "删除标志,是否有效:1 可用 0不可用")
|
||||
private Integer valid;
|
||||
@Excel(name = "")
|
||||
private Long creatorId;
|
||||
@Excel(name = "创建人姓名")
|
||||
private String creatorName;
|
||||
@Excel(name = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@Excel(name = "")
|
||||
private Long updaterId;
|
||||
@Excel(name = "更新人姓名")
|
||||
private String updaterName;
|
||||
@Excel(name = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
@Excel(name = "版本号")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.cnbm.generator.code.excel;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 系统用户
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-08-23
|
||||
*/
|
||||
@Data
|
||||
public class UserExcel {
|
||||
@Excel(name = "id")
|
||||
private Long id;
|
||||
@Excel(name = "用户名")
|
||||
private String username;
|
||||
@Excel(name = "密码")
|
||||
private String password;
|
||||
@Excel(name = "姓名")
|
||||
private String realName;
|
||||
@Excel(name = "头像")
|
||||
private String headUrl;
|
||||
@Excel(name = "性别 0:男 1:女 2:保密")
|
||||
private Integer gender;
|
||||
@Excel(name = "邮箱")
|
||||
private String email;
|
||||
@Excel(name = "手机号")
|
||||
private String mobile;
|
||||
@Excel(name = "部门ID")
|
||||
private Long deptId;
|
||||
@Excel(name = "超级管理员 0:否 1:是")
|
||||
private Integer superAdmin;
|
||||
@Excel(name = "状态 0:停用 1:正常")
|
||||
private Integer status;
|
||||
@Excel(name = "创建者")
|
||||
private Long creator;
|
||||
@Excel(name = "创建时间")
|
||||
private LocalDateTime createDate;
|
||||
@Excel(name = "更新者")
|
||||
private Long updater;
|
||||
@Excel(name = "更新时间")
|
||||
private LocalDateTime updateDate;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.cnbm.generator.code.mapper;
|
||||
|
||||
import com.cnbm.common.dao.BaseDao;
|
||||
import com.cnbm.generator.code.entity.InspectionSheet;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 检验单 表
|
||||
*
|
||||
* @author why
|
||||
* @since 2022-12-07
|
||||
*/
|
||||
@Mapper
|
||||
public interface InspectionSheetMapper extends BaseDao<InspectionSheet> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cnbm.generator.code.mapper.InspectionSheetMapper">
|
||||
<resultMap type="com.cnbm.generator.code.entity.InspectionSheet" id="InspectionSheetMap">
|
||||
<id column="id" property="id" />
|
||||
<id column="order_number" property="orderNumber" />
|
||||
<id column="batch_number" property="batchNumber" />
|
||||
<id column="inspection_site" property="inspectionSite" />
|
||||
<id column="product_id" property="productId" />
|
||||
<id column="inspection_stage" property="inspectionStage" />
|
||||
<id column="working_procedure_id" property="workingProcedureId" />
|
||||
<id column="machine_id" property="machineId" />
|
||||
<id column="shift_id" property="shiftId" />
|
||||
<id column="number_of_grouped_samples" property="numberOfGroupedSamples" />
|
||||
<id column="number_of_samples" property="numberOfSamples" />
|
||||
<id column="number_of_defects" property="numberOfDefects" />
|
||||
<id column="defective_quantity" property="defectiveQuantity" />
|
||||
<id column="producer" property="producer" />
|
||||
<id column="inspector" property="inspector" />
|
||||
<id column="type" property="type" />
|
||||
<id column="status" property="status" />
|
||||
<id column="remark" property="remark" />
|
||||
<id column="valid" property="valid" />
|
||||
<id column="creator_id" property="creatorId" />
|
||||
<id column="creator_name" property="creatorName" />
|
||||
<id column="create_time" property="createTime" />
|
||||
<id column="updater_id" property="updaterId" />
|
||||
<id column="updater_name" property="updaterName" />
|
||||
<id column="update_time" property="updateTime" />
|
||||
<id column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user