|
|
@@ -24,22 +24,18 @@ import com.ygtx.common.utils.DictUtils;
|
|
|
import com.ygtx.common.core.domain.entity.SysDept;
|
|
|
import com.ygtx.framework.aspectj.DataScopeAspect;
|
|
|
import com.ygtx.gxt.domain.*;
|
|
|
+import com.ygtx.gxt.mapper.*;
|
|
|
import com.ygtx.system.mapper.SysUserMapper;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
-import com.ygtx.gxt.mapper.GxtEquipmentMapper;
|
|
|
-import com.ygtx.gxt.mapper.GxtOrderPersonMapper;
|
|
|
import com.ygtx.gxt.service.*;
|
|
|
import com.ygtx.system.domain.SysPost;
|
|
|
import com.ygtx.system.domain.SysPostHomePage;
|
|
|
import com.ygtx.system.service.*;
|
|
|
-import com.ygtx.gxt.mapper.GxtRepairOrderPersonMapper;
|
|
|
-import com.ygtx.gxt.mapper.GxtWorkOrderPersonMapper;
|
|
|
import com.ygtx.system.service.ISysUserService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-import com.ygtx.gxt.mapper.GxtRepairOrderMapper;
|
|
|
import com.ygtx.common.annotation.DataScope;
|
|
|
import com.ygtx.common.core.domain.entity.SysRole;
|
|
|
import com.ygtx.common.core.domain.entity.SysUser;
|
|
|
@@ -120,6 +116,9 @@ public class GxtRepairOrderServiceImpl implements IGxtRepairOrderService
|
|
|
@Autowired
|
|
|
private SysUserMapper userMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IGxtFaultCodesService gxtFaultCodesService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询维修工单
|
|
|
*
|
|
|
@@ -1032,6 +1031,24 @@ public class GxtRepairOrderServiceImpl implements IGxtRepairOrderService
|
|
|
|
|
|
// 记录结单流转信息
|
|
|
if (result > 0) {
|
|
|
+ if (null != oldOrder.getFaultCode()) {
|
|
|
+ // 查询故障代码是否存在,不存在新增故障息
|
|
|
+ GxtFaultCodes faultCodes = new GxtFaultCodes();
|
|
|
+ faultCodes.setFaultCode(oldOrder.getFaultCode());
|
|
|
+ faultCodes.setModel(oldOrder.getModel());
|
|
|
+ faultCodes.setStation(oldOrder.getPcsStationName());
|
|
|
+ List<GxtFaultCodes> faultCodesList = gxtFaultCodesService.selectGxtFaultCodesList(faultCodes);
|
|
|
+ if (null != faultCodesList && faultCodesList.isEmpty() && faultCodesList.size() == 0) {
|
|
|
+ faultCodes.setFaultDescription(oldOrder.getFaultDesc());
|
|
|
+ faultCodes.setFaultBarcode(oldOrder.getFaultBarcode());
|
|
|
+ faultCodes.setStationId(oldOrder.getPcsStationId());
|
|
|
+ faultCodes.setCreateBy(SecurityUtils.getUsername());
|
|
|
+ faultCodes.setCreateTime(DateUtils.getNowDate());
|
|
|
+ faultCodes.setIsActive(0);
|
|
|
+ gxtFaultCodesService.insertGxtFaultCodes(faultCodes);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// String getMisData = configService.selectConfigByKey("gxt.repairOder.getMisData");
|
|
|
// if(StringUtils.isNotEmpty(getMisData) && getMisData.equals("1")){
|
|
|
if (StringUtils.isNotEmpty(gxtRepairOrder.getInfoEntry()) && "1".equals(gxtRepairOrder.getInfoEntry())) { //信息录入选择“关联mis工单”
|