结算管理
This commit is contained in:
parent
34a13018d8
commit
8d273bad74
|
|
@ -41,6 +41,19 @@ public class SltAgreementInfoController extends BaseController {
|
|||
@Resource
|
||||
private SltAgreementInfoService sltAgreementInfoService;
|
||||
|
||||
@ApiOperation(value = "工程下拉选")
|
||||
@GetMapping("getProjectListByUnitIds")
|
||||
public AjaxResult getProjectListByUnitIds(AgreementInfo agreementInfo) {
|
||||
return sltAgreementInfoService.getProjectListByUnitIds(agreementInfo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "单位下拉选")
|
||||
@GetMapping("getUnitListByProjetctIds")
|
||||
public AjaxResult getUnitListByProjetctIds(AgreementInfo agreementInfo) {
|
||||
return sltAgreementInfoService.getUnitListByProjetctIds(agreementInfo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据条件获取协议结算列表
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -154,4 +154,6 @@ public class AgreementInfo extends BaseEntity {
|
|||
@ApiModelProperty(value = "导出选中列表")
|
||||
private List<Long> dataCondition;
|
||||
|
||||
@ApiModelProperty(value = "往来单位ids")
|
||||
private int[] unitIds;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,4 +79,8 @@ public interface SltAgreementInfoMapper {
|
|||
List<ApplyRelation> getAddLoseList(AgreementInfo bean);
|
||||
|
||||
List<SltAgreementInfo> checkEndTime(SltAgreementApply apply);
|
||||
|
||||
List<AgreementInfo> getProjectListByUnitIds(@Param("unitIds") int[] unitIds);
|
||||
|
||||
List<AgreementInfo> getUnitListByProjetctIds(Long projectId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,4 +43,8 @@ public interface SltAgreementInfoService {
|
|||
List getSltInfoMonth(List<AgreementInfo> list);
|
||||
|
||||
int updateOutSourceCosts(SltAgreementInfo sltAgreementInfo);
|
||||
|
||||
AjaxResult getProjectListByUnitIds(AgreementInfo bean);
|
||||
|
||||
AjaxResult getUnitListByProjetctIds(AgreementInfo bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import com.bonus.sgzb.material.mapper.CalMonthlyMapper;
|
|||
import com.bonus.sgzb.material.mapper.SltAgreementInfoMapper;
|
||||
import com.bonus.sgzb.material.service.SltAgreementInfoService;
|
||||
import com.bonus.sgzb.material.vo.GlobalContants;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -628,4 +629,42 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
|||
}
|
||||
return codeNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 工程类型下拉
|
||||
* @param agreementInfo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getProjectListByUnitIds(AgreementInfo agreementInfo) {
|
||||
List<AgreementInfo> list = new ArrayList<>();
|
||||
try {
|
||||
if(agreementInfo.getUnitIds()!=null){
|
||||
list = sltAgreementInfoMapper.getProjectListByUnitIds(agreementInfo.getUnitIds());
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error(e+"工程下拉查询失败");
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 单位类型下拉
|
||||
* @param agreementInfo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getUnitListByProjetctIds(AgreementInfo agreementInfo) {
|
||||
List<AgreementInfo> list = new ArrayList<>();
|
||||
try {
|
||||
if(agreementInfo.getProjectId()!=null){
|
||||
list = sltAgreementInfoMapper.getUnitListByProjetctIds(agreementInfo.getProjectId());
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error(e+"单位下拉查询失败");
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,8 +133,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
||||
left join slt_agreement_relation sar on bai.agreement_id = sar.agreement_id
|
||||
where bai.status = '1'
|
||||
<if test="unitId != null and unitId != ''">
|
||||
and bui.unit_id = #{unitId}
|
||||
<if test="unitIds != null and unitIds.length > 0">
|
||||
and bui.unit_id in
|
||||
<foreach item="unitId" collection="unitIds" open="(" separator="," close=")">
|
||||
#{unitId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="projectId != null and projectId != ''">
|
||||
and bp.lot_id = #{projectId}
|
||||
|
|
@ -618,4 +621,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
where sai.agreement_id = #{agreementId} and sai.lease_type = 0
|
||||
</select>
|
||||
|
||||
<select id="getProjectListByUnitIds" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
|
||||
select
|
||||
bai.project_id as projectId,bpl.lot_name as projectName
|
||||
from bm_agreement_info bai
|
||||
left join bm_unit_info bui on bui.unit_id = bai.unit_id
|
||||
left join bm_project_lot bpl ON bpl.lot_id = bai.project_id
|
||||
where bai.status = '1'
|
||||
<if test="unitIds != null and unitIds.length > 0">
|
||||
and bui.unit_id in
|
||||
<foreach item="unitId" collection="unitIds" open="(" separator="," close=")">
|
||||
#{unitId}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
ORDER BY bai.agreement_id desc
|
||||
</select>
|
||||
|
||||
<select id="getUnitListByProjetctIds" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
|
||||
select
|
||||
bai.unit_id as unitId,bui.unit_name as unitName
|
||||
from bm_agreement_info bai
|
||||
left join bm_unit_info bui on bui.unit_id = bai.unit_id
|
||||
left join bm_project_lot bpl ON bpl.lot_id = bai.project_id
|
||||
where bai.status = '1'
|
||||
<if test="projectId != null">
|
||||
and bai.project_id = #{projectId}
|
||||
</if>
|
||||
GROUP BY bai.unit_id
|
||||
ORDER BY bai.agreement_id desc
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue