mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 05:42:06 +08:00
组织机台授权新增最大数量异常信息提示,排单优化生产ES数据结构余料新增品牌等信息
This commit is contained in:
+4
-4
@@ -76,7 +76,7 @@ public class DataSourceController {
|
||||
}*/
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得系统数据源列表")
|
||||
@Operation(summary = "获得系统数据源列表-获取标签数据源")
|
||||
//@PreAuthorize("@ss.hasPermission('system:data-source:query')")
|
||||
public CommonResult<List<DataSourceRespVO>> list( ) {
|
||||
return success(dataSourceService.list());
|
||||
@@ -99,17 +99,17 @@ public class DataSourceController {
|
||||
|
||||
|
||||
@GetMapping("/getList")
|
||||
@Operation(summary = "获取数据源参数")
|
||||
@Operation(summary = "获取数据源参数-获取机台数据源")
|
||||
@Parameter(name = "type", description = "标签类型", required = true, example = "9")
|
||||
//@PreAuthorize("@ss.hasPermission('system:data-source:query')")
|
||||
public CommonResult<List<DataSourceFiledReqVO>> getList(@RequestParam("type") Integer type ) {
|
||||
return success(dataSourceService.getList( type));
|
||||
return success(dataSourceService.getList(type));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getKeyNameData")
|
||||
@Operation(summary = "数据源对应字段数据查询")
|
||||
@Operation(summary = "机台数据源对应字段数据查询")
|
||||
@Parameters({
|
||||
@Parameter(name = "machineId", description = "机台ID", required = true),
|
||||
@Parameter(name = "planId", description = "排单ID", required = true)
|
||||
|
||||
+2
-3
@@ -6,7 +6,6 @@ import com.cf.imes.framework.common.util.object.BeanUtils;
|
||||
import com.cf.imes.framework.es.core.valid.CreateGroup;
|
||||
import com.cf.imes.framework.es.core.valid.UpdateGroup;
|
||||
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
|
||||
import com.cf.imes.framework.organ.core.context.OrganContextHolder;
|
||||
import com.cf.imes.module.system.controller.admin.machine.vo.*;
|
||||
import com.cf.imes.module.system.dal.dataobject.machine.MachineDO;
|
||||
import com.cf.imes.module.system.service.machine.MachineService;
|
||||
@@ -110,8 +109,8 @@ public class MachineController {
|
||||
@GetMapping(value = {"/list-all-simple", "/simple-list"})
|
||||
@Operation(summary = "获取机台精简信息列表", description = "主要用于前端的下拉选项")
|
||||
public CommonResult<List<MachineSimpleRespVO>> getSimpleDeptList(@RequestParam(required = false) Long organId,@RequestParam(required = false) Long type) {
|
||||
organId = organId == null ? OrganContextHolder.getOrganId() : organId;
|
||||
List<MachineSimpleRespVO> list = machineService.simpleList(organId,type);
|
||||
// organId = organId == null ? OrganContextHolder.getOrganId() : organId;
|
||||
List<MachineSimpleRespVO> list = machineService.simpleList(type);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ public interface MachineService {
|
||||
|
||||
PageResult<MachineDO> page(MachinePageReqVO pageParam);
|
||||
|
||||
List<MachineSimpleRespVO> simpleList(Long organId,Long type);
|
||||
List<MachineSimpleRespVO> simpleList(Long type);
|
||||
|
||||
List<MachineBrandModelRespVO> getBrandAndModel(Integer type);
|
||||
|
||||
|
||||
+26
-5
@@ -443,12 +443,26 @@ public class MachineServiceImpl implements MachineService {
|
||||
@Override
|
||||
public Boolean authInsert(MachineOrgAuthReq vo) {
|
||||
|
||||
OrganizationDO tenant = organMapper.selectById(vo.getOrganId());
|
||||
if (tenant == null) {
|
||||
throw exception(ORGAN_NOT_EXISTS);
|
||||
}
|
||||
|
||||
MachineLimitDO machineLimit = machineLimitMapper.selectById(vo.getOrganId());
|
||||
|
||||
if (machineLimit != null) {
|
||||
throw exception(ORGAN_ALREADY_EXISTS);
|
||||
}
|
||||
|
||||
Integer[] limits = {vo.getCutLimit(), vo.getDrillLimit(), vo.getLabelLimit(), vo.getSawLimit(), vo.getSealedgeLimit()};
|
||||
|
||||
for (Integer limit : limits) {
|
||||
if (limit > 127) {
|
||||
throw exception(MACHINE_NUM_DATA_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MachineLimitDO machineLimitDO = MachineLimitDO.builder()
|
||||
.organId(vo.getOrganId())
|
||||
.cutLimit(vo.getCutLimit())
|
||||
@@ -456,7 +470,6 @@ public class MachineServiceImpl implements MachineService {
|
||||
.labelLimit(vo.getLabelLimit())
|
||||
.sawLimit(vo.getSawLimit())
|
||||
.sealedgeLimit(vo.getSealedgeLimit())
|
||||
// .setting(vo.getMachineAuthIds().toString())
|
||||
.build();
|
||||
|
||||
machineLimitMapper.insert(machineLimitDO);
|
||||
@@ -473,6 +486,16 @@ public class MachineServiceImpl implements MachineService {
|
||||
throw exception(ORGAN_NOT_EXISTS);
|
||||
}
|
||||
|
||||
|
||||
Integer[] limits = {vo.getCutLimit(), vo.getDrillLimit(), vo.getLabelLimit(), vo.getSawLimit(), vo.getSealedgeLimit()};
|
||||
|
||||
for (Integer limit : limits) {
|
||||
if (limit > 127) {
|
||||
throw exception(MACHINE_NUM_DATA_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
assert loginUser != null;
|
||||
|
||||
@@ -483,8 +506,6 @@ public class MachineServiceImpl implements MachineService {
|
||||
.labelLimit(vo.getLabelLimit())
|
||||
.sawLimit(vo.getSawLimit())
|
||||
.sealedgeLimit(vo.getSealedgeLimit())
|
||||
|
||||
// .setting(vo.getMachineAuthIds().toString())
|
||||
.build();
|
||||
|
||||
machineLimitDO.setUpdateTime(LocalDateTime.now());
|
||||
@@ -537,9 +558,9 @@ public class MachineServiceImpl implements MachineService {
|
||||
|
||||
@Override
|
||||
@OrganIgnore
|
||||
public List<MachineSimpleRespVO> simpleList(Long organId, Long type) {
|
||||
public List<MachineSimpleRespVO> simpleList( Long type) {
|
||||
List<MachineDO> machineDOS = machineMapper.selectList(new LambdaQueryWrapperX<MachineDO>()
|
||||
.eqIfPresent(MachineDO::getOrganId, organId)
|
||||
.eqIfPresent(MachineDO::getOrganId, getUserOrganId())
|
||||
.eqIfPresent(MachineDO::getMachineType, type)
|
||||
.select(MachineDO::getId, MachineDO::getName, MachineDO::getMachineType)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user