宁夏试运行问题修改

This commit is contained in:
csyue 2024-06-05 13:15:29 +08:00
parent 8c120a3002
commit 860987874e
9 changed files with 72 additions and 1 deletions

View File

@ -497,6 +497,19 @@ public class TmTaskController extends BaseController {
} }
} }
/**
* 领料出库详情-出库完成
*/
@PostMapping("/outboundCompleted")
public AjaxResult outboundCompleted(@RequestBody TmTask task) {
int i = tmTaskService.updateLeaseAuditListByOne(task);
if (i == 0) {
return AjaxResult.success();
} else {
return AjaxResult.error();
}
}
/** /**
* 导出领料出库列表 * 导出领料出库列表
* *

View File

@ -177,4 +177,5 @@ public class LeaseApplyDetails implements Serializable {
private String maStatus; private String maStatus;
@ApiModelProperty(value="预领数量-已领数量的差值") @ApiModelProperty(value="预领数量-已领数量的差值")
private Double nums; private Double nums;
private Long taskId;
} }

View File

@ -259,6 +259,7 @@ public class TmTask implements Serializable {
private String maCode; private String maCode;
private String maId; private String maId;
private String maStatus; private String maStatus;
private Integer status;
private String typeId; private String typeId;
private Double partNum; private Double partNum;
@ApiModelProperty(value = "预计领料时间(重庆)") @ApiModelProperty(value = "预计领料时间(重庆)")

View File

@ -146,4 +146,9 @@ public interface TmTaskMapper {
int getDeptId(String createBy); int getDeptId(String createBy);
List<TmTask> getLeaseOutListByjjbz(TmTask task); List<TmTask> getLeaseOutListByjjbz(TmTask task);
int updateLeaseAuditListByOne(TmTask task);
List<LeaseApplyDetails> getleaseDetailsStatus(TmTask task);
} }

View File

@ -110,4 +110,6 @@ public interface TmTaskService{
* @return * @return
*/ */
String selectTaskNumByMonths(@Param("date") Date nowDate, @Param("taskType") Integer taskType); String selectTaskNumByMonths(@Param("date") Date nowDate, @Param("taskType") Integer taskType);
int updateLeaseAuditListByOne(TmTask task);
} }

View File

@ -563,7 +563,7 @@ public class TmTaskServiceImpl implements TmTaskService {
if (roles.contains("jjbz") || roles.contains("fbz")) { if (roles.contains("jjbz") || roles.contains("fbz")) {
//机具班长和副班长可以出库机具设备 //机具班长和副班长可以出库机具设备
return tmTaskMapper.getLeaseOutListByjjbz(task); return tmTaskMapper.getLeaseOutListByjjbz(task);
}else { } else {
return tmTaskMapper.getLeaseOutListByUser(task); return tmTaskMapper.getLeaseOutListByUser(task);
} }
} }
@ -573,6 +573,30 @@ public class TmTaskServiceImpl implements TmTaskService {
return tmTaskMapper.selectTaskNumByMonths(nowDate, taskType); return tmTaskMapper.selectTaskNumByMonths(nowDate, taskType);
} }
@Override
public int updateLeaseAuditListByOne(TmTask task) {
int i = tmTaskMapper.updateLeaseAuditListByOne(task);
if (i > 0) {
int num = 0;
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getleaseDetailsStatus(task);
if (CollUtil.isNotEmpty(leaseApplyDetails)) {
for (LeaseApplyDetails details : leaseApplyDetails) {
if ("2".equals(details.getStatus())) {
num++;
}
}
if (num == leaseApplyDetails.size()) {
task.setTaskId(leaseApplyDetails.get(0).getTaskId());
task.setTaskStatus(35);
tmTaskMapper.updateTmTaskAuditStatus(task);
}
}
return 0;
} else {
return 1;
}
}
/** /**
* 获取领料申请列表 * 获取领料申请列表

View File

@ -903,6 +903,13 @@
WHERE WHERE
task_id = #{record.taskId} and company_id is null task_id = #{record.taskId} and company_id is null
</update> </update>
<update id="updateLeaseAuditListByOne">
UPDATE lease_apply_details
SET `status` = 2
WHERE
parennt_id = #{id}
AND type_id = #{typeId}
</update>
<select id="getAgreementIdByUnit" resultType="java.lang.Integer"> <select id="getAgreementIdByUnit" resultType="java.lang.Integer">
select agreement_id from bm_agreement_info select agreement_id from bm_agreement_info
@ -1076,6 +1083,7 @@
mt.manage_type as manageType, mt.manage_type as manageType,
mt.num as num, mt.num as num,
su.user_name as userName, su.user_name as userName,
lad.status as status,
lad.type_id as typeId lad.type_id as typeId
FROM FROM
lease_apply_details lad lease_apply_details lad
@ -1218,4 +1226,15 @@
GROUP BY lai.id GROUP BY lai.id
ORDER BY tt.task_status,tt.create_time desc ORDER BY tt.task_status,tt.create_time desc
</select> </select>
<select id="getleaseDetailsStatus" resultType="com.bonus.sgzb.app.domain.LeaseApplyDetails">
SELECT
lad.`status` status,
tt.task_id taskId
FROM
tm_task tt
LEFT JOIN lease_apply_info lai ON tt.task_id = lai.task_id
LEFT JOIN lease_apply_details lad ON lai.id = lad.parennt_id
WHERE
lai.id = #{id}
</select>
</mapper> </mapper>

View File

@ -65,4 +65,7 @@ public class RepairTestInputDetailVo {
/** 状态*/ /** 状态*/
@Excel(name = "状态") @Excel(name = "状态")
private String status; private String status;
/** 修试管理入库审核人员*/
private String userIds;
} }

View File

@ -124,9 +124,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
rid.update_by AS updateBy, rid.update_by AS updateBy,
rid.update_time AS updateTime, rid.update_time AS updateTime,
rid.remark, rid.remark,
GROUP_CONCAT( mtk.user_id ) AS userIds,
CASE rid.`status` WHEN '0' THEN '进行中' WHEN '1' THEN '已入库' WHEN '2' THEN '驳回' ELSE '进行中' END AS `status` CASE rid.`status` WHEN '0' THEN '进行中' WHEN '1' THEN '已入库' WHEN '2' THEN '驳回' ELSE '进行中' END AS `status`
FROM repair_input_details rid FROM repair_input_details rid
LEFT JOIN ma_machine mm ON rid.ma_id = mm.ma_id LEFT JOIN ma_machine mm ON rid.ma_id = mm.ma_id
LEFT JOIN ma_type_keeper mtk ON rid.type_id = mtk.type_id
LEFT JOIN ( LEFT JOIN (
SELECT mt.type_id AS typeId,mt2.type_id AS typeId2,mt.type_name AS typeName,mt2.type_name AS typeName2,mt.manage_type SELECT mt.type_id AS typeId,mt2.type_id AS typeId2,mt.type_name AS typeName,mt2.type_name AS typeName2,mt.manage_type
FROM ma_type mt FROM ma_type mt
@ -148,6 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeId!=null and typeId!=''"> <if test="typeId!=null and typeId!=''">
AND a.typeId = #{typeId} AND a.typeId = #{typeId}
</if> </if>
GROUP BY rid.type_id
ORDER BY rid.create_time DESC ORDER BY rid.create_time DESC
</select> </select>
<!--查询机具类型-库存数量--> <!--查询机具类型-库存数量-->