Compare commits

..

62 Commits

Author SHA1 Message Date
32647c035c CommonField 2023-06-25 16:34:35 +08:00
9546ceec03 Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC into yanyang 2023-06-25 15:29:24 +08:00
3a583ac09f 通用作业 检验时间 2023-06-25 15:28:23 +08:00
caixiang
e149150b1d mark 2023-05-30 16:07:24 +08:00
caixiang
3d5e5e5845 mark 2023-05-30 15:52:00 +08:00
caixiang
5a9f5ee38b mark 2023-05-09 14:24:13 +08:00
caixiang
7c21dfe8e1 初定 第一版 2023-01-13 11:01:42 +08:00
caixiang
2bc72469a0 初定 第一版 2023-01-11 15:58:24 +08:00
caixiang
cafcdd65e0 初定 第一版 2023-01-09 16:57:52 +08:00
cc5848e5cd Merge pull request 'yanyang' (#19) from yanyang into master
Reviewed-on: #19
2023-01-06 16:37:27 +08:00
445c7c0c3f Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC into yanyang 2023-01-06 16:36:41 +08:00
214f0a8ec9 新增查询 2023-01-06 16:36:19 +08:00
caixiang
74aaf857f0 mark 2023-01-06 16:21:09 +08:00
caixiang
353471b1f7 Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC 2023-01-04 09:14:04 +08:00
caixiang
23aa6d5f89 commit for pull 2023-01-04 09:13:34 +08:00
ea70ac4a6b Merge pull request 'fix' (#18) from yanyang into master
Reviewed-on: #18
2023-01-04 09:11:04 +08:00
b6990dc4a0 fix 2023-01-04 09:10:19 +08:00
caixiang
8b14c369fb Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC 2023-01-03 16:29:29 +08:00
caixiang
c1d37a3dbc commit for pull 2023-01-03 16:29:18 +08:00
5e32971f26 Merge pull request 'yanyang' (#17) from yanyang into master
Reviewed-on: #17
2023-01-03 16:26:30 +08:00
1ce177ab5d Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC into yanyang 2023-01-03 16:25:43 +08:00
8b4e6b116e 特性类型样本大小 2023-01-03 16:25:35 +08:00
caixiang
9b545a9a03 Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC
# Conflicts:
#	ym-process-inspection/src/main/java/com/cnbm/processInspection/controller/InspectionSheetController.java
2023-01-03 09:24:49 +08:00
caixiang
c75c89cab9 commit for pull 2023-01-03 09:24:12 +08:00
04e8cc187a Merge pull request 'influx参数覆盖' (#16) from yanyang into master
Reviewed-on: #16
2022-12-28 10:33:12 +08:00
add0eea2ac influx参数覆盖 2022-12-28 10:31:27 +08:00
caixiang
69f911c07c Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC 2022-12-13 11:00:15 +08:00
caixiang
5e8110ad2c Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC 2022-12-12 16:08:49 +08:00
caixiang
7e3e028eb0 Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC 2022-12-12 16:08:43 +08:00
37f0dbe548 Merge pull request 'yanyang' (#15) from yanyang into master
Reviewed-on: #15
2022-12-12 16:02:45 +08:00
b501e8cd98 Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC into yanyang 2022-12-12 16:01:51 +08:00
98baf93cff 样本排序 2022-12-12 16:01:43 +08:00
caixiang
ff63c194ee 新增 influxdb 多条件查询 2022-12-12 11:12:01 +08:00
1173d670e4 Merge pull request '时间类型修改' (#14) from yanyang into master
Reviewed-on: #14
2022-12-09 17:01:11 +08:00
c7c43cd906 时间类型修改 2022-12-09 17:00:02 +08:00
caixiang
1798ba8d1d Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC
 Conflicts:
	ym-process-inspection/src/main/java/com/cnbm/processInspection/controller/InspectionSheetController.java
2022-12-09 15:31:47 +08:00
caixiang
652812d3ba commit for pull 2022-12-09 15:31:32 +08:00
1562854e59 Merge pull request 'yanyang' (#13) from yanyang into master
Reviewed-on: #13
2022-12-09 15:29:26 +08:00
d03a3e06a3 MARK 2022-12-09 15:27:11 +08:00
c9d01c9e11 Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC into yanyang 2022-12-09 09:08:12 +08:00
caixiang
de3fe9b95c mark 2022-12-09 09:06:52 +08:00
caixiang
53f0c58507 mark 2022-12-08 17:21:28 +08:00
95a82b042d Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC into yanyang 2022-12-08 16:26:28 +08:00
b15ad64d76 MARK FOR PULL 2022-12-08 16:26:17 +08:00
caixiang
bf67380718 mark 2022-12-08 16:17:15 +08:00
caixiang
b93869c4a1 修改 influxdb query函数 2022-12-08 15:28:10 +08:00
6829169a4a Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC into yanyang
 Conflicts:
	ym-influx/src/main/java/com/cnbm/influx/config/InfluxClient.java
2022-12-07 16:58:35 +08:00
caixiang
2d9b0ea1f1 修改 influxdb query函数 2022-12-07 16:56:47 +08:00
0e3f0f9168 Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC into yanyang 2022-12-07 11:07:41 +08:00
b515eacbab MARK FOR PULL 2022-12-07 11:07:31 +08:00
caixiang
515df64760 修改判读方案算法 2022-12-07 11:05:27 +08:00
ab35b10130 Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC into yanyang
 Conflicts:
	ym-influx/src/main/java/com/cnbm/influx/config/InfluxClient.java
	ym-influx/src/main/java/com/cnbm/influx/controller/S7DemoController.java
	ym-influx/src/main/java/com/cnbm/influx/template/Event.java
2022-12-01 15:54:41 +08:00
4864545f12 m 2022-12-01 15:50:30 +08:00
caixiang
f7712f184a 修改判读方案算法 2022-12-01 15:33:57 +08:00
caixiang
8bfcaaf429 修改判读方案算法 2022-12-01 11:45:05 +08:00
caixiang
650e9a2324 修改判读方案算法 2022-11-29 11:11:07 +08:00
caixiang
a2d91083f2 Merge branch 'master' of http://git.picaiba.com/CaiXiang/SPC 2022-11-25 10:12:40 +08:00
caixiang
bd9276036b mark for pull 2022-11-25 10:12:33 +08:00
8a4f0094a1 Merge pull request 'm' (#12) from yanyang into master
Reviewed-on: #12
2022-11-25 10:07:32 +08:00
1b9c3499a3 m 2022-11-25 10:06:25 +08:00
e6b5583d05 Merge pull request '质量计划' (#11) from yanyang into master
Reviewed-on: #11
2022-09-30 08:56:37 +08:00
a3cc4df25c 质量计划 2022-09-30 08:54:33 +08:00
179 changed files with 6188 additions and 840 deletions

View File

@@ -73,6 +73,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
"/webjars/**",
"/websocket/**",
"/influx/**",
// "/basic/**",
// "/qualityPlanning/**",
// "/processInspection/**",

View File

@@ -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);

View File

@@ -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); }
}

View File

@@ -124,4 +124,10 @@ public class FactoryController {
return new Result();
}
@PostMapping(value = "list")
@ApiOperation(value = "获取工厂列表")
@LogOperation("获取工厂列表")
public List<FactoryDTO> list() {
return factoryService.list();
}
}

View File

@@ -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);
}
}

View File

@@ -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')")

View File

@@ -129,4 +129,11 @@ public class ProductController {
return new Result();
}
@PostMapping(value = "list")
@ApiOperation(value = "获取产品列表")
@LogOperation("获取产品列表")
public List<ProductDTO> list() {
return productService.list();
}
}

View File

@@ -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();
}
}

View File

@@ -2,9 +2,7 @@ package com.cnbm.basic.controller;
import com.cnbm.admin.annotation.LogOperation;
import com.cnbm.admin.params.IdParam;
import com.cnbm.basic.dto.FeaturesProcedureDTO;
import com.cnbm.basic.dto.FeaturesStageProcedureRelationDTO;
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;
@@ -15,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;
@@ -162,4 +159,17 @@ public class ProductFeaturesController {
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);
}
}

View File

@@ -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();
}
}

View File

@@ -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(); }
}

View File

@@ -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')")

View File

@@ -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();
}
}

View File

@@ -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')")

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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);
}

View File

@@ -23,4 +23,10 @@ public interface ProductFeaturesMapper extends BaseDao<ProductFeatures> {
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);
}

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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);
}

View File

@@ -1,5 +1,6 @@
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;
@@ -34,4 +35,8 @@ public interface IProductFeaturesService extends CrudService<ProductFeatures, Pr
void batchUpdate(ProductFeaturesDTO[] lists);
List<ProductFeaturesDTO> getFeaturesList(Map<String, Object> params);
List<ProductFeaturesDTO> list();
List<ProductFeaturesDTO> getProductFeaturesByType(Integer type);
}

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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);
}

View File

@@ -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,6 +89,7 @@ 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);
}
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}
}
}

View File

@@ -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);
}

View File

@@ -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.cnbm.admin.params.IdParam;
import com.cnbm.admin.utils.BaseSupportUtils;
import com.cnbm.basic.dto.*;
import com.cnbm.basic.entity.ProductFeaturesHis;
import com.cnbm.basic.entity.ProductWorkingprocedureRelation;
@@ -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);
}
@@ -135,6 +149,7 @@ public class ProductFeaturesServiceImpl extends CrudServiceImpl<ProductFeaturesM
for(ProductFeaturesDTO dto:lists){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
BaseSupportUtils.setUpdateCommonField(dto);
update(dto);
}
}
@@ -144,4 +159,19 @@ public class ProductFeaturesServiceImpl extends CrudServiceImpl<ProductFeaturesM
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;
}
}

View File

@@ -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;
}
}

View File

@@ -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);
}

View File

@@ -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.cnbm.admin.utils.BaseSupportUtils;
import com.cnbm.basic.dto.ProductFeaturesDTO;
import com.cnbm.basic.dto.SequenceDTO;
import com.cnbm.basic.dto.WorkingProcedureDTO;
@@ -85,6 +86,7 @@ public class ProductWorkingprocedureRelationServiceImpl extends CrudServiceImpl<
Integer lastSequence = lastDto.getSequence();
entity.setSequence(lastSequence + 1);
}
BaseSupportUtils.setCommonField(entity);
insert(entity);
}
else{
@@ -96,6 +98,7 @@ public class ProductWorkingprocedureRelationServiceImpl extends CrudServiceImpl<
@Transactional(rollbackFor = Exception.class)
public void update(ProductWorkingprocedureRelationDTO dto) {
ProductWorkingprocedureRelation entity = ConvertUtils.sourceToTarget(dto, ProductWorkingprocedureRelation.class);
BaseSupportUtils.setUpdateCommonField(entity);
updateById(entity);
}
@@ -143,6 +146,7 @@ public class ProductWorkingprocedureRelationServiceImpl extends CrudServiceImpl<
public void batchInsertWorkingprocedure(ProductWorkingprocedureRelationDTO[] lists) {
for(ProductWorkingprocedureRelationDTO dto:lists){
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
BaseSupportUtils.setCommonField(dto);
save(dto);
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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);
}

View File

@@ -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;
}
}

View File

@@ -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);
}

View File

@@ -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>

View File

@@ -69,4 +69,22 @@
</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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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));
}

View 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;
}
}

View File

@@ -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) {

View File

@@ -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<>();
}
}

View File

@@ -23,6 +23,8 @@ public class DataUtils {
}
public List<List<Date>> split(List<Date> value) {
List<List<Date>> result = new ArrayList<>();

View File

@@ -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>

View File

@@ -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)

View File

@@ -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.

View File

@@ -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:

View 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>

View File

