修试审核修改
This commit is contained in:
parent
a98d4dc800
commit
a212fef489
|
|
@ -157,4 +157,6 @@ public interface ScrapApplyDetailsMapper
|
||||||
List<RepairRecord> getRepairRecord(RepairAuditDetails bean);
|
List<RepairRecord> getRepairRecord(RepairAuditDetails bean);
|
||||||
|
|
||||||
String getFileUrl(String s);
|
String getFileUrl(String s);
|
||||||
|
|
||||||
|
List<RepairRecord> getGyoupRepairRecord(RepairAuditDetails byRepairId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -247,23 +247,28 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
||||||
taskType = 57;
|
taskType = 57;
|
||||||
long scrapTaskId = genTask(taskCode, taskType, taskStatus, tmTaskAgreement, companyId);
|
long scrapTaskId = genTask(taskCode, taskType, taskStatus, tmTaskAgreement, companyId);
|
||||||
for (RepairAuditDetails scrapDetails : scrapNumList) {
|
for (RepairAuditDetails scrapDetails : scrapNumList) {
|
||||||
|
RepairAuditDetails byRepairId = scrapApplyDetailsMapper.getByRepairId(String.valueOf(scrapDetails.getRepairId()));
|
||||||
|
List<RepairRecord> repairRecord = scrapApplyDetailsMapper.getGyoupRepairRecord(byRepairId);
|
||||||
Long typeId = scrapDetails.getTypeId();
|
Long typeId = scrapDetails.getTypeId();
|
||||||
Long maId = scrapDetails.getMaId();
|
Long maId = scrapDetails.getMaId();
|
||||||
// 创建报废任务
|
// 创建报废任务
|
||||||
BigDecimal scrapNum = scrapDetails.getScrapNum();
|
BigDecimal scrapNum = scrapDetails.getScrapNum();
|
||||||
if (scrapNum.compareTo(b) > 0) {
|
if (scrapNum.compareTo(b) > 0) {
|
||||||
ScrapApplyDetails scrapApplyDetails = new ScrapApplyDetails();
|
for (RepairRecord bean : repairRecord){
|
||||||
scrapApplyDetails.setTaskId(scrapTaskId);
|
ScrapApplyDetails scrapApplyDetails = new ScrapApplyDetails();
|
||||||
scrapApplyDetails.setTypeId(typeId);
|
scrapApplyDetails.setTaskId(scrapTaskId);
|
||||||
scrapApplyDetails.setMaId(maId);
|
scrapApplyDetails.setTypeId(typeId);
|
||||||
scrapApplyDetails.setScrapNum(scrapNum);
|
scrapApplyDetails.setMaId(maId);
|
||||||
scrapApplyDetails.setScrapSource("2");
|
scrapApplyDetails.setScrapNum(BigDecimal.valueOf(bean.getScrapNum()));
|
||||||
scrapApplyDetails.setStatus("0");
|
scrapApplyDetails.setScrapType(bean.getScrapType());
|
||||||
scrapApplyDetails.setParentId(scrapDetails.getId());
|
scrapApplyDetails.setScrapSource("2");
|
||||||
scrapApplyDetails.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
scrapApplyDetails.setStatus("0");
|
||||||
scrapApplyDetails.setCreateTime(new Date());
|
scrapApplyDetails.setParentId(scrapDetails.getId());
|
||||||
scrapApplyDetails.setCompanyId((long) companyId);
|
scrapApplyDetails.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||||
scrapApplyDetailsMapper.insertScrapApplyDetails(scrapApplyDetails);
|
scrapApplyDetails.setCreateTime(new Date());
|
||||||
|
scrapApplyDetails.setCompanyId((long) companyId);
|
||||||
|
scrapApplyDetailsMapper.insertScrapApplyDetails(scrapApplyDetails);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -383,5 +383,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from sys_file_info
|
from sys_file_info
|
||||||
where id = #{s}
|
where id = #{s}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getGyoupRepairRecord" resultType="com.bonus.sgzb.material.domain.RepairRecord">
|
||||||
|
select sum(scrap_num) as scrapNum,
|
||||||
|
scrap_reason as scrapReason,
|
||||||
|
scrap_type as scrapType,
|
||||||
|
file_ids as fileIds
|
||||||
|
from repair_apply_record rar
|
||||||
|
where repair_type = '3'
|
||||||
|
<if test="taskId != null and taskId != ''">
|
||||||
|
and rar.task_id = #{taskId}
|
||||||
|
</if>
|
||||||
|
<if test="maId != null and maId != ''">
|
||||||
|
and rar.ma_id = #{maId}
|
||||||
|
</if>
|
||||||
|
<if test="typeId != null and typeId != ''">
|
||||||
|
and rar.type_id = #{typeId}
|
||||||
|
</if>
|
||||||
|
group by scrap_type
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue