Commit b0e2ef9c authored by qinhu's avatar qinhu

产值导出

parent 9679eb3e
......@@ -37,3 +37,10 @@ gen
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
/mybatis-generator/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
/mybatis-generator/target/maven-archiver/pom.properties
/cement-common/common-swagger/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
/cement-common/common-swagger/target/maven-archiver/pom.properties
/cement-common/common-swagger/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
/cement-common/common-swagger/target/maven-archiver/pom.properties
/cement-common/common-swagger/target/
......@@ -28,5 +28,10 @@ public class EntrustSample {
private Integer teamGroupId;
private Integer userId;
private LocalDateTime finishTime;
/**
* 舍弃
*/
private String content;
private Long handleId;
}
......@@ -100,7 +100,7 @@
</select>
<select id="getEntrustSampleOptimize" resultType="cn.wise.sc.cement.business.entity.EntrustSample">
SELECT project_name,entrust_code,h.id,s.entrust_id,h.user_id,s.id as sample_id,e.status,h.content,h.finish_time
SELECT project_name,entrust_code,h.id,s.entrust_id,h.user_id,s.id as sample_id,e.status,h.handle_id,h.finish_time
FROM entrust e
LEFT JOIN
(SELECT * FROM sample) s
......
......@@ -3057,9 +3057,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
rts = rts.replace("<sup>+</sup>","⁺");
}
return rts;
}
......@@ -3092,7 +3090,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
Set<Integer> equipmentIds = new HashSet<>(source.size());
source.forEach(arg -> {
equipmentIds.add(arg.getEquipmentId());
//获取使用的设备id
//获取使用的设备id view
//关联检测项目
if (StrUtil.isNotBlank(arg.getTeamName())) {
String[] teamSplits = arg.getTeamName().split("、");
......
......@@ -407,7 +407,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
}
//非标准产值
List<NonStandardValue> nonStandardValues = iNonStandardValueService.nonValue(startDate, endDate, groupId,name).getData();
List<NonStandardValue> nonStandardValues = iNonStandardValueService.nonValue(startDate, endDate, groupId, name).getData();
//标准产值
List<NormProductionStatistics> productionStatistics = this.normProductionStatistics(start, end, name, groupId).getData();
......@@ -737,7 +737,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
//处理项是多个处理ids 、分割
List<Integer> ids = new ArrayList<>();
try {
ids.add(sampleHandle.getHandleId());
ids.add(sampleHandle.getHandleId());
} catch (NumberFormatException ex) {
throw new RuntimeException("处理项目的id传的有问题呀!");
}
......@@ -786,12 +786,9 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
List<Integer> handleIds = new ArrayList<>();
//处理项id
entrustSamples.forEach(arg -> {
String idsStr = arg.getContent();
String[] split = idsStr.split("、");
Long handId = arg.getHandleId();
try {
for (String idStr : split) {
handleIds.add(Integer.parseInt(idStr));
}
handleIds.add(Math.toIntExact(handId));
} catch (NumberFormatException ex) {
throw new RuntimeException("处理项目的id传的有问题呀!");
}
......@@ -803,13 +800,10 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
List<Handle> handles = iHandleService.listByIds(handleIds);
for (EntrustSample entrustSample : entrustSamples) {
String content = entrustSample.getContent();
String[] split = content.split("、");
List<Integer> ids = new ArrayList<>(split.length);
Long handId = entrustSample.getHandleId();
List<Integer> ids = new ArrayList<>(1);
try {
for (String idStr : split) {
ids.add(Integer.parseInt(idStr));
}
ids.add(Math.toIntExact(handId));
} catch (NumberFormatException ex) {
throw new RuntimeException("处理项目的id传的有问题呀!");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment