Compare commits

..

No commits in common. "633b0a261536a99ed74c7a9ff879d426c7d44ee9" and "d80325a8a104e53e5bb3a23c5e78509684289681" have entirely different histories.

7 changed files with 1 additions and 75 deletions

View File

@ -1,10 +1,8 @@
package com.bonus.sgzb.material.mapper;
import com.bonus.sgzb.base.domain.BmProjectLot;
import com.bonus.sgzb.material.domain.AgreementInfo;
import org.apache.ibatis.annotations.Mapper;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@ -85,12 +83,4 @@ public interface AgreementInfoMapper {
int selectByagreementId(Long agreementId);
List<AgreementInfo> getAllAgreementId();
BigDecimal getCostByLotId(BmProjectLot agreementInfo);
List<BmProjectLot> getAllprojectId();
BigDecimal getCostIndicatorsByLotId(BmProjectLot bmProjectLot);
List<AgreementInfo> getprojectIdByLotId(BmProjectLot bmProjectLot);
}

View File

@ -1,7 +1,6 @@
package com.bonus.sgzb.material.remind.service;
import com.bonus.sgzb.base.api.domain.SltAgreementInfo;
import com.bonus.sgzb.base.domain.BmProjectLot;
import com.bonus.sgzb.common.core.utils.DateTimeHelper;
import com.bonus.sgzb.material.domain.AgreementInfo;
import com.bonus.sgzb.material.domain.CalMonthlyBean;
@ -51,17 +50,6 @@ public class CalcMonthlyServiceImp implements CalcMonthlyService {
record.setMonth(month);
cleanSameMonthOldRecords(record);
List<AgreementInfo> list = agreementInfoService.getAllAgreementId();
List<BmProjectLot> projectLots = agreementInfoService.getAllprojectId();
// 如果该工程费用指标已超过则不需要记录月结记录
for (BmProjectLot bmProjectLot : projectLots) {
BigDecimal costIndicatorsByLotId = agreementInfoService.getCostIndicatorsByLotId(bmProjectLot);
BigDecimal costByLotId = agreementInfoService.getCostByLotId(bmProjectLot);
if (costByLotId.compareTo(costIndicatorsByLotId) > 0) {
// 通过lotId找agreementId
List<AgreementInfo> agreementIds = agreementInfoService.getprojectIdByLotId(bmProjectLot);
agreementIds.forEach(t -> list.remove(t));
}
}
list.forEach(t -> {
t.setStartTime(startTime);
t.setEndTime(endTime);
@ -162,7 +150,7 @@ public class CalcMonthlyServiceImp implements CalcMonthlyService {
ProjectMonthDetail projectMonthDetail = new ProjectMonthDetail();
projectMonthDetail.setTypeId(Integer.valueOf(bean.getTypeId()));
if (bean.getMaId() != null) {
if (bean.getMaId() != null){
projectMonthDetail.setMaId(Integer.valueOf(bean.getMaId()));
}
projectMonthDetail.setUnit(bean.getNuitName());

View File

@ -1,10 +1,8 @@
package com.bonus.sgzb.material.service;
import com.bonus.sgzb.base.domain.BmProjectLot;
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.material.domain.AgreementInfo;
import java.math.BigDecimal;
import java.util.List;
/**
@ -68,12 +66,4 @@ public interface AgreementInfoService {
List<AgreementInfo> exportList(AgreementInfo agreementInfo);
List<AgreementInfo> getAllAgreementId();
BigDecimal getCostByLotId(BmProjectLot agreementInfo);
List<BmProjectLot> getAllprojectId();
BigDecimal getCostIndicatorsByLotId(BmProjectLot bmProjectLot);
List<AgreementInfo> getprojectIdByLotId(BmProjectLot bmProjectLot);
}

View File

@ -1,6 +1,5 @@
package com.bonus.sgzb.material.service.impl;
import com.bonus.sgzb.base.domain.BmProjectLot;
import com.bonus.sgzb.common.core.utils.DateUtils;
import com.bonus.sgzb.common.core.utils.StringUtils;
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
@ -10,8 +9,6 @@ import com.bonus.sgzb.material.service.AgreementInfoService;
import com.bonus.sgzb.material.vo.GlobalContants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@ -104,26 +101,6 @@ public class AgreementInfoServiceImpl implements AgreementInfoService {
return agreementInfoMapper.getAllAgreementId();
}
@Override
public BigDecimal getCostByLotId(BmProjectLot bmProjectLot) {
return agreementInfoMapper.getCostByLotId(bmProjectLot);
}
@Override
public List<BmProjectLot> getAllprojectId() {
return agreementInfoMapper.getAllprojectId();
}
@Override
public BigDecimal getCostIndicatorsByLotId(BmProjectLot bmProjectLot) {
return agreementInfoMapper.getCostIndicatorsByLotId(bmProjectLot);
}
@Override
public List<AgreementInfo> getprojectIdByLotId(BmProjectLot bmProjectLot) {
return agreementInfoMapper.getprojectIdByLotId(bmProjectLot);
}
private String purchaseCodeRule() {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");

View File

@ -117,7 +117,6 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
int i = purchaseMacodeInfoMapper.selectMaCode(purchaseMacodeInfo.getMaCode());
if (i > 0) {
purchaseMacodeInfo.setStatusFlag(1);
purchaseMacodeInfo.setMaCode(null);
b = false;
} else {
purchaseMacodeInfo.setStatusFlag(0);

View File

@ -172,22 +172,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
status = '1'
</select>
<select id="getCostByLotId" resultType="java.math.BigDecimal">
select ifnull(sum(costs),0) from project_month_costs where project_id = #{lotId}
</select>
<select id="getAllprojectId" resultType="com.bonus.sgzb.base.domain.BmProjectLot">
SELECT
lot_id as lotId
FROM
bm_project_lot
WHERE
del_flag = '0'
</select>
<select id="getCostIndicatorsByLotId" resultType="java.math.BigDecimal">
SELECT IFNULL(cost_indicators,0) FROM bm_project_lot where lot_id = #{lotId}
</select>
<select id="getprojectIdByLotId" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
select agreement_id from bm_agreement_info where project_id = #{lotId}
</select>
</mapper>

View File

@ -532,7 +532,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt.type_name specificationType,
mt1.type_name typeName,
pmi.ma_code maCode,
pmi.fix_code fixCode,
mm.assets_code assetsCode
FROM
purchase_check_details pcd