|
@@ -67,9 +67,9 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
public void launch(InsideInspectionOperRequest req) {
|
|
|
ZhcxInsideInspectionDo inspectionDo = getById(req.getId());
|
|
|
//生成报验单号
|
|
|
- genInspectionCode(inspectionDo);
|
|
|
+ updateInspection(inspectionDo);
|
|
|
//生成空派单信息
|
|
|
- dispatchService.genEmptyDispatch(req.getId());
|
|
|
+ dispatchService.genDispatch(inspectionDo);
|
|
|
|
|
|
//生成操作记录
|
|
|
SysUserVo user = zhcxCommon.getCurrentUser();
|
|
@@ -92,7 +92,7 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
public void cancel(InsideInspectionCancelDto dto) {
|
|
|
|
|
|
if(ObjectUtil.isEmpty(dto.getInsideIdList())) {
|
|
|
- return ;
|
|
|
+ throw new CustomException("请联系管理员,暂无报验单");
|
|
|
}
|
|
|
|
|
|
OperDto operDto = getOper();
|
|
@@ -129,7 +129,7 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
@Override
|
|
|
public void dispatch(InsideInspectionDispatchRequest dto) {
|
|
|
if(ObjectUtil.isEmpty(dto.getInsideIdList())) {
|
|
|
- return ;
|
|
|
+ throw new CustomException("请联系管理员,暂无报验单");
|
|
|
}
|
|
|
|
|
|
OperDto operDto = getOper();
|
|
@@ -188,7 +188,7 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
@Override
|
|
|
public void execute(InsideInspectionExecuteRequest req) {
|
|
|
if(ObjectUtil.isEmpty(req.getInsideIdList())) {
|
|
|
- return ;
|
|
|
+ throw new CustomException("请联系管理员,暂无报验单");
|
|
|
}
|
|
|
|
|
|
OperDto operDto = getOper();
|
|
@@ -224,13 +224,11 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
|
|
|
//报验单
|
|
|
ZhcxInsideInspectionDo inspection = new ZhcxInsideInspectionDo();
|
|
|
- inspection.setInspectioncode(insideId);
|
|
|
+ inspection.setId(insideId);
|
|
|
inspection.setInspectionstatus("30");
|
|
|
-
|
|
|
if(ObjectUtil.isNull(inOper.getInspection().getInspectioncomplatetime())) {
|
|
|
inspection.setInspectioncomplatetime(new Date());
|
|
|
}
|
|
|
-
|
|
|
inspectionList.add(inspection);
|
|
|
}
|
|
|
|
|
@@ -352,7 +350,7 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
*
|
|
|
* @param inspectionDo
|
|
|
*/
|
|
|
- private void genInspectionCode(ZhcxInsideInspectionDo inspectionDo) {
|
|
|
+ private void updateInspection(ZhcxInsideInspectionDo inspectionDo) {
|
|
|
//存在报验单号,则不再生成
|
|
|
if(ObjectUtil.isNotEmpty(inspectionDo.getInspectioncode())) {
|
|
|
return ;
|