Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 3 days ago
parent
commit
75bd8a3bc0
  1. 8
      anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/factoryDailyReport/FactoryDaliyReportFeign.java
  2. 2
      anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/factoryDailyReport/FgsDetailVo.java
  3. 6
      anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/factoryDailyReport/FactoryDaliyReportMapper.java
  4. 165
      anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/factoryDailyReport/FactoryDaliyReportMapper.xml
  5. 7
      anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/factoryDailyReport/FactoryDaliyReportService.java
  6. 86
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateExcelNewVo.java
  7. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.java
  8. 17
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.xml
  9. 14
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateRest.java
  10. 144
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java
  11. 4
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatecheckapply/ScmVehrebateCheckapplyService.java

8
anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/factoryDailyReport/FactoryDaliyReportFeign.java

@ -42,6 +42,14 @@ public interface FactoryDaliyReportFeign {
@ResponseBody
ResultBean<FgsDetailVo> list4(@RequestParam("linkSid") String linkSid);
//--------------------------PC接口
//集团跳转事业部
}

2
anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/factoryDailyReport/FgsDetailVo.java

@ -27,4 +27,6 @@ public class FgsDetailVo {
private List<String> row9;
private List<String> row10;
private List<String> row11;
//row1的所有colspan数量相加
private String colTotal;
}

6
anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/factoryDailyReport/FactoryDaliyReportMapper.java

@ -35,4 +35,10 @@ public interface FactoryDaliyReportMapper {
List<FgsYearVo> getRow2(String divisionSid);
List<FactoryDaliyReportVo> getFgsList(String divisionSid);
List<YearAllVo> getFsg(@Param("fgsSid") String fgsSid, @Param("year") String year);
List<FactoryDaliyReportVo> getFsg2(@Param("fgsSid") String fgsSid, @Param("year") String year);
List<String> getBrandNameList2(@Param("fgsSid") String fgsSid, @Param("year") String year);
}

165
anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/factoryDailyReport/FactoryDaliyReportMapper.xml

@ -611,4 +611,169 @@
ORDER BY a.division_name desc, a.year DESC;
</select>
<select id="getFsg" resultType="com.yxt.anrui.reportcenter.api.factoryDailyReport.YearAllVo">
SELECT
a.purchaseSystemName name,
COUNT(DISTINCT a.brandSid)*4 AS colspan,
a.purchaseSystemSid as linkSid
FROM (
SELECT
purchaseSystemName,
purchaseSystemSid,
brandSid
FROM anrui_scm.scm_veh_rebate
WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(orgPath, '/', 3), '/', -1) = #{fgsSid} and LEFT(palceGenDate, 4) = #{year}
group by purchaseSystemSid,brandSid
UNION ALL
SELECT
purchaseSystemName,
purchaseSystemSid,
brandSid
FROM anrui_scm.scm_special_rebate
WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(orgPath, '/', 3), '/', -1) = #{fgsSid} and LEFT(palceGenDate, 4) = #{year}
group by purchaseSystemSid,brandSid
UNION ALL
SELECT
purchaseSystemName,
purchaseSystemSid,
brandSid
FROM anrui_scm.scm_collection_rebate
WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(orgPath, '/', 3), '/', -1) = #{fgsSid} and LEFT(collectionDate, 4) = #{year}
group by purchaseSystemSid,brandSid
) a
where a.purchaseSystemSid is not null and a.purchaseSystemSid != ''
GROUP BY a.purchaseSystemSid
ORDER BY a.purchaseSystemSid desc, a.brandSid DESC;
</select>
<select id="getFsg2" resultType="com.yxt.anrui.reportcenter.api.factoryDailyReport.FactoryDaliyReportVo">
SELECT
ROUND(SUM(a.estimateRebate), 2) AS estimate,
ROUND(SUM(a.uploadMoney), 2) AS upload,
ROUND(SUM(a.adjustmentMoney), 2) AS adjust,
ROUND(SUM(a.notUploadMoney), 2) AS notUploadMoney,
ROUND(SUM(a.fee), 2) AS fee,
ROUND(SUM(a.expense_payment), 2) AS expense_payment,
ROUND(SUM(a.pending_payment), 2) AS pending_payment,
ROUND(SUM(a.offset_payment), 2) AS offset_payment,
ROUND(SUM(a.remaining_payment), 2) AS remaining_payment,
ROUND(SUM(a.unuploaded_rebate), 2) AS unuploaded_rebate
FROM (
SELECT
purchaseSystemSid,brandSid,
SUM(estimateRebate) estimateRebate,
SUM(uploadMoney) uploadMoney,
SUM(adjustmentMoney) adjustmentMoney,
SUM(
estimateRebate +
IFNULL(CASE WHEN isAdjustment = '是' AND adjustmentState = 1 THEN adjustmentMoney ELSE 0 END, 0)
- IFNULL(uploadMoney, 0) - IFNULL(secondaryUploadMoney, 0)
) AS notUploadMoney,
SUM(
estimateRebate +
IFNULL(CASE WHEN isAdjustment = '是' AND adjustmentState = 1 THEN adjustmentMoney ELSE 0 END, 0)
- (uploadMoney + secondaryUploadMoney)
) AS unuploaded_rebate,
SUM(onceTreatCost + secondTreatCost + tempTreatCost + expectTreatCost + expectSuppCost +
onceSuppCost + secondSuppCost + tempSuppCost) AS fee,
SUM(onceTreatCost + secondTreatCost + tempTreatCost) AS expense_payment,
SUM(expectTreatCost) AS pending_payment,
SUM(expectSuppCost + onceSuppCost + secondSuppCost + tempSuppCost) AS offset_payment,
SUM(
estimateRebate - (uploadMoney + secondaryUploadMoney)
- (onceTreatCost + secondTreatCost + tempTreatCost)
- expectTreatCost
- (expectSuppCost + onceSuppCost + secondSuppCost + tempSuppCost)
) AS remaining_payment
FROM anrui_scm.scm_veh_rebate
where SUBSTRING_INDEX(SUBSTRING_INDEX(orgPath, '/', 3), '/', -1) = #{fgsSid} and LEFT(palceGenDate, 4) = #{year}
group by purchaseSystemSid,brandSid
UNION ALL
SELECT
purchaseSystemSid,brandSid,
SUM(estimateRebate) estimateRebate,
SUM(uploadMoney) uploadMoney,
SUM(adjustmentMoney) adjustmentMoney,
SUM(
estimateRebate +
IFNULL(CASE WHEN isAdjustment = '是' AND adjustmentState = 1 THEN adjustmentMoney ELSE 0 END, 0)
- IFNULL(uploadMoney, 0) - IFNULL(secondaryUploadMoney, 0)
) AS notUploadMoney,
SUM(
estimateRebate +
IFNULL(CASE WHEN isAdjustment = '是' AND adjustmentState = 1 THEN adjustmentMoney ELSE 0 END, 0)
- (uploadMoney + secondaryUploadMoney)
) AS unuploaded_rebate,
SUM(onceTreatCost + secondTreatCost + tempTreatCost + expectTreatCost + expectSuppCost +
onceSuppCost + secondSuppCost + tempSuppCost) AS fee,
SUM(onceTreatCost + secondTreatCost + tempTreatCost) AS expense_payment,
SUM(expectTreatCost) AS pending_payment,
SUM(expectSuppCost + onceSuppCost + secondSuppCost + tempSuppCost) AS offset_payment,
SUM(
estimateRebate - (uploadMoney + secondaryUploadMoney)
- (onceTreatCost + secondTreatCost + tempTreatCost)
- expectTreatCost
- (expectSuppCost + onceSuppCost + secondSuppCost + tempSuppCost)
) AS remaining_payment
FROM anrui_scm.scm_special_rebate
where SUBSTRING_INDEX(SUBSTRING_INDEX(orgPath, '/', 3), '/', -1) = #{fgsSid} and LEFT(palceGenDate, 4) = #{year}
group by purchaseSystemSid,brandSid
UNION ALL
SELECT
purchaseSystemSid,brandSid,
SUM(estimateRebate) estimateRebate,
SUM(uploadMoney) uploadMoney,
SUM(adjustmentMoney) adjustmentMoney,
SUM(estimateRebate + IFNULL(adjustmentMoney, 0) - IFNULL(uploadMoney, 0)) AS notUploadMoney,
SUM(estimateRebate + IFNULL(adjustmentMoney, 0) - uploadMoney) AS unuploaded_rebate,
0 AS fee,
0 AS expense_payment,
0 AS pending_payment,
0 AS offset_payment,
SUM(estimateRebate - uploadMoney) AS remaining_payment
FROM anrui_scm.scm_collection_rebate
where SUBSTRING_INDEX(SUBSTRING_INDEX(orgPath, '/', 3), '/', -1) = #{fgsSid} and LEFT(collectionDate, 4) = #{year}
group by purchaseSystemSid,brandSid
) a
WHERE a.purchaseSystemSid IS NOT NULL AND a.purchaseSystemSid != ''
GROUP BY a.purchaseSystemSid,a.brandSid
ORDER BY a.purchaseSystemSid desc, a.brandSid DESC;
</select>
<select id="getBrandNameList2" resultType="java.lang.String">
SELECT
a.brandName
FROM (
SELECT
purchaseSystemSid,
brandSid,
brandName
FROM anrui_scm.scm_veh_rebate
WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(orgPath, '/', 3), '/', -1) = #{fgsSid} and LEFT(palceGenDate, 4) = #{year}
group by purchaseSystemSid,brandSid
UNION ALL
SELECT
purchaseSystemSid,
brandSid,
brandName
FROM anrui_scm.scm_special_rebate
WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(orgPath, '/', 3), '/', -1) = #{fgsSid} and LEFT(palceGenDate, 4) = #{year}
group by purchaseSystemSid,brandSid
UNION ALL
SELECT
purchaseSystemSid,
brandSid,
brandName
FROM anrui_scm.scm_collection_rebate
WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(orgPath, '/', 3), '/', -1) = #{fgsSid} and LEFT(collectionDate, 4) = #{year}
group by purchaseSystemSid,brandSid
) a
where a.purchaseSystemSid is not null and a.purchaseSystemSid != ''
GROUP BY a.purchaseSystemSid,a.brandSid
ORDER BY a.purchaseSystemSid desc, a.brandSid DESC;
</select>
</mapper>

7
anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/factoryDailyReport/FactoryDaliyReportService.java

@ -334,7 +334,12 @@ public class FactoryDaliyReportService {
public ResultBean<FgsDetailVo> list4(String linkSid) {
ResultBean<FgsDetailVo> rb = ResultBean.fireFail();
FgsDetailVo fgsDetailVo = new FgsDetailVo();
List<String> stringList = Arrays.asList(linkSid.split("#"));
String fgsSid = stringList.get(0);
String year = stringList.get(1);
List<YearAllVo> yearAllVos = factoryDaliyReportMapper.getFsg(fgsSid,year);
List<String> brandList = factoryDaliyReportMapper.getBrandNameList2(fgsSid,year);
List<FactoryDaliyReportVo> factoryDaliyReportVoList = factoryDaliyReportMapper.getFsg2(fgsSid,year);
return null;
}
}

86
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateExcelNewVo.java

@ -0,0 +1,86 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmspecialrebate;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yxt.common.core.utils.ExportEntityMap;
import lombok.Data;
@Data
public class ScmSpecialRebateExcelNewVo {
@ExcelProperty("序号")
private Integer rankNo;
@ExcelProperty("采购系统")
private String purchaseSystemName;
@ExcelProperty("所属年月")
private String palceGenDate;
@ExcelProperty("返利类型")
private String rebateTypeValue;
@ExcelProperty("返利名称")
private String rebateName;
@ExcelProperty({"返利金额", "预提"})
private String estimateRebate;
@ExcelProperty({"返利金额", "上传"})
private String uploadMoney;
@ExcelProperty({"返利金额", "二次上传"})
private String secondaryUploadMoney;
@ExcelProperty({"返利金额", "待确定"})
private String stayDetermineMoney;
@ExcelProperty({"返利金额", "调整"})
private String adjustmentMoney;
@ExcelProperty({"返利金额", "未上传"})
private String notUploadMoney;
@ExcelProperty({"其中费用", "预计"})
private String withholdCost;
@ExcelProperty({"其中费用", "上传"})
private String money;
@ExcelProperty({"日期", "创建"})
private String createTime;
@ExcelProperty({"日期", "预提"})
private String withholdingDate;
@ExcelProperty({"日期", "上传"})
private String uploadDate;
@ExcelProperty({"日期", "二次上传"})
private String secondaryUploadDate;
@ExcelProperty({"状态", "流程"})
private String state;
@ExcelProperty({"状态", "一次核对"})
private String onceCheckState;
@ExcelProperty({"状态", "二次核对"})
private String secondCheckState;
@ExcelProperty("备注")
private String remarks;
@ExcelProperty("品牌")
private String brandName;
@ExcelProperty("分公司")
private String createOrgName;
}

2
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.java

@ -78,4 +78,6 @@ public interface ScmSpecialRebateMapper extends BaseMapper<ScmSpecialRebate> {
List<ScmSpecialRebateVo> listAll(@Param(Constants.WRAPPER) QueryWrapper<ScmSpecialRebate> qw);
List<ScmVehRebateTypeStatMxVo> getTypeDetail(@Param("sids") List<String> sids);
List<ScmSpecialRebateExcelNewVo> excelListNew(@Param(Constants.WRAPPER) QueryWrapper<ScmSpecialRebate> qw);
}

17
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.xml

