|
|
|
@ -6,7 +6,10 @@ import com.foreverwin.mesnac.common.helper.NextNumberHelper;
|
|
|
|
|
import com.foreverwin.mesnac.equip.model.ResourceInspectTaskSpare;
|
|
|
|
|
import com.foreverwin.mesnac.equip.service.ResourceInspectTaskSpareService;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.dto.NcCodeDto;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.mapper.NwaUserMapper;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.model.DataField;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.model.NwaUser;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.service.DataFieldListService;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.service.NcCodeService;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.service.NwaUserService;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.service.ResrceService;
|
|
|
|
@ -53,6 +56,23 @@ public class ResourceRepairTaskServiceImpl extends ServiceImpl<ResourceRepairTas
|
|
|
|
|
private ResrceService resrceService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private NwaUserService nwaUserService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private NwaUserMapper nwaUserMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private DataFieldListService dataFieldListService;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public HashMap<String, Object> init() {
|
|
|
|
|
HashMap<String, Object> hashMap = new HashMap<>();
|
|
|
|
|
String site = CommonMethods.getSite();
|
|
|
|
|
//原因分类
|
|
|
|
|
DataField dealWay = new DataField();
|
|
|
|
|
dealWay.setSite(site);
|
|
|
|
|
dealWay.setDataField("REPAIR_DEAL_WAY");
|
|
|
|
|
List<DataField> dealWayList = dataFieldListService.findDataFieldListById(dealWay);
|
|
|
|
|
hashMap.put("REPAIR_DEAL_WAY",dealWayList);
|
|
|
|
|
return hashMap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public IPage<ResourceRepairTask> selectPage(FrontPage<ResourceRepairTask> frontPage, ResourceRepairTask resourceRepairTask) {
|
|
|
|
@ -240,11 +260,22 @@ public class ResourceRepairTaskServiceImpl extends ServiceImpl<ResourceRepairTas
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ResourceRepairTask findResourceRepairTaskByHandleAndSite(String site, String handle) {
|
|
|
|
|
ResourceRepairTask repairTask = resourceRepairTaskMapper.findResourceRepairTaskByHandleAndSite(site, handle);
|
|
|
|
|
// 耗用备品
|
|
|
|
|
ResourceInspectTaskSpare taskSpare = new ResourceInspectTaskSpare();
|
|
|
|
|
taskSpare.setResourceInspectTaskBo(handle);
|
|
|
|
|
List<ResourceInspectTaskSpare> spareList = resourceInspectTaskSpareService.selectList(taskSpare);
|
|
|
|
|
ResourceRepairTask repairTask = resourceRepairTaskMapper.findResourceRepairTaskByHandleAndSite(site, handle);
|
|
|
|
|
repairTask.setSpareList(spareList);
|
|
|
|
|
// 维修用户的中文名称
|
|
|
|
|
String repairUsers = repairTask.getRepairUsers();
|
|
|
|
|
if (repairUsers != null && !repairUsers.equals("")){
|
|
|
|
|
String[] split = repairUsers.split(",");
|
|
|
|
|
if (split.length > 0){
|
|
|
|
|
List<String> list = Arrays.asList(split);
|
|
|
|
|
String userNameList = nwaUserMapper.getFullNameCommaByUserNameList(site, list);
|
|
|
|
|
repairTask.setRepairUserName(userNameList);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return repairTask;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|