i皖送推送修改
This commit is contained in:
parent
a9e22710b4
commit
3cf1435a6e
|
|
@ -6,10 +6,13 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
||||||
import com.bonus.material.push.domain.IwsCostPushBean;
|
import com.bonus.material.push.domain.IwsCostPushBean;
|
||||||
import com.bonus.material.push.service.IwsCostPushService;
|
import com.bonus.material.push.service.IwsCostPushService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -21,6 +24,7 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/iws_cost_push")
|
@RequestMapping("/iws_cost_push")
|
||||||
|
@Validated
|
||||||
public class IwsCostPushController extends BaseController {
|
public class IwsCostPushController extends BaseController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
|
|
@ -51,4 +55,16 @@ public class IwsCostPushController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询费用推送审核列表
|
||||||
|
* @param obj 查询条件
|
||||||
|
*/
|
||||||
|
@GetMapping("/getCostPushCheckList")
|
||||||
|
@ApiOperation("查询费用推送审核列表--分页")
|
||||||
|
public TableDataInfo getCostPushCheckList(@NotNull @Valid IwsCostPushBean obj) {
|
||||||
|
startPage();
|
||||||
|
List<IwsCostPushBean> list = iwsCostPushService.getCostPushCheckList(obj);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,11 @@ package com.bonus.material.push.domain;
|
||||||
|
|
||||||
import com.bonus.common.core.annotation.Excel;
|
import com.bonus.common.core.annotation.Excel;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -65,6 +68,8 @@ public class IwsCostPushBean implements Serializable {
|
||||||
|
|
||||||
private String time;
|
private String time;
|
||||||
|
|
||||||
|
// 月份
|
||||||
|
@NotBlank(message = "月份不能为空")
|
||||||
private String month;
|
private String month;
|
||||||
|
|
||||||
private String type;
|
private String type;
|
||||||
|
|
@ -96,6 +101,9 @@ public class IwsCostPushBean implements Serializable {
|
||||||
|
|
||||||
private List<String> ids;
|
private List<String> ids;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审核状态")
|
||||||
|
private Byte checkStatus;
|
||||||
|
|
||||||
// 推送备注
|
// 推送备注
|
||||||
private String pushRemark;
|
private String pushRemark;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,9 @@ public interface IwsCostPushMapper {
|
||||||
* 更新协议push状态
|
* 更新协议push状态
|
||||||
*/
|
*/
|
||||||
int updateAgreementIsPush(IwsCostPushBean o);
|
int updateAgreementIsPush(IwsCostPushBean o);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询费用推送审核数据列表
|
||||||
|
*/
|
||||||
|
List<IwsCostPushBean> getCostPushCheckList(IwsCostPushBean o);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,9 @@ public interface IwsCostPushService {
|
||||||
*/
|
*/
|
||||||
List<IwsCostPushBean> findAgreement(IwsCostPushBean o);
|
List<IwsCostPushBean> findAgreement(IwsCostPushBean o);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询费用推送审核数据列表
|
||||||
|
*/
|
||||||
|
List<IwsCostPushBean> getCostPushCheckList(IwsCostPushBean o);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,4 +33,12 @@ public class IwsCostPushServiceImpl implements IwsCostPushService {
|
||||||
public List<IwsCostPushBean> findAgreement(IwsCostPushBean o) {
|
public List<IwsCostPushBean> findAgreement(IwsCostPushBean o) {
|
||||||
return iwsCostPushMapper.findAgreement(o);
|
return iwsCostPushMapper.findAgreement(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询费用推送审核数据列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<IwsCostPushBean> getCostPushCheckList(IwsCostPushBean o) {
|
||||||
|
return iwsCostPushMapper.getCostPushCheckList(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,4 +44,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="getCostPushCheckList" resultType="com.bonus.material.push.domain.IwsCostPushBean">
|
||||||
|
SELECT
|
||||||
|
pmc.id AS id, pmc.AGREEMENT_ID AS agreementId, IF(ISNULL(pmc.check_status), 0, pmc.check_status) AS checkStatus,
|
||||||
|
pmc.LEASE_MONEY AS leaseMoney, pmc.LOST_MONEY AS lostMoney, pmc.REPAIR_MONEY AS repairMoney, pmc.SCRAP_MONEY AS scrapMoney,
|
||||||
|
bma.agreement_code AS agreementCode, IF(bma.is_slt = 1, '已结算', '未结算') AS isSettlement,
|
||||||
|
bp.pro_name AS projectName,
|
||||||
|
bu.unit_name AS unitName,
|
||||||
|
ROUND(
|
||||||
|
SUM(ifnull( pmc.LEASE_MONEY, 0 )+ ifnull( pmc.LOST_MONEY, 0 )+ ifnull( pmc.REPAIR_MONEY, 0 )+ ifnull( pmc.SCRAP_MONEY, 0 )), 2
|
||||||
|
) AS money
|
||||||
|
FROM
|
||||||
|
project_month_costs pmc
|
||||||
|
LEFT JOIN bm_agreement_info bma ON pmc.AGREEMENT_ID = bma.agreement_id
|
||||||
|
LEFT JOIN bm_project bp ON bp.pro_id = bma.project_id
|
||||||
|
LEFT JOIN bm_unit bu ON bu.unit_id = bma.unit_id
|
||||||
|
WHERE
|
||||||
|
( pmc.LEASE_MONEY > 0 OR pmc.LOST_MONEY > 0 OR pmc.REPAIR_MONEY > 0 OR pmc.SCRAP_MONEY > 0 )
|
||||||
|
<if test="checkStatus != null">
|
||||||
|
AND pmc.check_status = #{checkStatus}
|
||||||
|
</if>
|
||||||
|
<if test="agreementCode != null and agreementCode != ''">
|
||||||
|
AND bma.agreement_code LIKE CONCAT('%',#{agreementCode},'%')
|
||||||
|
</if>
|
||||||
|
<if test="projectId != null and projectId != ''">
|
||||||
|
AND bma.project_id = #{projectId}
|
||||||
|
</if>
|
||||||
|
<if test="unitId != null and unitId != ''">
|
||||||
|
AND bma.unit_id = #{unitId}
|
||||||
|
</if>
|
||||||
|
<if test="isSettlement != null and isSettlement != ''">
|
||||||
|
AND bma.is_slt = #{isSettlement}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
GROUP BY
|
||||||
|
pmc.AGREEMENT_ID
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue