维修拆分提交修改

This commit is contained in:
bonus 2025-07-28 15:57:07 +08:00
parent e1aef51b22
commit a816d9448d
6 changed files with 22 additions and 7 deletions

View File

@ -265,7 +265,7 @@ public class LossAssessmentServiceImpl implements LossAssessmentService {
int status = mapper.selectTaskStatus(taskId);
final TmTask tmTask = mapper.selectTmTaskByTaskId(taskId);
if (status<=0){
//驳回操作不可跨月操作
//驳回操作不可跨月退料的创建时间操作
if (!StringHelper.isNullOrEmptyString(String.valueOf(tmTask.getCreateTime()))) {
// createTime 转换为 LocalDate
LocalDate taskCreationDate = tmTask.getCreateTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();

View File

@ -171,6 +171,8 @@ public class RepairTaskDetails extends BaseEntity {
private String userName;
private int isDs ;
private List<PartType> partTypeList;
@ApiModelProperty(value = "登录用户id")

View File

@ -858,7 +858,7 @@ public class RepairServiceImpl implements RepairService {
partDetails.setPartId(null != partDetails.getPartId() ? partDetails.getPartId() : partDetails.getId());
// 有维修配件时,如果价格为空设置为0
if (null == partDetails.getPartCost()) {partDetails.setPartCost(BigDecimal.ZERO);}
partDetails.setTaskId(bean.getTaskId()).setMaId(bean.getMaId()).setTypeId(bean.getTypeId()).setCompanyId(null);
partDetails.setCreateBy(String.valueOf(loginUser.getUserid()));
@ -1119,6 +1119,7 @@ public class RepairServiceImpl implements RepairService {
repairTaskDetail.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
repairTaskDetail.setStatus("0");
repairTaskDetail.setNewTaskId(newTaskId);
repairTaskDetail.setIsDs(1);
repairMapper.insertRepaired(repairTaskDetail);
}
} else {

View File

@ -441,6 +441,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="agreementId != null">
AND ba.project_id = #{proId}
</if>
<if test="unitId != null">
AND ba.unit_id = #{unitId}
</if>
<if test="proId != null">
AND ba.project_id = #{proId}
</if>
</select>
<select id="getDetailsById" resultType="com.bonus.material.back.domain.BackApplyDetails">

View File

@ -385,18 +385,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt.unit_name as unitName,
mt.unit_value as unitValue,
mt.manage_type as manageType,
SUM( CASE WHEN sai.agreement_id = #{agreementId} AND sai.STATUS = '0' THEN sai.num ELSE 0 END ) AS num,
SUM( sai.num ) AS num,
mt.LEVEL as level
FROM
ma_type mt
LEFT JOIN slt_agreement_info sai ON mt.type_id = sai.type_id
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id and mt1.del_flag = '0'
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id and mt1.del_flag = '0'
WHERE
EXISTS ( SELECT 1 FROM slt_agreement_info sai2 WHERE sai2.type_id = mt.type_id AND sai2.agreement_id = #{agreementId}
AND sai2.STATUS = '0' and IFNULL(sai.lease_type,0) = 0 and sai2.num > 0)
and mt.manage_type = '1'
sai.agreement_id = #{agreementId} AND sai.STATUS = '0'
and mt.manage_type = '1'
GROUP BY
mt.type_id
HAVING num> 0
</select>
<select id="getMaType" resultType="com.bonus.material.common.domain.vo.SelectVo">

View File

@ -72,6 +72,9 @@
<if test="parentId != null">
parent_id,
</if>
<if test="isDs != null">
is_ds,
</if>
create_time
)
values (
@ -111,6 +114,9 @@
<if test="parentId != null">
#{parentId},
</if>
<if test="isDs != null">
#{isDs},
</if>
NOW()
)
</insert>