结算管理

This commit is contained in:
hongchao 2025-03-25 13:39:23 +08:00
parent 93594c38bc
commit 2513430e71
4 changed files with 22 additions and 19 deletions

View File

@ -80,7 +80,7 @@ public interface SltAgreementInfoMapper {
List<SltAgreementInfo> checkEndTime(SltAgreementApply apply); List<SltAgreementInfo> checkEndTime(SltAgreementApply apply);
List<AgreementInfo> getProjectListByUnitIds(@Param("unitIds") int[] unitIds); List<AgreementInfo> getProjectListByUnitIds(Long unitId);
List<AgreementInfo> getUnitListByProjetctIds(Long projectId); List<AgreementInfo> getUnitListByProjetctIds(@Param("projectIds") Long[] projectIds);
} }

View File

@ -711,6 +711,7 @@ public class BackApplyServiceImpl implements BackApplyService {
* @return * @return
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult submitBackApply(BackApplyInfo bean) { public AjaxResult submitBackApply(BackApplyInfo bean) {
if (bean == null || bean.getBackApplyInfo() == null || CollectionUtils.isEmpty(bean.getBackApplyDetails())) { if (bean == null || bean.getBackApplyInfo() == null || CollectionUtils.isEmpty(bean.getBackApplyDetails())) {
return AjaxResult.error("退料申请数据不能为空"); return AjaxResult.error("退料申请数据不能为空");
@ -798,6 +799,12 @@ public class BackApplyServiceImpl implements BackApplyService {
leaseApplyDetails.setCreateBy(SecurityUtils.getUserId().toString()); leaseApplyDetails.setCreateBy(SecurityUtils.getUserId().toString());
// 根据任务详情往back_check_details插入数据 // 根据任务详情往back_check_details插入数据
// 退料合格数据处理 // 退料合格数据处理
if(leaseApplyDetails.getPassNum()==null){
leaseApplyDetails.setPassNum(0);
}
if(leaseApplyDetails.getMaintenanceNum()==null){
leaseApplyDetails.setMaintenanceNum(0);
}
if ("1".equals(leaseApplyDetails.getManageType()) && leaseApplyDetails.getPassNum() > 0) { if ("1".equals(leaseApplyDetails.getManageType()) && leaseApplyDetails.getPassNum() > 0) {
AjaxResult error = getHgAjaxResult(bean, taskId, leaseApplyDetails); AjaxResult error = getHgAjaxResult(bean, taskId, leaseApplyDetails);
if (error != null) { if (error != null) {

View File

@ -640,8 +640,8 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
public AjaxResult getProjectListByUnitIds(AgreementInfo agreementInfo) { public AjaxResult getProjectListByUnitIds(AgreementInfo agreementInfo) {
List<AgreementInfo> list = new ArrayList<>(); List<AgreementInfo> list = new ArrayList<>();
try { try {
if(agreementInfo.getUnitIds()!=null){ if(agreementInfo.getUnitId()!=null){
list = sltAgreementInfoMapper.getProjectListByUnitIds(agreementInfo.getUnitIds()); list = sltAgreementInfoMapper.getProjectListByUnitIds(agreementInfo.getUnitId());
} }
} catch (Exception e) { } catch (Exception e) {
@ -659,8 +659,8 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
public AjaxResult getUnitListByProjetctIds(AgreementInfo agreementInfo) { public AjaxResult getUnitListByProjetctIds(AgreementInfo agreementInfo) {
List<AgreementInfo> list = new ArrayList<>(); List<AgreementInfo> list = new ArrayList<>();
try { try {
if(agreementInfo.getProjectId()!=null){ if(agreementInfo.getProjectIds()!=null){
list = sltAgreementInfoMapper.getUnitListByProjetctIds(agreementInfo.getProjectId()); list = sltAgreementInfoMapper.getUnitListByProjetctIds(agreementInfo.getProjectIds());
} }
} catch (Exception e) { } catch (Exception e) {

View File

@ -133,11 +133,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id 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 left join slt_agreement_relation sar on bai.agreement_id = sar.agreement_id
where bai.status = '1' where bai.status = '1'
<if test="unitIds != null and unitIds.length > 0"> <if test="unitId != null">
and bui.unit_id in and bui.unit_id = #{unitId}
<foreach item="unitId" collection="unitIds" open="(" separator="," close=")">
#{unitId}
</foreach>
</if> </if>
<if test="projectIds != null"> <if test="projectIds != null">
AND bp.lot_id IN AND bp.lot_id IN
@ -632,13 +629,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join bm_unit_info bui on bui.unit_id = bai.unit_id 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 left join bm_project_lot bpl ON bpl.lot_id = bai.project_id
where bai.status = '1' where bai.status = '1'
<if test="unitIds != null and unitIds.length > 0"> <if test="unitId != null ">
and bui.unit_id in and bui.unit_id = #{unitId}
<foreach item="unitId" collection="unitIds" open="(" separator="," close=")">
#{unitId}
</foreach>
</if> </if>
ORDER BY bai.agreement_id desc ORDER BY bai.agreement_id desc
</select> </select>
@ -649,8 +642,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join bm_unit_info bui on bui.unit_id = bai.unit_id 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 left join bm_project_lot bpl ON bpl.lot_id = bai.project_id
where bai.status = '1' where bai.status = '1'
<if test="projectId != null"> <if test="projectIds != null and projectIds.length > 0">
and bai.project_id = #{projectId} and bai.project_id in
<foreach item="projectId" collection="projectIds" open="(" separator="," close=")">
#{projectId}
</foreach>
</if> </if>
GROUP BY bai.unit_id GROUP BY bai.unit_id
ORDER BY bai.agreement_id desc ORDER BY bai.agreement_id desc