问题修改
This commit is contained in:
parent
f165448650
commit
68764e648b
|
|
@ -265,7 +265,7 @@ public class LossAssessmentServiceImpl implements LossAssessmentService {
|
||||||
//2、修改任务状态
|
//2、修改任务状态
|
||||||
mapper.updateSingleTaskStatus(task, loginUser.getUserid(), RepairTaskStatusEnum.TASK_LOSS_ASSESSMENT_COMPLETE.getStatus());
|
mapper.updateSingleTaskStatus(task, loginUser.getUserid(), RepairTaskStatusEnum.TASK_LOSS_ASSESSMENT_COMPLETE.getStatus());
|
||||||
//将数据status状态都置为1
|
//将数据status状态都置为1
|
||||||
mapper.updateStatus(task.getTaskId());
|
// mapper.updateStatus(task.getTaskId());
|
||||||
//3、重新生成维修数据
|
//3、重新生成维修数据
|
||||||
for (RepairTaskDetails repairTaskDetails : detailsList){
|
for (RepairTaskDetails repairTaskDetails : detailsList){
|
||||||
repairTaskDetails.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
repairTaskDetails.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||||
|
|
@ -388,7 +388,7 @@ public class LossAssessmentServiceImpl implements LossAssessmentService {
|
||||||
task.setTaskId(bean.getTaskId());
|
task.setTaskId(bean.getTaskId());
|
||||||
mapper.updateSingleTaskStatus(task, loginUser.getUserid(), RepairTaskStatusEnum.TASK_LOSS_ASSESSMENT_COMPLETE.getStatus());
|
mapper.updateSingleTaskStatus(task, loginUser.getUserid(), RepairTaskStatusEnum.TASK_LOSS_ASSESSMENT_COMPLETE.getStatus());
|
||||||
//将数据status状态都置为1
|
//将数据status状态都置为1
|
||||||
mapper.updateStatus(task.getTaskId());
|
// mapper.updateStatus(task.getTaskId());
|
||||||
//3、重新生成维修数据
|
//3、重新生成维修数据
|
||||||
for (RepairTaskDetails repairTaskDetails : detailsList){
|
for (RepairTaskDetails repairTaskDetails : detailsList){
|
||||||
repairTaskDetails.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
repairTaskDetails.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ public class RepairTask {
|
||||||
private String firstId;
|
private String firstId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据状态 3-修饰后入库驳回
|
* 数据状态 0-未定损,1-已定损 3-修饰后入库驳回
|
||||||
*/
|
*/
|
||||||
private String dataStatus;
|
private String dataStatus;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,11 @@ public class RepairDeviceVO {
|
||||||
@ApiModelProperty(value = "一级类型id")
|
@ApiModelProperty(value = "一级类型id")
|
||||||
private Long firstId;
|
private Long firstId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据状态 0-未定损,1-已定损 3-修饰后入库驳回
|
||||||
|
*/
|
||||||
|
private String dataStatus;
|
||||||
|
|
||||||
// 手动覆盖 getter 方法,确保 List 始终被初始化
|
// 手动覆盖 getter 方法,确保 List 始终被初始化
|
||||||
public List<RepairPartDetails> getCodeInRepairPartList() {
|
public List<RepairPartDetails> getCodeInRepairPartList() {
|
||||||
if (this.codeInRepairPartList == null) {this.codeInRepairPartList = new ArrayList<>();}
|
if (this.codeInRepairPartList == null) {this.codeInRepairPartList = new ArrayList<>();}
|
||||||
|
|
|
||||||
|
|
@ -164,6 +164,7 @@
|
||||||
repair_apply_details
|
repair_apply_details
|
||||||
set
|
set
|
||||||
repairer = #{repairer},
|
repairer = #{repairer},
|
||||||
|
status = 1,
|
||||||
<if test="remark != '' and remark != null">
|
<if test="remark != '' and remark != null">
|
||||||
remark = #{remark},
|
remark = #{remark},
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -271,7 +271,8 @@
|
||||||
bai.CODE AS backCode,
|
bai.CODE AS backCode,
|
||||||
GROUP_CONCAT(DISTINCT mt2.type_name) as type,
|
GROUP_CONCAT(DISTINCT mt2.type_name) as type,
|
||||||
rd.level as level,
|
rd.level as level,
|
||||||
GROUP_CONCAT(DISTINCT mt4.type_id) as firstId
|
GROUP_CONCAT(DISTINCT mt4.type_id) as firstId,
|
||||||
|
rd.status as dataStatus
|
||||||
FROM
|
FROM
|
||||||
repair_apply_details rd
|
repair_apply_details rd
|
||||||
LEFT JOIN ma_type mt on rd.type_id = mt.type_id
|
LEFT JOIN ma_type mt on rd.type_id = mt.type_id
|
||||||
|
|
@ -387,6 +388,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRepairDeviceList" resultType="com.bonus.material.repair.domain.vo.RepairDeviceVO">
|
<select id="getRepairDeviceList" resultType="com.bonus.material.repair.domain.vo.RepairDeviceVO">
|
||||||
|
<![CDATA[
|
||||||
select
|
select
|
||||||
rad.id as id,
|
rad.id as id,
|
||||||
rad.task_id as taskId,
|
rad.task_id as taskId,
|
||||||
|
|
@ -411,7 +413,8 @@
|
||||||
bai.CODE AS backCode,
|
bai.CODE AS backCode,
|
||||||
mt4.type_id AS firstId,
|
mt4.type_id AS firstId,
|
||||||
( SELECT COUNT(*) FROM repair_cost rc WHERE rc.repair_id = rad.id ) AS totalCostRecords,
|
( SELECT COUNT(*) FROM repair_cost rc WHERE rc.repair_id = rad.id ) AS totalCostRecords,
|
||||||
( SELECT COALESCE(SUM(rc.costs), 0) FROM repair_cost rc WHERE rc.repair_id = rad.id ) AS totalCost
|
( SELECT COALESCE(SUM(rc.costs), 0) FROM repair_cost rc WHERE rc.repair_id = rad.id ) AS totalCost,
|
||||||
|
rad2.`status` as dataStatus
|
||||||
from
|
from
|
||||||
repair_apply_details rad
|
repair_apply_details rad
|
||||||
left join ma_type mt on rad.type_id = mt.type_id
|
left join ma_type mt on rad.type_id = mt.type_id
|
||||||
|
|
@ -421,12 +424,16 @@
|
||||||
LEFT JOIN back_apply_info bai ON rad.back_id = bai.id
|
LEFT JOIN back_apply_info bai ON rad.back_id = bai.id
|
||||||
left join ma_type mt3 ON mt2.parent_id = mt3.type_id and mt3.del_flag = '0'
|
left join ma_type mt3 ON mt2.parent_id = mt3.type_id and mt3.del_flag = '0'
|
||||||
left join ma_type mt4 ON mt3.parent_id = mt4.type_id and mt4.del_flag = '0'
|
left join ma_type mt4 ON mt3.parent_id = mt4.type_id and mt4.del_flag = '0'
|
||||||
<if test="userId != null">
|
left join repair_apply_details rad2 on rad2.task_id=rad.task_id and rad2.ma_id <=> rad.ma_id and rad2.type_id=rad.type_id and rad2.is_ds='1'
|
||||||
JOIN ma_type_repair mtr ON mtr.type_id = rad.type_id AND mtr.user_id = #{userId}
|
]]>
|
||||||
|
<if test="userId != null">
|
||||||
|
JOIN ma_type_repair mtr
|
||||||
|
ON mtr.type_id = rad.type_id
|
||||||
|
AND mtr.user_id = #{userId}
|
||||||
</if>
|
</if>
|
||||||
where
|
where
|
||||||
rad.task_id = #{taskId}
|
rad.task_id = #{taskId}
|
||||||
and is_ds=0
|
and rad.is_ds=0
|
||||||
<if test="companyId != null and companyId != ''">
|
<if test="companyId != null and companyId != ''">
|
||||||
and rad.company_id = #{companyId}
|
and rad.company_id = #{companyId}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue