|
|
|
@ -11,6 +11,7 @@ import java.util.stream.Collectors;
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
|
import com.op.common.core.domain.BaseFileData;
|
|
|
|
|
import com.op.common.core.exception.ServiceException;
|
|
|
|
|
import com.op.common.core.utils.DateUtils;
|
|
|
|
|
import com.op.common.core.utils.StringUtils;
|
|
|
|
|
import com.op.common.core.utils.uuid.IdUtils;
|
|
|
|
@ -249,6 +250,12 @@ public class EquRepairOrderServiceImpl implements IEquRepairOrderService {
|
|
|
|
|
@Override
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
public int checkEquRepairOrder(EquRepairOrder equRepairOrder) {
|
|
|
|
|
//查询设备是否存在
|
|
|
|
|
String equipment = equOrderMapper.selectEquipment(equRepairOrder.getEquipmentCode());
|
|
|
|
|
if(StringUtils.isBlank(equipment)){
|
|
|
|
|
throw new ServiceException("该设备不存在,请联系系统相关人员。");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String code = equRepairOrder.getOrderCode().substring(10); //不生成流水号,从报修单号第十位开始切割、拼接
|
|
|
|
|
String workCode = DateUtils.dateTimeNow(DateUtils.YYYYMMDD) + code;
|
|
|
|
|
if (equRepairOrder.getOrderSource().equals("点检") || equRepairOrder.getOrderSource().equals("巡检")) { //判断是否是点检、巡检过来的
|
|
|
|
|