减免接口开发
This commit is contained in:
parent
fc34e7371c
commit
604aadd425
|
|
@ -77,6 +77,18 @@ public class LeaseApplyInfoController extends BaseController {
|
||||||
List<LeaseApplyInfo> list = leaseApplyInfoService.getCompleteOutTaskList(leaseApplyInfo);
|
List<LeaseApplyInfo> list = leaseApplyInfoService.getCompleteOutTaskList(leaseApplyInfo);
|
||||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 材料员查询页面
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "材料员查询页面")
|
||||||
|
//@RequiresPermissions("lease:info:list")
|
||||||
|
@GetMapping("/getConfirmTaskList")
|
||||||
|
public AjaxResult getConfirmTaskList(LeaseApplyInfo leaseApplyInfo) {
|
||||||
|
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||||
|
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||||
|
List<LeaseApplyInfo> list = leaseApplyInfoService.getConfirmTaskList(leaseApplyInfo);
|
||||||
|
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "材料员确认接口")
|
@ApiOperation(value = "材料员确认接口")
|
||||||
@PostMapping("/confirmMaterial")
|
@PostMapping("/confirmMaterial")
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import com.bonus.material.lease.domain.LeasePublishDetails;
|
||||||
import com.bonus.material.lease.domain.vo.LeaseDeptInfo;
|
import com.bonus.material.lease.domain.vo.LeaseDeptInfo;
|
||||||
import com.bonus.material.ma.domain.Type;
|
import com.bonus.material.ma.domain.Type;
|
||||||
import com.bonus.material.ma.domain.vo.MaTypeVoLevelTwo;
|
import com.bonus.material.ma.domain.vo.MaTypeVoLevelTwo;
|
||||||
|
import com.bonus.material.task.domain.TmTaskAgreement;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -194,4 +195,6 @@ public interface LeaseTaskMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
LeasePublishDetails selectPublishDetailsByCode();
|
LeasePublishDetails selectPublishDetailsByCode();
|
||||||
|
|
||||||
|
TmTaskAgreement getAgreementInfo(LeaseApplyInfo leaseApplyInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -176,4 +176,6 @@ public interface ILeaseApplyInfoService {
|
||||||
List<LeaseApplyDetails> selectLeaseApplyInfoByIdTwo(LeaseApplyInfo bean);
|
List<LeaseApplyDetails> selectLeaseApplyInfoByIdTwo(LeaseApplyInfo bean);
|
||||||
|
|
||||||
LeaseApplyRequestVo getLeaseRequestVo(LeaseApplyDetails bean);
|
LeaseApplyRequestVo getLeaseRequestVo(LeaseApplyDetails bean);
|
||||||
|
|
||||||
|
List<LeaseApplyInfo> getConfirmTaskList(LeaseApplyInfo leaseApplyInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -550,6 +550,79 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
return sortedList;
|
return sortedList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询材料员确认
|
||||||
|
*
|
||||||
|
* @param leaseApplyInfo 领料任务
|
||||||
|
* @return 领料任务集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<LeaseApplyInfo> getConfirmTaskList(LeaseApplyInfo leaseApplyInfo) {
|
||||||
|
leaseApplyInfo.setUserId(SecurityUtils.getLoginUser().getUserid());
|
||||||
|
|
||||||
|
List<LeaseApplyInfo> list = leaseApplyInfoMapper.selectCompleteOutList(leaseApplyInfo);
|
||||||
|
|
||||||
|
|
||||||
|
if (leaseApplyInfo.getIsConfirm()!=null) {
|
||||||
|
if (leaseApplyInfo.getIsConfirm() == 2) {
|
||||||
|
// 已确认
|
||||||
|
list = list.stream()
|
||||||
|
.filter(item -> item.getIsConfirm() == 2)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
} else {
|
||||||
|
// 未确认
|
||||||
|
list = list.stream()
|
||||||
|
.filter(item -> item.getIsConfirm() == 1)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// 使用 Stream API 进行降序排序
|
||||||
|
List<LeaseApplyInfo> sortedList = list.stream()
|
||||||
|
.sorted(Comparator.comparing(LeaseApplyInfo::getCreateTime,
|
||||||
|
Comparator.nullsFirst(Comparator.naturalOrder())).reversed())
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (!CollectionUtils.isEmpty(sortedList)) {
|
||||||
|
String keyWord = leaseApplyInfo.getKeyWord();
|
||||||
|
// 如果关键字不为空,进行过滤
|
||||||
|
if (!StringUtils.isBlank(keyWord)) {
|
||||||
|
sortedList = sortedList.stream()
|
||||||
|
.filter(item -> containsKeyword(item, keyWord))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
// // 判断状态
|
||||||
|
// if (!CollectionUtils.isEmpty(leaseApplyInfo.getStatusList())) {
|
||||||
|
// // 将集合sortedList中状态taskStatus包含在leaseApplyInfo.getStatusList()中的元素
|
||||||
|
// sortedList = sortedList.stream()
|
||||||
|
// .filter(item -> leaseApplyInfo.getStatusList().contains(item.getTaskStatus()))
|
||||||
|
// .collect(Collectors.toList());
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
sortedList.removeIf(Objects::isNull);
|
||||||
|
if (leaseApplyInfo.getIsConfirm() != null) {
|
||||||
|
if (leaseApplyInfo.getIsConfirm() == 1) {
|
||||||
|
for (LeaseApplyInfo item : sortedList) {
|
||||||
|
if(item.getPreCountNum().compareTo(item.getAlNum()) != 0){
|
||||||
|
item.setIsConfirm(1);
|
||||||
|
}else{
|
||||||
|
//查找签名的数量之和是否为
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// sortedList.removeIf(item -> item.getIsConfirm() != null && item.getIsConfirm() == 2);
|
||||||
|
} else if (leaseApplyInfo.getIsConfirm() == 2) {
|
||||||
|
sortedList.removeIf(item -> item.getIsConfirm() == null || item.getIsConfirm() != 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 再次移除可能的null值
|
||||||
|
sortedList.removeIf(Objects::isNull);
|
||||||
|
// 只有出库完成的任务才需要进行确认,这里过滤掉任务状态不等于4(出库已完成)的
|
||||||
|
// sortedList.removeIf(item -> item.getTaskStatus() != 4);
|
||||||
|
|
||||||
|
return sortedList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关键字搜索
|
* 关键字搜索
|
||||||
* @param item
|
* @param item
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ import com.bonus.material.lease.service.ILeaseTaskService;
|
||||||
import com.bonus.material.ma.domain.Type;
|
import com.bonus.material.ma.domain.Type;
|
||||||
import com.bonus.material.ma.domain.vo.MaTypeVoLevelTwo;
|
import com.bonus.material.ma.domain.vo.MaTypeVoLevelTwo;
|
||||||
import com.bonus.material.task.domain.TmTask;
|
import com.bonus.material.task.domain.TmTask;
|
||||||
|
import com.bonus.material.task.domain.TmTaskAgreement;
|
||||||
import com.bonus.material.task.mapper.TmTaskAgreementMapper;
|
import com.bonus.material.task.mapper.TmTaskAgreementMapper;
|
||||||
import com.bonus.material.task.mapper.TmTaskMapper;
|
import com.bonus.material.task.mapper.TmTaskMapper;
|
||||||
import com.bonus.material.work.domain.SysWorkflowConfig;
|
import com.bonus.material.work.domain.SysWorkflowConfig;
|
||||||
|
|
@ -904,6 +905,13 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String code = genderTaskCode(monthMaxOrder);
|
String code = genderTaskCode(monthMaxOrder);
|
||||||
|
|
||||||
|
// TmTaskAgreement taskAgreement = mapper.getAgreementInfo(leaseApplyInfo);
|
||||||
|
//
|
||||||
|
// taskAgreement.setTaskId(parentId);
|
||||||
|
//
|
||||||
|
// tmTaskAgreementMapper.insertTmTaskAgreement(taskAgreement);
|
||||||
|
|
||||||
for (LeaseApplyDetails applyDetails : leaseApplyDetailsList) {
|
for (LeaseApplyDetails applyDetails : leaseApplyDetailsList) {
|
||||||
// 根据parentId及typeId更新lease_apply_details表的发布数量
|
// 根据parentId及typeId更新lease_apply_details表的发布数量
|
||||||
result = mapper.updatePublish(applyDetails);
|
result = mapper.updatePublish(applyDetails);
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectLeaseApplyInfoList" parameterType="com.bonus.common.biz.domain.lease.LeaseApplyInfo" resultMap="LeaseApplyInfoResult">
|
<select id="selectLeaseApplyInfoList" parameterType="com.bonus.common.biz.domain.lease.LeaseApplyInfo" resultMap="LeaseApplyInfoResult">
|
||||||
<include refid="selectLeaseApplyInfoVo"/>
|
<include refid="selectLeaseApplyInfoVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="code != null and code != ''"> and lai.code = #{code}</if>
|
<if test="code != null and code != ''"> and lai.code = #{code}</if>
|
||||||
<if test="taskId != null "> and lai.task_id = #{taskId}</if>
|
<if test="taskId != null "> and lai.task_id = #{taskId}</if>
|
||||||
<if test="leasePerson != null and leasePerson != ''"> and lai.lease_person = #{leasePerson}</if>
|
<if test="leasePerson != null and leasePerson != ''"> and lai.lease_person = #{leasePerson}</if>
|
||||||
|
|
@ -155,12 +155,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
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="selectLeaseApplyInfoById" parameterType="Long" resultMap="LeaseApplyInfoResult">
|
<select id="selectLeaseApplyInfoById" parameterType="Long" resultMap="LeaseApplyInfoResult">
|
||||||
<include refid="selectLeaseApplyInfoVo"/>
|
<include refid="selectLeaseApplyInfoVo"/>
|
||||||
where lai.id = #{id}
|
where lai.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertLeaseApplyInfo" parameterType="com.bonus.common.biz.domain.lease.LeaseApplyInfo" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertLeaseApplyInfo" parameterType="com.bonus.common.biz.domain.lease.LeaseApplyInfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into lease_apply_info
|
insert into lease_apply_info
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
|
@ -259,7 +259,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="directId != null">direct_id = #{directId},</if>
|
<if test="directId != null">direct_id = #{directId},</if>
|
||||||
<if test="leaseType != null">lease_type = #{leaseType},</if>
|
<if test="leaseType != null">lease_type = #{leaseType},</if>
|
||||||
<if test="estimateLeaseTime != null">estimate_lease_time = #{estimateLeaseTime},</if>
|
<if test="estimateLeaseTime != null">estimate_lease_time = #{estimateLeaseTime},</if>
|
||||||
<if test="releaseTime != null">release_time = #{releaseTime},</if>
|
release_time = now(),
|
||||||
<if test="costBearingParty != null">cost_bearing_party = #{costBearingParty},</if>
|
<if test="costBearingParty != null">cost_bearing_party = #{costBearingParty},</if>
|
||||||
<if test="updateBy != null and updateBy != ''">publisher = #{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">publisher = #{updateBy},</if>
|
||||||
</trim>
|
</trim>
|
||||||
|
|
@ -271,7 +271,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteLeaseApplyInfoByIds" parameterType="String">
|
<delete id="deleteLeaseApplyInfoByIds" parameterType="String">
|
||||||
delete from lease_apply_info where id in
|
delete from lease_apply_info where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
@ -668,4 +668,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
is_confirm = 2
|
is_confirm = 2
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -1043,4 +1043,13 @@
|
||||||
and type_id = #{typeId}
|
and type_id = #{typeId}
|
||||||
and publish_task = #{publishTask}
|
and publish_task = #{publishTask}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="getAgreementInfo" resultType="com.bonus.material.task.domain.TmTaskAgreement">
|
||||||
|
select
|
||||||
|
agreement_id as agreementId
|
||||||
|
from
|
||||||
|
bm_agreement_info
|
||||||
|
where unit_id = #{unitId} and project_id = #{projectId}
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue