包头bug修复

This commit is contained in:
guoshengxiong 2025-04-30 18:15:54 +08:00
parent fc4d761580
commit e406fd0d8d
5 changed files with 31 additions and 20 deletions

View File

@ -65,9 +65,10 @@ public class WelderSkillExamController {
@OperLog(operModul = "焊工技能考核评定登记表管理", operType = "分页查询", operDesc = "分页列表查询焊工技能考核评定登记表信息")
@ApiOperation(value = "分页列表查询焊工技能考核评定登记表信息", notes = "分页列表查询焊工技能考核评定登记表信息", httpMethod="GET")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
})
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "workerId", value = "劳务人员id", paramType = "query", required = false, dataType = "Integer"),
})
@GetMapping(value = "/page")
public Result<IPage<WelderSkillExam>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
return Result.success(welderSkillExamService.queryPageList(param));

View File

@ -79,4 +79,10 @@ public class WelderSkillExam implements Serializable {
private java.util.Date updateTime;
@ApiModelProperty(value = "焊工考核申请id")
private java.lang.Long requestId;
@ApiModelProperty(value = "焊接作业证")
private java.lang.String welderWorkPermit;
@ApiModelProperty(value = "试件类别json[碳钢,不锈钢]")
private java.lang.String testType;
@ApiModelProperty(value = "劳务人员id")
private java.lang.Long workerId;
}

View File

@ -25,6 +25,7 @@ import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.collections.list.PredicatedList;
import org.simpleframework.xml.core.Validate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
@ -557,6 +558,7 @@ public class PlanRecordController {
public Result importWork(@RequestParam("file") MultipartFile file, @RequestParam HashMap<String, Object> param) {
List<Map<String, String>> list = null;
String zyCodeName = null;
List<String> errList = new ArrayList<>();
try {
list = ExcelUtils.jxlExlToList(file.getInputStream(), 0);
if (list == null || list.size() == 0) {
@ -587,10 +589,13 @@ public class PlanRecordController {
record.setWorkType(1);
PlanRecord parent = codeNameMap.get(zyCodeName);
if (parent == null) {
throw new OpenAlertException(zyCodeName + "不存在");
errList.add(zyCodeName + "不存在");
continue;
}
if (parent != null) {
record.setParentId(parent.getId());
record.setAncestors(parent.getAncestors() + "," + parent.getId());
}
record.setParentId(parent.getId());
record.setAncestors(parent.getAncestors() + "," + parent.getId());
record.setPbsId(pbsId);
record.setSort(sort);
codeNameMap.compute(record.getCode() + ":" + record.getJobName(), (key, val) -> {
@ -612,9 +617,9 @@ public class PlanRecordController {
}
} catch (Exception e) {
e.printStackTrace();
return Result.error(zyCodeName + e.getMessage());
return Result.error(e.getMessage());
}
return Result.ok();
return Result.success(StrUtil.join(",", errList));
}
@ -677,13 +682,13 @@ public class PlanRecordController {
}
if (CollUtil.isNotEmpty(addList)) {
planRecordService.saveBatch(addList);
}
if (CollUtil.isNotEmpty(updateList)) {
importProfession(file, param);
} else if (CollUtil.isNotEmpty(updateList)) {
planRecordService.updateBatchById(updateList);
}
} catch (Exception e) {
e.printStackTrace();
throw new OpenAlertException();
throw new OpenAlertException(e.getMessage());
}
return Result.ok();
}

View File

@ -66,15 +66,6 @@ public class ProjectSupervisionMonthlyReportServiceImpl extends ServiceImpl<Proj
public void add(ProjectSupervisionMonthlyReport report) {
report.setId(null);
baseMapper.insert(report);
//添加到首页通知公告
ProjectHomeNotice projectHomeNotice = new ProjectHomeNotice();
projectHomeNotice.setProjectSn(report.getProjectSn());
projectHomeNotice.setWhichModule(7);
projectHomeNotice.setTitle(report.getNumber());
projectHomeNotice.setContent(report.getNumber());
projectHomeNotice.setFileUrl(report.getAttachment());
projectHomeNoticeService.add(projectHomeNotice);
}
@Override

View File

@ -26,6 +26,7 @@ import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
@ -35,6 +36,7 @@ import java.util.*;
* @date 2024-12-10
* @version V1.0
*/
@Transactional(rollbackFor = Exception.class)
@Service
public class WelderAssessmentRequestServiceImpl extends ServiceImpl<WelderAssessmentRequestMapper, WelderAssessmentRequest> implements IWelderAssessmentRequestService {
@Lazy
@ -111,6 +113,9 @@ public class WelderAssessmentRequestServiceImpl extends ServiceImpl<WelderAssess
wse.setOnSiteAssessmentDate(DateUtil.formatDate(DateUtil.parse(jo1.getString("field7688098758155"))));
wse.setAssessmentResult("合格");
wse.setRequestId(request.getId());
wse.setWelderWorkPermit(FlowUtil.getJSONString(jo, "field7861502993946"));
wse.setTestType(FlowUtil.getJSONString(jo1, "field6125703983606"));
wse.setWorkerId(workerInfo.getId());
welderSkillExamService.add(wse);
}
}
@ -198,6 +203,9 @@ public class WelderAssessmentRequestServiceImpl extends ServiceImpl<WelderAssess
wse.setOnSiteAssessmentDate(DateUtil.formatDate(DateUtil.parse(jo1.getString("field7688098758155"))));
wse.setAssessmentResult("合格");
wse.setRequestId(e.getId());
wse.setWelderWorkPermit(FlowUtil.getJSONString(jo, "field7861502993946"));
wse.setTestType(FlowUtil.getJSONString(jo1, "field6125703983606"));
wse.setWorkerId(workerInfo.getId());
welderSkillExamService.add(wse);
}
}