fix: 入窑口修改
This commit is contained in:
@@ -3,6 +3,7 @@ package org.nl;
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation;
|
||||
import com.alicp.jetcache.anno.config.EnableMethodCache;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.dynamictp.core.spring.EnableDynamicTp;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
@@ -57,12 +58,14 @@ public class AppRun {
|
||||
*
|
||||
* @return /
|
||||
*/
|
||||
@SneakyThrows
|
||||
@GetMapping("/")
|
||||
@Limit(period = 2, count = 1)
|
||||
@SaIgnore
|
||||
public String index() {
|
||||
MDC.put("system", "SSS");
|
||||
log.info("sssss");
|
||||
// Thread.sleep(100000);
|
||||
// MDC.put("system", "SSS");
|
||||
// log.info("sssss");
|
||||
return "Backend service started successfully";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,14 +31,12 @@ public class DasDeviceCheckRecordController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询设备点检功能")
|
||||
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(dasDeviceCheckRecordService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增设备点检功能")
|
||||
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody DasDeviceCheckRecord entity) {
|
||||
dasDeviceCheckRecordService.create(entity);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
@@ -46,14 +44,12 @@ public class DasDeviceCheckRecordController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改设备点检功能")
|
||||
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody DasDeviceCheckRecord entity) {
|
||||
dasDeviceCheckRecordService.update(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除设备点检功能")
|
||||
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
dasDeviceCheckRecordService.deleteAll(ids);
|
||||
|
||||
@@ -31,14 +31,12 @@ public class DasDeviceOperationRecordController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询设备动作操作记录")
|
||||
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(dasDeviceOperationRecordService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增设备动作操作记录")
|
||||
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody DasDeviceOperationRecord entity) {
|
||||
dasDeviceOperationRecordService.create(entity);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
@@ -46,14 +44,12 @@ public class DasDeviceOperationRecordController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改设备动作操作记录")
|
||||
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody DasDeviceOperationRecord entity) {
|
||||
dasDeviceOperationRecordService.update(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除设备动作操作记录")
|
||||
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
dasDeviceOperationRecordService.deleteAll(ids);
|
||||
|
||||
@@ -31,7 +31,6 @@ public class MdBaseBrickInfoController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询每块砖的信息记录")
|
||||
|
||||
//@SaCheckPermission("@el.check('mdBaseBrickInfo:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(mdBaseBrickInfoService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
|
||||
@@ -32,7 +32,6 @@ public class MdBaseClassstandardController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询基础分类")
|
||||
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(mdBaseClassstandardService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,6 @@ public class MdBaseVehicleController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询载具维护")
|
||||
|
||||
//@SaCheckPermission("@el.check('mdBaseVehicle:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(mdBaseVehicleService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
|
||||
@@ -31,7 +31,6 @@ public class MdBaseWorkshopController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询车间基础信息")
|
||||
|
||||
//@SaCheckPermission("@el.check('mdBaseWorkshop:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(mdBaseWorkshopService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
|
||||
@@ -291,7 +291,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
SchBasePoint basePoint = pointService.getById(deviceCode);
|
||||
String configCode = basePoint.getRegion_code() + "MLTask";
|
||||
RLock lock = redissonClient.getLock(configCode);
|
||||
int handling = 0; // 无业务:0
|
||||
// 无业务:0
|
||||
int handling = 0;
|
||||
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
||||
try {
|
||||
if (tryLock) {
|
||||
@@ -617,6 +618,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public ApplyTaskResponse barcodeSuccessApply(JSONObject param) {
|
||||
log.info("扫码成功-原始ACS参数:{}", param);
|
||||
ApplyTaskRequest baseRequest = param.toJavaObject(ApplyTaskRequest.class);
|
||||
ApplyTaskResponse taskResponse = ApplyTaskResponse.responseOk(baseRequest.getRequestNo());
|
||||
String deviceCode = baseRequest.getDevice_code();
|
||||
@@ -775,6 +777,10 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
processTracking.setProcess_location(baseRequest.getDevice_code());
|
||||
processTracking.setRecord_time(DateUtil.now());
|
||||
processTrackingService.create(processTracking);
|
||||
// update: 点位解锁
|
||||
SchBasePoint paramobj = new SchBasePoint();
|
||||
paramobj.setIng_task_code("");
|
||||
pointService.update(paramobj, new LambdaQueryWrapper<SchBasePoint>().eq(SchBasePoint::getPoint_code, basePoint.getPoint_code()));
|
||||
return ApplyTaskResponse.responseOk(baseRequest.getRequestNo(), "扫码成功申请");
|
||||
}
|
||||
|
||||
@@ -977,7 +983,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
PointUtils.setUpdateByAcs(schBasePoint);
|
||||
pointService.updateById(schBasePoint);
|
||||
// hint: 特殊处理
|
||||
specialOperation(schBasePoint);
|
||||
// specialOperation(schBasePoint);
|
||||
log.info("点位" + schBasePoint.getPoint_code() + "更新之后:{}", schBasePoint);
|
||||
}
|
||||
} finally {
|
||||
|
||||
@@ -29,14 +29,12 @@ public class WmsToMesController {
|
||||
|
||||
@GetMapping("/mesScrapInfo")
|
||||
@Log("查询工序报废信息")
|
||||
|
||||
public ResponseEntity<Object> queryMesScrapInfo(ScrapQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(wmsToMesService.queryMesScrapInfo(query, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/addScrap")
|
||||
@Log("新增工序报废")
|
||||
|
||||
//@SaCheckPermission("@el.check('mdBaseClassstandard:add')")
|
||||
public ResponseEntity<Object> addScrap(@Validated @RequestBody ScrapDto entity) {
|
||||
wmsToMesService.addScrap(entity);
|
||||
|
||||
@@ -31,14 +31,12 @@ public class SysInteractRecordController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询外部系统接口记录")
|
||||
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(sysInteractRecordService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增外部系统接口记录")
|
||||
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody SysInteractRecord entity) {
|
||||
sysInteractRecordService.create(entity);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
@@ -46,14 +44,12 @@ public class SysInteractRecordController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改外部系统接口记录")
|
||||
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody SysInteractRecord entity) {
|
||||
sysInteractRecordService.update(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除外部系统接口记录")
|
||||
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
sysInteractRecordService.deleteAll(ids);
|
||||
|
||||
@@ -31,7 +31,6 @@ public class PdmBdMudConsumptionController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询泥料消耗记录")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdMudConsumption:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(pdmBdMudConsumptionService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
@@ -39,7 +38,6 @@ public class PdmBdMudConsumptionController {
|
||||
|
||||
@PostMapping
|
||||
@Log("新增泥料消耗记录")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdMudConsumption:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody PdmBdMudConsumption entity) {
|
||||
pdmBdMudConsumptionService.create(entity);
|
||||
@@ -48,7 +46,6 @@ public class PdmBdMudConsumptionController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改泥料消耗记录")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdMudConsumption:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody PdmBdMudConsumption entity) {
|
||||
pdmBdMudConsumptionService.update(entity);
|
||||
@@ -56,7 +53,6 @@ public class PdmBdMudConsumptionController {
|
||||
}
|
||||
|
||||
@Log("删除泥料消耗记录")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdMudConsumption:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
|
||||
@@ -31,7 +31,6 @@ public class PdmBdRequestMaterialRecordController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询压机提前要料")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdRequestMaterialRecord:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(pdmBdRequestMaterialRecordService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
@@ -39,7 +38,6 @@ public class PdmBdRequestMaterialRecordController {
|
||||
|
||||
@PostMapping
|
||||
@Log("新增压机提前要料")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdRequestMaterialRecord:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody PdmBdRequestMaterialRecord entity) {
|
||||
pdmBdRequestMaterialRecordService.create(entity);
|
||||
@@ -48,7 +46,6 @@ public class PdmBdRequestMaterialRecordController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改压机提前要料")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdRequestMaterialRecord:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody PdmBdRequestMaterialRecord entity) {
|
||||
pdmBdRequestMaterialRecordService.update(entity);
|
||||
@@ -56,7 +53,6 @@ public class PdmBdRequestMaterialRecordController {
|
||||
}
|
||||
|
||||
@Log("删除压机提前要料")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdRequestMaterialRecord:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
|
||||
@@ -31,7 +31,6 @@ public class PdmBdMaterialResidueController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询压机泥料剩余记录")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdMaterialResidue:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(pdmBdMaterialResidueService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
@@ -39,7 +38,6 @@ public class PdmBdMaterialResidueController {
|
||||
|
||||
@PostMapping
|
||||
@Log("新增压机泥料剩余记录")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdMaterialResidue:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody PdmBdMaterialResidue entity) {
|
||||
pdmBdMaterialResidueService.create(entity);
|
||||
@@ -48,7 +46,6 @@ public class PdmBdMaterialResidueController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改压机泥料剩余记录")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdMaterialResidue:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody PdmBdMaterialResidue entity) {
|
||||
pdmBdMaterialResidueService.update(entity);
|
||||
@@ -56,7 +53,6 @@ public class PdmBdMaterialResidueController {
|
||||
}
|
||||
|
||||
@Log("删除压机泥料剩余记录")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdMaterialResidue:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
|
||||
@@ -31,7 +31,6 @@ public class PdmBdProductionProcessTrackingController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询生产过程跟踪表")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdProductionProcessTracking:list')")
|
||||
public ResponseEntity<Object> query(PdmBdProductionProcessTrackingQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(pdmBdProductionProcessTrackingService
|
||||
@@ -40,7 +39,6 @@ public class PdmBdProductionProcessTrackingController {
|
||||
|
||||
@PostMapping
|
||||
@Log("新增生产过程跟踪表")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdProductionProcessTracking:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody PdmBdProductionProcessTracking entity) {
|
||||
pdmBdProductionProcessTrackingService.create(entity);
|
||||
@@ -49,7 +47,6 @@ public class PdmBdProductionProcessTrackingController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改生产过程跟踪表")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdProductionProcessTracking:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody PdmBdProductionProcessTracking entity) {
|
||||
pdmBdProductionProcessTrackingService.update(entity);
|
||||
@@ -57,7 +54,6 @@ public class PdmBdProductionProcessTrackingController {
|
||||
}
|
||||
|
||||
@Log("删除生产过程跟踪表")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdProductionProcessTracking:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
|
||||
@@ -51,7 +51,6 @@ public class PdmBdVehicleBindingController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改分拣载具关联记录")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdVehicleBinding:edit')")
|
||||
public ResponseEntity<Object> update( @RequestBody MesSemiProVo entity) {
|
||||
pdmBdVehicleBindingService.update(entity);
|
||||
@@ -59,7 +58,6 @@ public class PdmBdVehicleBindingController {
|
||||
}
|
||||
|
||||
@Log("删除分拣载具关联记录")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdVehicleBinding:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
|
||||
@@ -40,7 +40,6 @@ public class PdmBdWorkorderController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询工单管理")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdWorkorder:list')")
|
||||
public ResponseEntity<Object> query(PdmBdWorkorderQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(pdmBdWorkorderService.queryAll(query, page)), HttpStatus.OK);
|
||||
@@ -48,14 +47,12 @@ public class PdmBdWorkorderController {
|
||||
|
||||
@GetMapping("/mesOrder")
|
||||
@Log("查询订单管理")
|
||||
|
||||
public ResponseEntity<Object> queryMesOrder(PdmBdWorkorderQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(pdmBdWorkorderService.queryMesOrder(query, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getCuster")
|
||||
@Log("获取客户信息")
|
||||
|
||||
public ResponseEntity<Object> getCuster() {
|
||||
return new ResponseEntity<>(wmsToMesService.getCusterInfo(), HttpStatus.OK);
|
||||
}
|
||||
@@ -69,7 +66,6 @@ public class PdmBdWorkorderController {
|
||||
|
||||
@PostMapping
|
||||
@Log("新增工单管理")
|
||||
|
||||
@SaIgnore
|
||||
//@SaCheckPermission("@el.check('pdmBdWorkorder:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody PdmBdWorkorder entity) {
|
||||
@@ -79,7 +75,6 @@ public class PdmBdWorkorderController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改工单管理")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdWorkorder:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody PdmBdWorkorder entity) {
|
||||
pdmBdWorkorderService.update(entity);
|
||||
@@ -87,7 +82,6 @@ public class PdmBdWorkorderController {
|
||||
}
|
||||
|
||||
@Log("删除工单管理")
|
||||
|
||||
//@SaCheckPermission("@el.check('pdmBdWorkorder:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
@@ -97,7 +91,6 @@ public class PdmBdWorkorderController {
|
||||
|
||||
@PostMapping("/submits")
|
||||
@Log("工单下发")
|
||||
|
||||
public ResponseEntity<Object> submits(@RequestBody PdmBdWorkorder entity) {
|
||||
pdmBdWorkorderService.submits(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
@@ -105,7 +98,6 @@ public class PdmBdWorkorderController {
|
||||
|
||||
@PostMapping("/synchronize")
|
||||
@Log("工单同步")
|
||||
|
||||
@Limit(period = 1, count = 1)
|
||||
//@SaCheckPermission("materialtype:list")
|
||||
public ResponseEntity<Object> synchronize(@RequestBody Map whereJson) {
|
||||
@@ -115,7 +107,6 @@ public class PdmBdWorkorderController {
|
||||
|
||||
@PostMapping("/forceFinish")
|
||||
@Log("强制完工")
|
||||
|
||||
public ResponseEntity<Object> forceFinish(@RequestBody PdmBdWorkorder entity) {
|
||||
pdmBdWorkorderService.forceFinish(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
|
||||
@@ -32,7 +32,6 @@ public class ReportController {
|
||||
|
||||
@GetMapping("/mudTransfer")
|
||||
@Log("泥料转运记录表")
|
||||
|
||||
public ResponseEntity<Object> mudTransfer(JSONObject json, PageQuery page) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,6 @@ public class SchBaseAcsandlmsinteractivelogController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询ACS和LMS交互日志表")
|
||||
|
||||
//@SaCheckPermission("@el.check('schBaseAcsandlmsinteractivelog:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(schBaseAcsandlmsinteractivelogService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
|
||||
@@ -38,7 +38,6 @@ public class SchBasePointController {
|
||||
|
||||
@PostMapping
|
||||
@Log("新增点位管理")
|
||||
|
||||
//@SaCheckPermission("@el.check('schBasePoint:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody SchBasePoint entity) {
|
||||
schBasePointService.create(entity);
|
||||
@@ -47,7 +46,6 @@ public class SchBasePointController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改点位管理")
|
||||
|
||||
//@SaCheckPermission("@el.check('schBasePoint:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody SchBasePoint entity) {
|
||||
schBasePointService.update(entity);
|
||||
@@ -55,7 +53,6 @@ public class SchBasePointController {
|
||||
}
|
||||
|
||||
@Log("删除点位管理")
|
||||
|
||||
//@SaCheckPermission("@el.check('schBasePoint:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
@@ -65,7 +62,6 @@ public class SchBasePointController {
|
||||
|
||||
@Log("启动与禁用")
|
||||
@PostMapping("/changeUsed")
|
||||
|
||||
public ResponseEntity<Object> changeUsedOn(@RequestBody JSONObject jsonObject) {
|
||||
schBasePointService.changeUsed(jsonObject);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
@@ -73,7 +69,6 @@ public class SchBasePointController {
|
||||
|
||||
@PostMapping("/getPointList")
|
||||
@Log("获取区域下拉框")
|
||||
|
||||
//@SaCheckPermission("@el.check('schBaseRegion:list')")
|
||||
public ResponseEntity<Object> getPointList(@RequestBody(required = false) SchBasePoint region) {
|
||||
return new ResponseEntity<>(schBasePointService.getPointList(region), HttpStatus.OK);
|
||||
@@ -81,7 +76,6 @@ public class SchBasePointController {
|
||||
|
||||
@Log("锁定与解锁")
|
||||
@PostMapping("/changeLock")
|
||||
|
||||
public ResponseEntity<Object> changeLock(@RequestBody JSONObject points) {
|
||||
schBasePointService.changeLock(points);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
|
||||
@@ -31,7 +31,6 @@ public class SchBaseRegionController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询区域管理")
|
||||
|
||||
//@SaCheckPermission("@el.check('schBaseRegion:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(regionService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
@@ -39,7 +38,6 @@ public class SchBaseRegionController {
|
||||
|
||||
@PostMapping
|
||||
@Log("新增区域管理")
|
||||
|
||||
//@SaCheckPermission("@el.check('schBaseRegion:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody SchBaseRegion entity) {
|
||||
regionService.create(entity);
|
||||
@@ -48,7 +46,6 @@ public class SchBaseRegionController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改区域管理")
|
||||
|
||||
//@SaCheckPermission("@el.check('schBaseRegion:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody SchBaseRegion entity) {
|
||||
regionService.update(entity);
|
||||
@@ -56,7 +53,6 @@ public class SchBaseRegionController {
|
||||
}
|
||||
|
||||
@Log("删除区域管理")
|
||||
|
||||
//@SaCheckPermission("@el.check('schBaseRegion:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
@@ -66,7 +62,6 @@ public class SchBaseRegionController {
|
||||
|
||||
@PostMapping("/getRegionList")
|
||||
@Log("获取区域下拉框")
|
||||
|
||||
//@SaCheckPermission("@el.check('schBaseRegion:list')")
|
||||
public ResponseEntity<Object> getRegionList(@RequestBody(required = false) SchBaseRegion region) {
|
||||
return new ResponseEntity<>(regionService.getRegionList(region), HttpStatus.OK);
|
||||
@@ -74,7 +69,6 @@ public class SchBaseRegionController {
|
||||
|
||||
@PostMapping("/getPointStatusSelectById")
|
||||
@Log("获取点位状态下拉框")
|
||||
|
||||
//@SaCheckPermission("region:add")
|
||||
public ResponseEntity<Object> getPointStatusSelectById(@RequestBody String region_id) {
|
||||
return new ResponseEntity<>(regionService.getPointStatusSelectById(region_id), HttpStatus.OK);
|
||||
|
||||
@@ -54,7 +54,6 @@ public class SchBaseTaskController {
|
||||
}
|
||||
|
||||
@Log("删除任务管理")
|
||||
|
||||
//@SaCheckPermission("@el.check('schBaseTask:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
|
||||
@@ -31,7 +31,6 @@ public class SchBaseTaskconfigController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询任务配置")
|
||||
|
||||
//@SaCheckPermission("@el.check('schBaseTaskconfig:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(schBaseTaskconfigService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
@@ -39,7 +38,6 @@ public class SchBaseTaskconfigController {
|
||||
|
||||
@PostMapping
|
||||
@Log("新增任务配置")
|
||||
|
||||
//@SaCheckPermission("@el.check('schBaseTaskconfig:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody SchBaseTaskconfig entity) {
|
||||
schBaseTaskconfigService.create(entity);
|
||||
@@ -48,7 +46,6 @@ public class SchBaseTaskconfigController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改任务配置")
|
||||
|
||||
//@SaCheckPermission("@el.check('schBaseTaskconfig:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody SchBaseTaskconfig entity) {
|
||||
schBaseTaskconfigService.update(entity);
|
||||
@@ -56,7 +53,6 @@ public class SchBaseTaskconfigController {
|
||||
}
|
||||
|
||||
@Log("删除任务配置")
|
||||
|
||||
//@SaCheckPermission("@el.check('schBaseTaskconfig:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
|
||||
@@ -97,9 +97,9 @@ public class CTQKTask extends AbstractTask {
|
||||
SchBasePoint point = findStartPoint(startRegionStr);
|
||||
if (ObjectUtil.isEmpty(point)) {
|
||||
// 消息通知
|
||||
noticeService.createNotice("拆盘机暂无托盘!", TASK_CONFIG_CODE + task.getPoint_code2(),
|
||||
noticeService.createNotice("货架暂无托盘!", TASK_CONFIG_CODE + task.getPoint_code2(),
|
||||
NoticeTypeEnum.WARN.getCode());
|
||||
throw new BadRequestException("拆盘机暂无托盘!");
|
||||
throw new BadRequestException("货架暂无托盘!");
|
||||
}
|
||||
// 设置终点并修改创建成功状态
|
||||
task.setPoint_code1(point.getPoint_code());
|
||||
|
||||
@@ -212,15 +212,15 @@ public class FJMKTask extends AbstractTask {
|
||||
// hint: 获取各自组盘信息。这里可能被解绑了,所以,未解绑的数据没拿到,就拿解绑的数据
|
||||
String qty1 = ObjectUtil.isNotEmpty(param.getString("qty1")) ? param.getString("qty1") : "-";
|
||||
String vehicleCode1 = ObjectUtil.isNotEmpty(param.getString("vehicle_code1"))
|
||||
? param.getString("vehicle_code1") : "-";
|
||||
? TaskUtils.defaultVehicleCode(param.getString("vehicle_code1")) : "-";
|
||||
String pcsn1 = vehiclematerialgroupService.getNowOrOldPcsnByVehicleCode(vehicleCode1, GeneralDefinition.STEEL_TRAY);
|
||||
String qty2 = ObjectUtil.isNotEmpty(param.getString("qty2")) ? param.getString("qty2") : "-";
|
||||
String vehicleCode2 = ObjectUtil.isNotEmpty(param.getString("vehicle_code2"))
|
||||
? param.getString("vehicle_code2") : "-";
|
||||
? TaskUtils.defaultVehicleCode(param.getString("vehicle_code2")) : "-";
|
||||
String pcsn2 = vehiclematerialgroupService.getNowOrOldPcsnByVehicleCode(vehicleCode2, GeneralDefinition.STEEL_TRAY);
|
||||
String qty3 = ObjectUtil.isNotEmpty(param.getString("qty3")) ? param.getString("qty3") : "-";
|
||||
String vehicleCode3 = ObjectUtil.isNotEmpty(param.getString("vehicle_code3"))
|
||||
? param.getString("vehicle_code3") : "-";
|
||||
? TaskUtils.defaultVehicleCode(param.getString("vehicle_code3")) : "-";
|
||||
String pcsn3 = vehiclematerialgroupService.getNowOrOldPcsnByVehicleCode(vehicleCode3, GeneralDefinition.STEEL_TRAY);
|
||||
// 砖块数量
|
||||
Integer qty = param.getInteger("qty");
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.nl.wms.sch.task_manage.task.tasks.gtx;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.system.service.notice.ISysNoticeService;
|
||||
@@ -20,12 +21,16 @@ import org.nl.wms.sch.task_manage.task.core.TaskStatus;
|
||||
import org.nl.wms.sch.task_manage.task.tasks.gtx.mapper.HCSSXMapper;
|
||||
import org.nl.wms.util.PointUtils;
|
||||
import org.nl.wms.util.TaskUtils;
|
||||
import org.redisson.api.RLock;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -50,39 +55,55 @@ public class HCSSXMLTask extends AbstractTask {
|
||||
private HCSSXMapper hcssxMapper;
|
||||
@Autowired
|
||||
private ISysNoticeService noticeService;
|
||||
@Autowired
|
||||
private RedissonClient redissonClient;
|
||||
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public void create() throws BadRequestException {
|
||||
// 需要找压制、双层输送线的半条任务。
|
||||
// 获取任务
|
||||
List<SchBaseTask> tasks = taskService.findApplyTasksByTaskStatus(TASK_CONFIG_CODE, YZ_TASK_CONFIG_CODE);
|
||||
// 配置信息
|
||||
SchBaseTaskconfig taskConfig = taskConfigService.getOne(new LambdaQueryWrapper<SchBaseTaskconfig>()
|
||||
.eq(SchBaseTaskconfig::getConfig_code, TASK_CONFIG_CODE));
|
||||
for (SchBaseTask task : tasks) {
|
||||
TaskUtils.setUpdateByAcs(task);
|
||||
List<String> nextRegionStr = Arrays.stream(taskConfig.getNext_region_str().split(","))
|
||||
.collect(Collectors.toList());
|
||||
// 找终点
|
||||
SchBasePoint point = findNextPoint(nextRegionStr);
|
||||
if (ObjectUtil.isEmpty(point)) {
|
||||
task.setRemark("入窑口未找到所需点位!");
|
||||
taskService.updateById(task);
|
||||
// 消息通知
|
||||
noticeService.createNotice(task.getRemark(), task.getConfig_code() + task.getTask_code(),
|
||||
NoticeTypeEnum.WARN.getCode());
|
||||
continue;
|
||||
}
|
||||
// 设置终点并修改创建成功状态
|
||||
task.setPoint_code2(point.getPoint_code());
|
||||
task.setTask_status(TaskStatus.CREATED.getCode());
|
||||
task.setRemark("");
|
||||
TaskUtils.setUpdateByAcs(task);
|
||||
taskService.updateById(task);
|
||||
// hint: 防止定时任务与http请求并发问题
|
||||
RLock lock = redissonClient.getLock(TASK_CONFIG_CODE);
|
||||
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
||||
try {
|
||||
if (tryLock) {
|
||||
// 需要找压制、双层输送线的半条任务。
|
||||
// 获取任务
|
||||
List<SchBaseTask> tasks = taskService.findApplyTasksByTaskStatus(TASK_CONFIG_CODE, YZ_TASK_CONFIG_CODE);
|
||||
// 配置信息
|
||||
SchBaseTaskconfig taskConfig = taskConfigService.getOne(new LambdaQueryWrapper<SchBaseTaskconfig>()
|
||||
.eq(SchBaseTaskconfig::getConfig_code, TASK_CONFIG_CODE));
|
||||
for (SchBaseTask task : tasks) {
|
||||
TaskUtils.setUpdateByAcs(task);
|
||||
List<String> nextRegionStr = Arrays.stream(taskConfig.getNext_region_str().split(","))
|
||||
.collect(Collectors.toList());
|
||||
// 找终点
|
||||
SchBasePoint point = findNextPoint(nextRegionStr);
|
||||
if (ObjectUtil.isEmpty(point)) {
|
||||
task.setRemark("入窑口未找到所需点位!");
|
||||
taskService.updateById(task);
|
||||
// 消息通知
|
||||
noticeService.createNotice(task.getRemark(), task.getConfig_code() + task.getTask_code(),
|
||||
NoticeTypeEnum.WARN.getCode());
|
||||
return;
|
||||
}
|
||||
// 设置终点并修改创建成功状态
|
||||
task.setPoint_code2(point.getPoint_code());
|
||||
task.setTask_status(TaskStatus.CREATED.getCode());
|
||||
task.setRemark("");
|
||||
TaskUtils.setUpdateByAcs(task);
|
||||
taskService.updateById(task);
|
||||
|
||||
point.setIng_task_code(task.getTask_code());
|
||||
PointUtils.setUpdateByAcs(point);
|
||||
pointService.updateById(point);
|
||||
point.setIng_task_code(task.getTask_code());
|
||||
PointUtils.setUpdateByAcs(point);
|
||||
pointService.updateById(point);
|
||||
}
|
||||
} else {
|
||||
throw new BadRequestException("其他设备占用锁,等待结束!");
|
||||
}
|
||||
} finally {
|
||||
if (tryLock) {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,14 +7,10 @@
|
||||
p.*
|
||||
FROM
|
||||
`sch_base_point` p
|
||||
LEFT JOIN sch_base_point p2 ON p2.point_code = p.parent_point_code
|
||||
WHERE p.point_type = '1'
|
||||
AND p.point_status = '1'
|
||||
AND p.is_used = true
|
||||
AND p2.point_status = '1'
|
||||
AND p2.is_used = true
|
||||
AND (p.ing_task_code = '' OR p.ing_task_code IS NULL)
|
||||
AND 0 = (SELECT COUNT(*) FROM sch_base_task WHERE point_code2 = p.point_code AND task_status < '5')
|
||||
AND 0 = (SELECT COUNT(*) FROM sch_base_task WHERE point_code2 = p.point_code AND task_status <![CDATA[<]]> '5')
|
||||
AND p.region_code IN
|
||||
<foreach collection="regionCode" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
|
||||
Reference in New Issue
Block a user