@ -225,4 +225,21 @@
</foreach>
</if>
</select>
<select id="excelListNew" resultType="com.yxt.anrui.scm.api.scmspecialrebate.ScmSpecialRebateExcelNewVo">
SELECT
*,
expectItureCost + expectTreatCost + expectSuppCost AS withholdCost,
onceItureCost + onceTreatCost + onceSuppCost + secondItureCost + secondTreatCost + secondSuppCost AS money,
estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0) AS notUploadMoney,
IF(secondaryUploadMoney > 0 AND isAdjustment = '是','是','否') AS secondCheckState,
@row_number := @row_number + 1 AS rankNo
FROM scm_special_rebate,(
SELECT
@row_number := 0
) AS t
<where>
${ew.sqlSegment}
</where>
</select>
</mapper>

14
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateRest.java

@ -25,8 +25,10 @@
*********************************************************/
package com.yxt.anrui.scm.biz.scmspecialrebate;
import com.alibaba.excel.EasyExcel;
import com.yxt.anrui.scm.api.scmspecialrebate.*;
import com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateDetailsVo;
import com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateExcelNewVo;
import com.yxt.common.base.utils.ExportExcelUtils;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
@ -77,6 +79,18 @@ public class ScmSpecialRebateRest implements ScmSpecialRebateFeign {
return rb.success().setData(scmSpecialRebateVoList);
}
@ApiOperation("导出")
@PostMapping("/excelListNew")
public void excelListNew(@RequestBody ScmSpecialRebateQuery query) throws IOException {
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;filename=rebate.xlsx");
//得到所有要导出的数据
List<ScmSpecialRebateExcelNewVo> dataList = scmSpecialRebateService.excelListNew(query);
EasyExcel.write(response.getOutputStream(), ScmVehRebateExcelNewVo.class)
.sheet("专项返利管理")
.doWrite(dataList);
}
@ApiOperation("导出")
@PostMapping("/excelList")
public void excelList(@RequestBody ScmSpecialRebateQuery query) {

144
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java

@ -2520,4 +2520,148 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
ScmSpecialRebateDetailsVo scmSpecialRebateDetailsVo = fetchDetailsVoBySid(sid);
return scmSpecialRebateDetailsVo;
}
public List<ScmSpecialRebateExcelNewVo> excelListNew(ScmSpecialRebateQuery query) {
QueryWrapper<ScmSpecialRebate> qw = new QueryWrapper<>();
//========================================数据授权开始
if (StringUtils.isNotBlank(query.getMenuUrl())) {
PrivilegeQuery privilegeQuery = new PrivilegeQuery();
privilegeQuery.setOrgPath(query.getOrgPath());
privilegeQuery.setMenuUrl(query.getMenuUrl());
privilegeQuery.setMenuSid(query.getMenuSid());
privilegeQuery.setUserSid(query.getUserSid());
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery);
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) {
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
String orgSidPath = query.getOrgPath();
orgSidPath = orgSidPath + "/";
int i1 = orgSidPath.indexOf("/");
int i2 = orgSidPath.indexOf("/", i1 + 1);
int i3 = orgSidPath.indexOf("/", i2 + 1);
int i4 = orgSidPath.indexOf("/", i3 + 1);
String orgLevelKey = defaultIdReltBean.getData();
if ("1".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i1);
qw.like("orgPath", orgSidPath);
} else if ("2".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i2);
qw.like("orgPath", orgSidPath);
} else if ("3".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i3);
qw.like("orgPath", orgSidPath);
} else if ("4".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i4);
qw.like("orgPath", orgSidPath);
} else if ("5".equals(orgLevelKey)) {
qw.eq("createBySid", query.getUserSid());
} else {
List<ScmSpecialRebateExcelNewVo> scmSpecialRebateExcelVos = new ArrayList<>();
return scmSpecialRebateExcelVos;
}
} else {
List<ScmSpecialRebateExcelNewVo> scmSpecialRebateExcelVos = new ArrayList<>();
return scmSpecialRebateExcelVos;
}
}
if (StringUtils.isNotBlank(query.getCreateOrgName())) {
qw.like("createOrgName", query.getCreateOrgName());
}
if (StringUtils.isNotBlank(query.getBrandName())) {
qw.like("brandName", query.getBrandName());
}
if (StringUtils.isNotBlank(query.getPurchaseSystemName())) {
qw.like("purchaseSystemName", query.getPurchaseSystemName());
}
if (StringUtils.isNotBlank(query.getRebateTypeKey())) {
qw.eq("rebateTypeKey", query.getRebateTypeKey());
}
if (StringUtils.isNotBlank(query.getRebateName())) {
qw.like("rebateName", query.getRebateName());
}
if (StringUtils.isNotBlank(query.getState())) {
qw.eq("state", query.getState());
}
if (StringUtils.isNotBlank(query.getPalceGenDate())) {
qw.eq("palceGenDate", query.getPalceGenDate());
}
if (StringUtils.isNotBlank(query.getWithholdingDate())) {
String[] w = query.getWithholdingDate().split("-");
String withholdingDate = w[0] + "年" + Integer.parseInt(w[1]) + "月";
qw.eq("withholdingDate", withholdingDate);
}
if (StringUtils.isNotBlank(query.getUploadState())) {
if (query.getUploadState().equals("0")) {
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
} else {
qw.ne("uploadDate", "");
qw.isNotNull("uploadDate");
}
}
if (StringUtils.isNotBlank(query.getIsAdjustment())) {
qw.eq("isAdjustment", query.getIsAdjustment());
}
if (StringUtils.isNotBlank(query.getIsUploadFinish())) {
if (query.getIsUploadFinish().equals("1")) {
qw.eq("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
} else {
qw.ne("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
}
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
}
if (StringUtils.isNotBlank(query.getSecondUploadState())) {
if (query.getSecondUploadState().equals("1")) {
qw.isNotNull("secondaryUploadMoney");
qw.ne("secondaryUploadMoney", "");
qw.ne("secondaryUploadMoney", 0);
qw.eq("isAdjustment", "是");
} else {
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", ""));
}
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
String uploadStartDate = query.getUploadStartDate();
String uploadEndDate = query.getUploadEndDate();
qw.apply(StringUtils.isNotBlank(uploadStartDate), "(date_format (uploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (uploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')").
or().
apply(StringUtils.isNotBlank(uploadStartDate), "date_format (secondaryUploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (secondaryUploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d'))"
);
qw.orderByDesc("createTime");
List<ScmSpecialRebateExcelNewVo> scmSpecialRebateExcelVos = baseMapper.excelListNew(qw);
for (ScmSpecialRebateExcelNewVo scmSpecialRebateExcelVo : scmSpecialRebateExcelVos) {
if (scmSpecialRebateExcelVo.getState().equals("0")) {
scmSpecialRebateExcelVo.setState("未预提");
} else if (scmSpecialRebateExcelVo.getState().equals("1")) {
scmSpecialRebateExcelVo.setState("预提中");
} else if (scmSpecialRebateExcelVo.getState().equals("2")) {
scmSpecialRebateExcelVo.setState("待核对");
} else if (scmSpecialRebateExcelVo.getState().equals("3")) {
scmSpecialRebateExcelVo.setState("核对中");
} else if (scmSpecialRebateExcelVo.getState().equals("4")) {
scmSpecialRebateExcelVo.setState("已核对");
} else if (scmSpecialRebateExcelVo.getState().equals("5")) {
scmSpecialRebateExcelVo.setState("分配中");
} else if (scmSpecialRebateExcelVo.getState().equals("6")) {
scmSpecialRebateExcelVo.setState("已分配");
}
if (scmSpecialRebateExcelVo.getOnceCheckState().equals("0")) {
scmSpecialRebateExcelVo.setOnceCheckState("否");
} else if (scmSpecialRebateExcelVo.getOnceCheckState().equals("1")) {
scmSpecialRebateExcelVo.setOnceCheckState("是");
} else if (scmSpecialRebateExcelVo.getOnceCheckState().equals("2")) {
scmSpecialRebateExcelVo.setOnceCheckState("一次核对中");
}
scmSpecialRebateExcelVo.setCreateTime(DateUtil.formatDate(DateUtil.parse(scmSpecialRebateExcelVo.getCreateTime())));
}
return scmSpecialRebateExcelVos;
}
}

4
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatecheckapply/ScmVehrebateCheckapplyService.java

@ -829,7 +829,7 @@ public class ScmVehrebateCheckapplyService extends MybatisBaseService<ScmVehreba
//确认调整时
if (StringUtils.isNotBlank(rebate.getIsAdjustment())) {
/*if (StringUtils.isNotBlank(rebate.getIsAdjustment())) {
if (rebate.getIsAdjustment().equals("是")) {
if (StringUtils.isNotBlank(rebate.getAdjustmentMoney())) {
BigDecimal adMoney = new BigDecimal(rebate.getAdjustmentMoney());
@ -843,7 +843,7 @@ public class ScmVehrebateCheckapplyService extends MybatisBaseService<ScmVehreba
}
}
}
}
}*/
}

Loading…
Cancel
Save