bug修复
This commit is contained in:
parent
e977fc087c
commit
229cf0eaff
|
|
@ -5,6 +5,7 @@ import com.bonus.sgzb.common.core.annotation.Excel;
|
|||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -17,25 +18,13 @@ public class BmProjectInfo {
|
|||
@Excel(name = "工程项目名称")
|
||||
@ApiModelProperty(value = "工程项目名称")
|
||||
private String proName;
|
||||
/**帐号状态(0正常 1停用)*/
|
||||
@Excel(name = "帐号状态",readConverterExp = "0=正常,1=停用")
|
||||
@ApiModelProperty(value = "帐号状态(0正常 1停用)")
|
||||
private String status;
|
||||
|
||||
/**工程类型*/
|
||||
|
||||
@ApiModelProperty(value = "工程类型")
|
||||
private long typeId;
|
||||
/**联系人*/
|
||||
@Excel(name = "联系人")
|
||||
@ApiModelProperty(value = "联系人")
|
||||
private String linkMan;
|
||||
/**联系方式*/
|
||||
@Excel(name = "联系方式")
|
||||
@ApiModelProperty(value = "联系方式")
|
||||
private String telphone;
|
||||
/**所属上级*/
|
||||
|
||||
/**所属上级*/
|
||||
@ApiModelProperty(value = "所属上级")
|
||||
private long deptId;
|
||||
/**删除标志(0代表存在 2代表删除)*/
|
||||
|
|
@ -70,6 +59,26 @@ public class BmProjectInfo {
|
|||
@ApiModelProperty(value = "工程类型名称")
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 费用指标
|
||||
*/
|
||||
@Excel(name = "费用指标")
|
||||
@ApiModelProperty(value = "费用指标")
|
||||
private BigDecimal costIndicators;
|
||||
|
||||
@Excel(name = "联系人")
|
||||
@ApiModelProperty(value = "联系人")
|
||||
private String linkMan;
|
||||
/**联系方式*/
|
||||
@Excel(name = "联系方式")
|
||||
@ApiModelProperty(value = "联系方式")
|
||||
private String telphone;
|
||||
|
||||
/**帐号状态(0正常 1停用)*/
|
||||
@Excel(name = "帐号状态",readConverterExp = "0=正常,1=停用")
|
||||
@ApiModelProperty(value = "帐号状态(0正常 1停用)")
|
||||
private String status;
|
||||
|
||||
/** 导出选中列表 */
|
||||
private List<Long> dataCondition;
|
||||
|
||||
|
|
|
|||
|
|
@ -132,11 +132,11 @@ public class BmProjectLot {
|
|||
@Excel(name = "工程类型")
|
||||
@ApiModelProperty(value = "工程类型名称")
|
||||
private String typeName;
|
||||
/**
|
||||
* 费用指标
|
||||
*/
|
||||
@ApiModelProperty(value = "费用指标")
|
||||
private BigDecimal costIndicators;
|
||||
// /**
|
||||
// * 费用指标
|
||||
// */
|
||||
// @ApiModelProperty(value = "费用指标")
|
||||
// private BigDecimal costIndicators;
|
||||
|
||||
/**
|
||||
* 开工日期
|
||||
|
|
|
|||
|
|
@ -20,12 +20,14 @@ import com.bonus.sgzb.common.log.enums.BusinessType;
|
|||
import com.bonus.sgzb.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.sgzb.material.config.PoiOutPage;
|
||||
import com.bonus.sgzb.material.domain.*;
|
||||
import com.bonus.sgzb.material.remind.service.CalcMonthlyService;
|
||||
import com.bonus.sgzb.material.service.SltAgreementInfoService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -54,6 +56,12 @@ public class SltAgreementInfoController extends BaseController {
|
|||
@Resource
|
||||
private SltAgreementInfoService sltAgreementInfoService;
|
||||
|
||||
// @Autowired
|
||||
// private CalcMonthlyService calcMonthlyService;
|
||||
//
|
||||
// @Value("${sgzb.job.settlementJobDay}")
|
||||
// private String settlementJobDay;
|
||||
|
||||
@ApiOperation(value = "工程下拉选")
|
||||
@GetMapping("getProjectListByUnitIds")
|
||||
public AjaxResult getProjectListByUnitIds(AgreementInfo agreementInfo) {
|
||||
|
|
@ -197,8 +205,8 @@ public class SltAgreementInfoController extends BaseController {
|
|||
// 遍历每个协议信息
|
||||
for (AgreementInfo info : list) {
|
||||
// 生成文件名
|
||||
String fileName = "";
|
||||
String fileNameThree = "";
|
||||
String fileName = ""; //费用承担方为01
|
||||
String fileNameThree = ""; //费用承担方为03
|
||||
List<SltAgreementInfo> explist = new ArrayList<>();
|
||||
List<SltAgreementInfo> explistThree = new ArrayList<>();
|
||||
List<LeaseInfo> leaseInfoList = new ArrayList<>();
|
||||
|
|
@ -293,7 +301,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
// 计算总成本
|
||||
BigDecimal totalCostThree = BigDecimal.valueOf(0.00);
|
||||
for (SltAgreementInfo sltAgreementInfo : explistThree) {
|
||||
totalCost = totalCost.add(sltAgreementInfo.getRealCosts());
|
||||
totalCostThree = totalCostThree.add(sltAgreementInfo.getRealCosts());
|
||||
}
|
||||
|
||||
fileNameThree ="费用承担方03_"+ info.getAgreementCode() + "_" + info.getUnitName() + "_" + info.getProjectName() + "_设备租赁结算单.xls";
|
||||
|
|
@ -686,4 +694,21 @@ public class SltAgreementInfoController extends BaseController {
|
|||
// 关闭写入器
|
||||
excelWriter.finish();
|
||||
}
|
||||
// @GetMapping("/taskCycle")
|
||||
// public void taskCycle() {
|
||||
// System.out.println("===springMVC定时器启动====");
|
||||
// try {
|
||||
//
|
||||
//// if (com.bonus.sgzb.common.core.utils.StringUtils.isEmpty(settlementJobDay)) {
|
||||
//// calcMonthlyService.calcMonthInfo(1);
|
||||
//// } else {
|
||||
//// int calDay = Integer.parseInt(settlementJobDay);
|
||||
// calcMonthlyService.calcMonthInfo(30);
|
||||
//// }
|
||||
//
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// System.out.println("===springMVC定时器结束====");
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,20 +118,19 @@ public class CalcMonthlyServiceImp implements CalcMonthlyService {
|
|||
calMonthlyMapper.updateProMonCosts(projectMonthCosts);
|
||||
|
||||
// 如果该工程费用指标已超过,则不需要记录月结记录
|
||||
BmProjectLot bmProjectLot = new BmProjectLot();
|
||||
bmProjectLot.setLotId(projectMonthCosts.getProjectId());
|
||||
// 获取已结算金额
|
||||
BigDecimal costByLotId = agreementInfoService.getCostByLotId(bmProjectLot);
|
||||
// 获取该工程费用指标
|
||||
BigDecimal costIndicatorsByLotId = agreementInfoService.getCostIndicatorsByLotId(bmProjectLot);
|
||||
if (costByLotId.compareTo(costIndicatorsByLotId) > 0) {
|
||||
List<String> proMonthCostIds = calMonthlyMapper.selectIdByProjectIdAndMonth(projectMonthCosts);
|
||||
calMonthlyMapper.deleteCostByProjectIdAndMonth(projectMonthCosts);
|
||||
for (String proMonthCostId : proMonthCostIds) {
|
||||
calMonthlyMapper.deleteDetailsByProMonthCostId(proMonthCostId);
|
||||
}
|
||||
}
|
||||
break;
|
||||
// BmProjectLot bmProjectLot = new BmProjectLot();
|
||||
// bmProjectLot.setLotId(projectMonthCosts.getProjectId());
|
||||
// // 获取已结算金额
|
||||
// BigDecimal costByLotId = agreementInfoService.getCostByLotId(bmProjectLot);
|
||||
// // 获取该工程费用指标
|
||||
// BigDecimal costIndicatorsByLotId = agreementInfoService.getCostIndicatorsByLotId(bmProjectLot);
|
||||
// if (costByLotId.compareTo(costIndicatorsByLotId) > 0) {
|
||||
// List<String> proMonthCostIds = calMonthlyMapper.selectIdByProjectIdAndMonth(projectMonthCosts);
|
||||
// calMonthlyMapper.deleteCostByProjectIdAndMonth(projectMonthCosts);
|
||||
// for (String proMonthCostId : proMonthCostIds) {
|
||||
// calMonthlyMapper.deleteDetailsByProMonthCostId(proMonthCostId);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="companyId" column="company_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="typeName" column="name" />
|
||||
<result property="costIndicators" column="cost_indicators" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="bmProjectInfo">
|
||||
|
|
@ -32,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="getProjectInfoAll" parameterType="com.bonus.sgzb.base.domain.BmProjectInfo" resultMap="BmProjectInfoResult">
|
||||
<!--<include refid="bmProjectInfo"/>-->
|
||||
select a.pro_id, a.pro_name, a.status, a.type_id, a.link_man, a.telphone, a.dept_id, a.del_flag, a.create_by,
|
||||
a.create_time,a.update_by, a.update_time, a.remark, a.company_id, b.dept_name, c.name
|
||||
a.create_time,a.update_by, a.update_time, a.remark, a.company_id, b.dept_name, c.name,a.cost_indicators
|
||||
from bm_project_info a
|
||||
left join sys_dept b on a.dept_id = b.dept_id
|
||||
left join sys_dic c on a.type_id = c.id
|
||||
|
|
@ -165,6 +166,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="companyId != null and companyId != ''">company_id,</if>
|
||||
<if test="costIndicators != null and costIndicators != ''">cost_indicators,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="proName != null and proName != ''">#{proName},</if>
|
||||
|
|
@ -178,6 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="companyId != null and companyId != ''">#{companyId},</if>
|
||||
<if test="costIndicators != null and costIndicators != ''">#{costIndicators},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
|
@ -196,6 +199,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateBy != null and updateBy != ''">update_by =#{updateBy},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="companyId != null and companyId != ''">company_id = #{companyId},</if>
|
||||
<if test="costIndicators != null and costIndicators != ''">cost_indicators = #{costIndicators},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where pro_id = #{proId}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="companyId" column="company_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="typeName" column="name" />
|
||||
<result property="costIndicators" column="cost_indicators" />
|
||||
<result property="detailsAddress" column="details_address" />
|
||||
<result property="province" column="province" />
|
||||
<result property="address" column="address" />
|
||||
|
|
@ -45,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="getProjectLotAll" parameterType="com.bonus.sgzb.base.domain.BmProjectLot" resultMap="BmProjectLotResult">
|
||||
<!--<include refid="bmProjectInfo"/>-->
|
||||
select a.lot_id, a.pro_id, a.lot_name, a.status, a.type_id, a.link_man, a.telphone, a.own_pro, a.dept_id, a.is_share,
|
||||
a.lon, a.lat, a.del_flag, a.create_by, a.create_time,a.remark,a.company_id ,b.dept_name, c.name,a.cost_indicators,
|
||||
a.lon, a.lat, a.del_flag, a.create_by, a.create_time,a.remark,a.company_id ,b.dept_name, c.name,
|
||||
a.longitude, a.latitude, a.address, a.province,a.details_address,a.completion_date,a.start_date,bpi.pro_name
|
||||
from bm_project_lot a
|
||||
left join bm_project_info bpi on a.pro_id = bpi.pro_id
|
||||
|
|
@ -125,7 +124,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateTime != null and updateTime != ''">update_time,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="companyId != null and companyId != ''">company_id,</if>
|
||||
<if test="costIndicators != null and costIndicators != ''">cost_indicators,</if>
|
||||
<if test="startDate != null and startDate != ''">start_date,</if>
|
||||
<if test="completionDate != null and completionDate != ''">completion_date,</if>
|
||||
<if test="longitude != null and longitude != ''">longitude,</if>
|
||||
|
|
@ -148,7 +146,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="companyId != null and companyId != ''">#{companyId},</if>
|
||||
<if test="costIndicators != null and costIndicators != ''">#{costIndicators},</if>
|
||||
<if test="startDate != null and startDate != ''">#{startDate},</if>
|
||||
<if test="completionDate != null and completionDate != ''">#{completionDate},</if>
|
||||
<if test="longitude != null and longitude != ''">#{longitude},</if>
|
||||
|
|
@ -247,7 +244,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateBy != null and updateBy != ''">update_by =#{updateBy},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="companyId != null and companyId != ''">company_id = #{companyId},</if>
|
||||
<if test="costIndicators != null and costIndicators != ''">cost_indicators = #{costIndicators},</if>
|
||||
<if test="longitude != null and longitude != ''">longitude = #{longitude},</if>
|
||||
<if test="latitude != null and latitude != ''">latitude = #{latitude},</if>
|
||||
<if test="address != null and address != ''">address = #{address},</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue