mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 05:42:06 +08:00
机台缺少参数增加
This commit is contained in:
+12
-3
@@ -27,11 +27,20 @@ public class MachineAuthController {
|
|||||||
@Resource
|
@Resource
|
||||||
private MachineService machineService;
|
private MachineService machineService;
|
||||||
|
|
||||||
@PostMapping("insert-organ-auth")
|
|
||||||
|
@PutMapping("insert-organ-auth")
|
||||||
@Operation(summary = "组织机台授权信息更新")
|
@Operation(summary = "组织机台授权信息更新")
|
||||||
@PreAuthorize("@ss.hasPermission('machine-auth::update')")
|
@PreAuthorize("@ss.hasPermission('machine-auth::update')")
|
||||||
public CommonResult<Boolean> auth(@RequestBody MachineOrgAuthReq vo) {
|
public CommonResult<Boolean> authInsert(@RequestBody MachineOrgAuthReq vo) {
|
||||||
return success(machineService.auth(vo));
|
return success(machineService.authInsert(vo));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("update-organ-auth")
|
||||||
|
@Operation(summary = "组织机台授权信息更新")
|
||||||
|
@PreAuthorize("@ss.hasPermission('machine-auth::update')")
|
||||||
|
public CommonResult<Boolean> authUpdate(@RequestBody MachineOrgAuthReq vo) {
|
||||||
|
return success(machineService.authUpdate(vo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("organ-page")
|
@GetMapping("organ-page")
|
||||||
|
|||||||
+27
-23
@@ -432,35 +432,39 @@ public class MachineServiceImpl implements MachineService {
|
|||||||
return machineVOS.stream().collect(Collectors.groupingBy(MachineVO::getMachineType));
|
return machineVOS.stream().collect(Collectors.groupingBy(MachineVO::getMachineType));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean auth(MachineOrgAuthReq vo) {
|
public Boolean authInsert(MachineOrgAuthReq vo) {
|
||||||
|
|
||||||
|
OrganizationDO tenant = organMapper.selectById(vo.getOrganId());
|
||||||
|
|
||||||
|
if (tenant != null) {
|
||||||
|
throw exception(ORGAN_ALREADY_EXISTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
MachineLimitDO machineLimitDO = MachineLimitDO.builder()
|
||||||
|
.organId(vo.getOrganId())
|
||||||
|
.cutLimit(vo.getCutLimit())
|
||||||
|
.drillLimit(vo.getDrillLimit())
|
||||||
|
.labelLimit(vo.getLabelLimit())
|
||||||
|
.sawLimit(vo.getSawLimit())
|
||||||
|
.sealedgeLimit(vo.getSealedgeLimit())
|
||||||
|
.setting(vo.getMachineAuthIds().toString())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
machineLimitMapper.insert(machineLimitDO);
|
||||||
|
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean authUpdate(MachineOrgAuthReq vo) {
|
||||||
|
|
||||||
OrganizationDO tenant = organMapper.selectById(vo.getOrganId());
|
OrganizationDO tenant = organMapper.selectById(vo.getOrganId());
|
||||||
if (tenant == null) {
|
if (tenant == null) {
|
||||||
throw exception(ORGAN_NOT_EXISTS);
|
throw exception(ORGAN_NOT_EXISTS);
|
||||||
}
|
}
|
||||||
// machineLimitMapper.delete(new LambdaQueryWrapperX<MachineLimitDO>().eq(MachineLimitDO::getOrganId, vo.getOrganId()));
|
|
||||||
|
|
||||||
// List<MachineAuth> machineAuthList = vo.getMachineAuthList();
|
|
||||||
|
|
||||||
// if(CollectionUtil.isNotEmpty(machineAuthList)) {
|
|
||||||
// List<MachineLimitDO> organMachineDOS = new ArrayList<>();
|
|
||||||
// LocalDateTime now = LocalDateTime.now();
|
|
||||||
// for (MachineAuth machineAuth : machineAuthList) {
|
|
||||||
// organMachineDOS.add(
|
|
||||||
// MachineLimitDO.builder()
|
|
||||||
// .createTime(now)
|
|
||||||
// .organId(vo.getOrganId())
|
|
||||||
//// .machineId(machineAuth.getMachineId())
|
|
||||||
//// .showDualWorkstation(machineAuth.getShowDualWorkstation())
|
|
||||||
//// .showAutoNotePrinter(machineAuth.getShowAutoNotePrinter())
|
|
||||||
//// .showPriorFacing(machineAuth.getShowPriorFacing())
|
|
||||||
// .build()
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// machineLimitMapper.insertBatch(organMachineDOS);
|
|
||||||
// }
|
|
||||||
|
|
||||||
MachineLimitDO machineLimitDO = MachineLimitDO.builder()
|
MachineLimitDO machineLimitDO = MachineLimitDO.builder()
|
||||||
.organId(vo.getOrganId())
|
.organId(vo.getOrganId())
|
||||||
|
|||||||
Reference in New Issue
Block a user