代码提交
This commit is contained in:
parent
1d0db28b58
commit
75a8f2a835
|
|
@ -35,6 +35,7 @@ public class TransferApplyDto {
|
||||||
* 接收组织ID
|
* 接收组织ID
|
||||||
*/
|
*/
|
||||||
private String deptId;
|
private String deptId;
|
||||||
|
private List<String> deptIds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接收组织名称
|
* 接收组织名称
|
||||||
|
|
|
||||||
|
|
@ -64,4 +64,6 @@ public interface TransferApplyMapper {
|
||||||
void setTransferTime(TransferFileDto dto);
|
void setTransferTime(TransferFileDto dto);
|
||||||
|
|
||||||
String getTransferApplyTransferTime(TransferFileDto dto);
|
String getTransferApplyTransferTime(TransferFileDto dto);
|
||||||
|
|
||||||
|
Integer getAllTransferStatus(TransferFileDto dto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,10 @@ public class TransferApplyServiceImpl implements TransferApplyService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TransferApplyDto> list(TransferApplyDto dto) {
|
public List<TransferApplyDto> list(TransferApplyDto dto) {
|
||||||
if (dto.getDeptId() != null){
|
if (dto.getDeptId() != null) {
|
||||||
// 查询该部门下所有子部门
|
// 查询该部门下所有子部门
|
||||||
List<String> deptIds = transferApplyMapper.getDeptList(dto);
|
List<String> deptIds = transferApplyMapper.getDeptList(dto);
|
||||||
|
dto.setDeptIds(deptIds);
|
||||||
}
|
}
|
||||||
return transferApplyMapper.list(dto);
|
return transferApplyMapper.list(dto);
|
||||||
}
|
}
|
||||||
|
|
@ -164,9 +165,6 @@ public class TransferApplyServiceImpl implements TransferApplyService {
|
||||||
Integer i = transferApplyMapper.transferReceive(dto);
|
Integer i = transferApplyMapper.transferReceive(dto);
|
||||||
// 查询该申请下,是否所有文件都已接收
|
// 查询该申请下,是否所有文件都已接收
|
||||||
Integer num = transferApplyMapper.isAllReceive(dto);
|
Integer num = transferApplyMapper.isAllReceive(dto);
|
||||||
if (num == 1) {
|
|
||||||
transferApplyMapper.updateTransferStatus(dto);
|
|
||||||
}
|
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
return AjaxResult.success("接收成功");
|
return AjaxResult.success("接收成功");
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -181,9 +179,13 @@ public class TransferApplyServiceImpl implements TransferApplyService {
|
||||||
public AjaxResult updateTransferRecordFilesStatus(TransferFileDto dto) {
|
public AjaxResult updateTransferRecordFilesStatus(TransferFileDto dto) {
|
||||||
Integer i = transferApplyMapper.updateTransferRecordFilesStatus(dto);
|
Integer i = transferApplyMapper.updateTransferRecordFilesStatus(dto);
|
||||||
String transferApplyTransferTime = transferApplyMapper.getTransferApplyTransferTime(dto);
|
String transferApplyTransferTime = transferApplyMapper.getTransferApplyTransferTime(dto);
|
||||||
if (StringUtils.isBlank(transferApplyTransferTime)){
|
if (StringUtils.isBlank(transferApplyTransferTime)) {
|
||||||
transferApplyMapper.setTransferTime(dto);
|
transferApplyMapper.setTransferTime(dto);
|
||||||
}
|
}
|
||||||
|
Integer num = transferApplyMapper.getAllTransferStatus(dto);
|
||||||
|
if (num == 1) {
|
||||||
|
transferApplyMapper.updateTransferStatus(dto);
|
||||||
|
}
|
||||||
return i > 0 ? AjaxResult.success("移交成功") : AjaxResult.error("移交失败");
|
return i > 0 ? AjaxResult.success("移交成功") : AjaxResult.error("移交失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -340,8 +340,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="transfertTime != null and transfertTime != ''">
|
<if test="transfertTime != null and transfertTime != ''">
|
||||||
and DATE(dkta.transfer_time) = #{transfertTime}
|
and DATE(dkta.transfer_time) = #{transfertTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="deptId != null and deptId != ''">
|
<if test="deptIds != null">
|
||||||
and dkta.dept_id = #{deptId}
|
AND dkta.dept_id IN
|
||||||
|
<foreach collection="deptIds" item="deptId" open="(" separator="," close=")">
|
||||||
|
#{deptId}
|
||||||
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="proType != null and proType != ''">
|
<if test="proType != null and proType != ''">
|
||||||
and dkp.pro_type = #{proType}
|
and dkp.pro_type = #{proType}
|
||||||
|
|
@ -577,7 +580,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
transfer_apply_id = #{transferApplyId}
|
transfer_apply_id = #{transferApplyId}
|
||||||
</select>
|
</select>
|
||||||
<select id="getDeptList" resultType="java.lang.String">
|
<select id="getDeptList" resultType="java.lang.String">
|
||||||
|
SELECT
|
||||||
|
dept_id
|
||||||
|
FROM
|
||||||
|
da_ky_sys_dept
|
||||||
|
WHERE
|
||||||
|
del_flag = '0'
|
||||||
|
AND (
|
||||||
|
dept_id = #{deptId}
|
||||||
|
OR FIND_IN_SET( #{deptId}, ancestors )
|
||||||
|
)
|
||||||
</select>
|
</select>
|
||||||
<select id="getTransferApplyTransferTime" resultType="java.lang.String">
|
<select id="getTransferApplyTransferTime" resultType="java.lang.String">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -587,5 +599,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE
|
WHERE
|
||||||
id = #{transferApplyId}
|
id = #{transferApplyId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getAllTransferStatus" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
CASE
|
||||||
|
WHEN
|
||||||
|
COUNT(*) = SUM( CASE WHEN transfer_status = '1' THEN 1 ELSE 0 END ) THEN
|
||||||
|
1 ELSE 0
|
||||||
|
END AS all_received
|
||||||
|
FROM
|
||||||
|
da_ky_transfer_file
|
||||||
|
WHERE
|
||||||
|
transfer_apply_id = #{transferApplyId}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue