|
@@ -675,14 +675,18 @@ public class ZhcxItpTemplateNodesServiceImpl extends ServiceImpl<ZhcxItpTemplate
|
|
|
if(ObjectUtil.isNull(map.get("machineno"))) {
|
|
|
return R.error("请选择机号");
|
|
|
}
|
|
|
+ if(ObjectUtil.isNull(map.get("projectType"))) {
|
|
|
+ return R.error("请选择产品类型");
|
|
|
+ }
|
|
|
// 从前端接收的基础信息
|
|
|
String projectId = (String) map.get("projectId");
|
|
|
String projectName = (String) map.get("projectName");
|
|
|
String projectCode = (String) map.get("projectCode");
|
|
|
String machineno = (String) map.get("machineno");
|
|
|
String machineid = (String) map.get("machineid");
|
|
|
+ String projectType = (String) map.get("projectType");
|
|
|
// 获取模板信息
|
|
|
- ZhcxTempExport tempExport = baseMapper.getFileIdByCes("CES");
|
|
|
+ ZhcxTempExport tempExport = baseMapper.getFileIdByCes(projectType);
|
|
|
if(ObjectUtil.isNull(tempExport) || ObjectUtil.isEmpty(tempExport.getFileId())) {
|
|
|
return R.error("获取word模板失败");
|
|
|
}
|
|
@@ -699,13 +703,15 @@ public class ZhcxItpTemplateNodesServiceImpl extends ServiceImpl<ZhcxItpTemplate
|
|
|
mainMap.put("machineno",machineno);
|
|
|
// 当前时间
|
|
|
mainMap.put("nowDate",DateUtil.today());
|
|
|
+ // 机台数量
|
|
|
+ mainMap.put("machinenum",baseMapper.getMachineNumByProjectCode(projectId));
|
|
|
// 获取其他参数
|
|
|
List<ZhcxTempExport> temps = baseMapper.getOutSideInspectionItpListData(projectCode,machineno);
|
|
|
temps.forEach(temp -> {
|
|
|
mainMap.put(temp.getNum()+"result",temp.getConclusion());
|
|
|
mainMap.put(temp.getNum()+"by",temp.getSupervision());
|
|
|
if(temp.getChecktime() != null) {
|
|
|
- mainMap.put(temp.getNum()+"date",DateUtil.format(temp.getChecktime(), "yyyy-MM-dd"));
|
|
|
+ mainMap.put(temp.getNum()+"date",DateUtil.format(temp.getChecktime(), "yyyy/MM/dd"));
|
|
|
}
|
|
|
});
|
|
|
|