@@ -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){

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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> {
}

View File

@@ -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>

View File

@@ -0,0 +1,16 @@
package com.cnbm.generator.code.mapper;
import com.cnbm.common.dao.BaseDao;
import com.cnbm.generator.code.entity.ProductFeatures;
import org.apache.ibatis.annotations.Mapper;
/**
* 产品特性 表
*
* @author why
* @since 2022-08-23
*/
@Mapper
public interface ProductFeaturesMapper extends BaseDao<ProductFeatures> {
}

View File

@@ -0,0 +1,36 @@
<?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.ProductFeaturesMapper">
<resultMap type="com.cnbm.generator.code.entity.ProductFeatures" id="ProductFeaturesMap">
<id column="id" property="id" />
<id column="product_id" property="productId" />
<id column="measure_tool_id" property="measureToolId" />
<id column="unit_id" property="unitId" />
<id column="name" property="name" />
<id column="code" property="code" />
<id column="type" property="type" />
<id column="defect_level" property="defectLevel" />
<id column="specifications" property="specifications" />
<id column="lsl" property="lsl" />
<id column="sl" property="sl" />
<id column="usl" property="usl" />
<id column="working_procedure_id" property="workingProcedureId" />
<id column="control_graph_id" property="controlGraphId" />
<id column="is_spc" property="isSpc" />
<id column="sample_size" property="sampleSize" />
<id column="sampling_frequency" property="samplingFrequency" />
<id column="decimal_places" property="decimalPlaces" />
<id column="target_cpk" property="targetCpk" />
<id column="target_ppk" property="targetPpk" />
<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>

View File

@@ -0,0 +1,16 @@
package com.cnbm.generator.code.mapper;
import com.cnbm.common.dao.BaseDao;
import com.cnbm.generator.code.entity.ProductType;
import org.apache.ibatis.annotations.Mapper;
/**
* 产品类型 表
*
* @author why
* @since 2022-08-23
*/
@Mapper
public interface ProductTypeMapper extends BaseDao<ProductType> {
}

View File

@@ -0,0 +1,21 @@
<?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.ProductTypeMapper">
<resultMap type="com.cnbm.generator.code.entity.ProductType" id="ProductTypeMap">
<id column="id" property="id" />
<id column="name" property="name" />
<id column="code" property="code" />
<id column="descs" property="descs" />
<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>

View File

@@ -0,0 +1,16 @@
package com.cnbm.generator.code.mapper;
import com.cnbm.common.dao.BaseDao;
import com.cnbm.generator.code.entity.Unit;
import org.apache.ibatis.annotations.Mapper;
/**
* 单位 表
*
* @author why
* @since 2023-01-12
*/
@Mapper
public interface UnitMapper extends BaseDao<Unit> {
}

View File

@@ -0,0 +1,21 @@
<?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.UnitMapper">
<resultMap type="com.cnbm.generator.code.entity.Unit" id="UnitMap">
<id column="id" property="id" />
<id column="name" property="name" />
<id column="code" property="code" />
<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>

View File

@@ -0,0 +1,16 @@
package com.cnbm.generator.code.mapper;
import com.cnbm.common.dao.BaseDao;
import com.cnbm.generator.code.entity.User;
import org.apache.ibatis.annotations.Mapper;
/**
* 系统用户
*
* @author why
* @since 2022-08-23
*/
@Mapper
public interface UserMapper extends BaseDao<User> {
}

View File

@@ -0,0 +1,22 @@
<?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.UserMapper">
<resultMap type="com.cnbm.generator.code.entity.User" id="UserMap">
<id column="id" property="id" />
<id column="username" property="username" />
<id column="password" property="password" />
<id column="real_name" property="realName" />
<id column="head_url" property="headUrl" />
<id column="gender" property="gender" />
<id column="email" property="email" />
<id column="mobile" property="mobile" />
<id column="dept_id" property="deptId" />
<id column="super_admin" property="superAdmin" />
<id column="status" property="status" />
<id column="creator" property="creator" />
<id column="create_date" property="createDate" />
<id column="updater" property="updater" />
<id column="update_date" property="updateDate" />
</resultMap>
</mapper>

View File

@@ -0,0 +1,7 @@
-- 菜单初始SQL
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1600308190230409218, 1067246875800000035, '检验单 表', 'code/inspectionSheet', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1600308190230409219, 1600308190230409218, '查看', NULL, 'code:inspectionSheet:page,code:inspectionSheet:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1600308190230409220, 1600308190230409218, '新增', NULL, 'code:inspectionSheet:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1600308190230409221, 1600308190230409218, '修改', NULL, 'code:inspectionSheet:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1600308190230409222, 1600308190230409218, '删除', NULL, 'code:inspectionSheet:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1600308190230409223, 1600308190230409218, '导出', NULL, 'code:inspectionSheet:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now());

View File

@@ -0,0 +1,7 @@
-- 菜单初始SQL
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561967925485420546, 1067246875800000035, '产品类型 表', 'code/productType', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967925485420547, 1561967925485420546, '查看', NULL, 'code:productType:page,code:productType:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967925485420548, 1561967925485420546, '新增', NULL, 'code:productType:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967925485420549, 1561967925485420546, '修改', NULL, 'code:productType:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967925485420550, 1561967925485420546, '删除', NULL, 'code:productType:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967925485420551, 1561967925485420546, '导出', NULL, 'code:productType:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now());

View File

@@ -0,0 +1,7 @@
-- 菜单初始SQL
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561967818685841409, 1067246875800000035, '系统用户', 'code/user', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967818685841410, 1561967818685841409, '查看', NULL, 'code:user:page,code:user:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967818685841411, 1561967818685841409, '新增', NULL, 'code:user:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967818685841412, 1561967818685841409, '修改', NULL, 'code:user:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967818685841413, 1561967818685841409, '删除', NULL, 'code:user:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967818685841414, 1561967818685841409, '导出', NULL, 'code:user:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now());

View File

@@ -0,0 +1,15 @@
package com.cnbm.generator.code.service;
import com.cnbm.common.service.CrudService;
import com.cnbm.generator.code.dto.InspectionSheetDTO;
import com.cnbm.generator.code.entity.InspectionSheet;
/**
* 检验单 表
*
* @author why
* @since 2022-12-07
*/
public interface IInspectionSheetService extends CrudService<InspectionSheet, InspectionSheetDTO> {
}

View File

@@ -0,0 +1,15 @@
package com.cnbm.generator.code.service;
import com.cnbm.common.service.CrudService;
import com.cnbm.generator.code.dto.ProductFeaturesDTO;
import com.cnbm.generator.code.entity.ProductFeatures;
/**
* 产品特性 表
*
* @author why
* @since 2022-08-23
*/
public interface IProductFeaturesService extends CrudService<ProductFeatures, ProductFeaturesDTO> {
}

View File

@@ -0,0 +1,15 @@
package com.cnbm.generator.code.service;
import com.cnbm.common.service.CrudService;
import com.cnbm.generator.code.dto.ProductTypeDTO;
import com.cnbm.generator.code.entity.ProductType;
/**
* 产品类型 表
*
* @author why
* @since 2022-08-23
*/
public interface IProductTypeService extends CrudService<ProductType, ProductTypeDTO> {
}

Some files were not shown because too many files have changed in this diff Show More