This commit is contained in:
huangzj
2023-09-18 13:56:10 +08:00
parent c6729d0c33
commit 5b8963ed8d
6 changed files with 17 additions and 9 deletions

View File

@@ -222,18 +222,18 @@ public class EquipmentDeliveryController extends BaseController {
@ResponseBody
@ApiOperation("联调完成")
@PostMapping(value = "testcompletion")
public HttpResult<String> testCompletion(@RequestParam("deviceId") String deviceId,@RequestParam("type") String type){
public HttpResult<String> testCompletion(@RequestParam("deviceId") String deviceId,@RequestParam("type") String type,@RequestParam("remark") String remark){
String methodDescribe = getMethodDescribe("testCompletion");
csEquipmentDeliveryService.testCompletion(deviceId,type);
csEquipmentDeliveryService.testCompletion(deviceId,type, remark);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
@ResponseBody
@ApiOperation("取消联调")
@PostMapping(value = "deleteTest")
public HttpResult<String> deleteTest(@RequestParam("deviceId") String deviceId,@RequestParam("type") String type){
public HttpResult<String> deleteTest(@RequestParam("deviceId") String deviceId,@RequestParam("type") String type,@RequestParam("remark") String remark){
String methodDescribe = getMethodDescribe("testCompletion");
csEquipmentDeliveryService.deleteTest(deviceId,type);
csEquipmentDeliveryService.deleteTest(deviceId,type, remark);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}

View File

@@ -39,7 +39,8 @@
c.name equipmentName,
c.create_time createTime,
c.run_status,
c.mac mac
c.mac mac,
c.process process
FROM
(select * from cs_ledger where LEVEL = 0 ) a,
(select * from cs_ledger where LEVEL = 1 ) b,

View File

@@ -97,7 +97,7 @@ public interface CsEquipmentDeliveryService extends IService<CsEquipmentDelivery
void delete(String devId);
void testCompletion(String deviceId,String type);
void testCompletion(String deviceId,String type,String remark);
void deleteTest(String deviceId, String type);
void deleteTest(String deviceId, String type,String remark);
}

View File

@@ -471,7 +471,7 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
@Override
@Transactional(rollbackFor = Exception.class)
public void testCompletion(String deviceId,String type) {
public void testCompletion(String deviceId,String type,String remark) {
CsEquipmentDeliveryPO one = this.lambdaQuery().eq(CsEquipmentDeliveryPO::getId, deviceId).one();
this.lambdaUpdate().eq(CsEquipmentDeliveryPO::getId,deviceId).
set(CsEquipmentDeliveryPO::getStatus,0).
@@ -482,11 +482,12 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
eq(CsEquipmentProcessPO::getProcess,type).
eq(CsEquipmentProcessPO::getStatus,1).
set(CsEquipmentProcessPO::getEndTime,LocalDateTime.now()).
set(CsEquipmentProcessPO::getRemark,remark).
update();
}
@Override
public void deleteTest(String deviceId, String type) {
public void deleteTest(String deviceId, String type ,String remark) {
CsEquipmentDeliveryPO one = this.lambdaQuery().eq(CsEquipmentDeliveryPO::getId, deviceId).one();
this.lambdaUpdate().eq(CsEquipmentDeliveryPO::getId,deviceId).
@@ -498,6 +499,7 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
eq(CsEquipmentProcessPO::getProcess,type).
eq(CsEquipmentProcessPO::getStatus,0).
set(CsEquipmentProcessPO::getEndTime,LocalDateTime.now()).
set(CsEquipmentProcessPO::getRemark,remark).
update();
}