材料站协议查询修改
This commit is contained in:
parent
5064809f9e
commit
91efabadc6
|
|
@ -7,6 +7,7 @@ import com.bonus.material.basic.domain.BmProject;
|
|||
import com.bonus.material.clz.domain.vo.MaterialSltAgreementInfo;
|
||||
import com.bonus.material.clz.domain.vo.sltAgreementInfo.MaterialSltInfoVo;
|
||||
import com.bonus.material.clz.service.ClzSltAgreementInfoService;
|
||||
import com.bonus.material.common.domain.dto.SelectDto;
|
||||
import com.bonus.material.settlement.domain.SltAgreementReduce;
|
||||
import com.bonus.material.settlement.domain.SltAgreementRelation;
|
||||
import com.bonus.material.task.domain.TmTask;
|
||||
|
|
@ -51,12 +52,18 @@ public class ClzSltAgreementInfoController extends BaseController {
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "工程下拉选根据材料站单位查询")
|
||||
@ApiOperation(value = "工程下拉选根据材料站班组查询")
|
||||
@PostMapping("getProjectListByUnitIds")
|
||||
public AjaxResult getProjectListByUnitIds(@RequestBody BmProject bmProject) {
|
||||
return clzSltAgreementInfoService.getProjectListByUnitIds(bmProject);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "往来单位id和标段工程id获取协议信息")
|
||||
@PostMapping("getAgreementInfoById")
|
||||
public AjaxResult getAgreementInfoById(@RequestBody SelectDto dto){
|
||||
return clzSltAgreementInfoService.getAgreementInfoById(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据协议获取结算清单")
|
||||
@PostMapping("/getSltInfo")
|
||||
public AjaxResult getSltInfo(@RequestBody List<MaterialSltAgreementInfo> list) {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.material.clz.mapper;
|
|||
import com.bonus.common.biz.domain.ProjectTreeNode;
|
||||
import com.bonus.material.clz.domain.vo.MaterialSltAgreementInfo;
|
||||
import com.bonus.material.clz.domain.vo.sltAgreementInfo.MaterialSltInfoVo;
|
||||
import com.bonus.material.common.domain.vo.AgreementVo;
|
||||
import com.bonus.material.settlement.domain.SltAgreementReduce;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
@ -25,6 +26,8 @@ public interface ClzSltAgreementInfoMapper {
|
|||
|
||||
List<ProjectTreeNode> getProjectList(int projectId);
|
||||
|
||||
List<AgreementVo> getAgreementInfoById(@Param("unitIds") List<Integer> unitIds, @Param("projectId") int projectId);
|
||||
|
||||
|
||||
/**
|
||||
* 获取租赁列表
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.bonus.common.core.web.domain.AjaxResult;
|
|||
import com.bonus.material.basic.domain.BmProject;
|
||||
import com.bonus.material.clz.domain.vo.MaterialSltAgreementInfo;
|
||||
import com.bonus.material.clz.domain.vo.sltAgreementInfo.MaterialSltInfoVo;
|
||||
import com.bonus.material.common.domain.dto.SelectDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -35,6 +36,9 @@ public interface ClzSltAgreementInfoService {
|
|||
*/
|
||||
AjaxResult getProjectListByUnitIds(BmProject bmProject);
|
||||
|
||||
AjaxResult getAgreementInfoById(SelectDto dto);
|
||||
|
||||
|
||||
/**
|
||||
* 提交结算清单
|
||||
* @param sltInfoVo
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ import com.bonus.material.clz.domain.vo.MaterialSltAgreementInfo;
|
|||
import com.bonus.material.clz.domain.vo.sltAgreementInfo.MaterialSltInfoVo;
|
||||
import com.bonus.material.clz.mapper.ClzSltAgreementInfoMapper;
|
||||
import com.bonus.material.clz.service.ClzSltAgreementInfoService;
|
||||
import com.bonus.material.common.domain.dto.SelectDto;
|
||||
import com.bonus.material.common.domain.vo.AgreementVo;
|
||||
import com.bonus.material.settlement.domain.SltAgreementReduce;
|
||||
import com.bonus.material.settlement.domain.SltAgreementRelation;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
|
@ -165,6 +167,22 @@ public class ClzSltAgreementInfoServiceImpl implements ClzSltAgreementInfoServic
|
|||
return AjaxResult.success(groupList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getAgreementInfoById(SelectDto dto) {
|
||||
List<AgreementVo> vo = new ArrayList<>();
|
||||
try {
|
||||
List<AgreementVo> list = clzSltAgreementInfoMapper.getAgreementInfoById(dto.getUnitIds(), Integer.parseInt(dto.getProjectId()));
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
vo = list;
|
||||
} else {
|
||||
return AjaxResult.error("未找到匹配的协议信息");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error(e+"协议查询失败");
|
||||
}
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交结算清单
|
||||
* @param sltInfoVo
|
||||
|
|
|
|||
|
|
@ -234,4 +234,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ORDER BY
|
||||
level
|
||||
</select>
|
||||
|
||||
<select id="getAgreementInfoById" resultType="com.bonus.material.common.domain.vo.AgreementVo">
|
||||
SELECT
|
||||
agreement_id AS agreementId,
|
||||
agreement_code AS agreementCode,
|
||||
is_slt AS isSlt
|
||||
FROM
|
||||
clz_bm_agreement_info
|
||||
WHERE
|
||||
unit_id IN
|
||||
<foreach item="item" index="index" collection="unitIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND project_id = #{projectId} AND status = '1'
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue