From de7d4bd972ec15522bbda7462e4d4e3c047626cf Mon Sep 17 00:00:00 2001 From: chenwei Date: Mon, 8 Jul 2024 22:36:21 +0800 Subject: [PATCH] 资金日报 --- backend/chkpower/src/main/java/com/hotent/chkpower/controller/WCurrentController.java | 2 +- backend/chkpower/src/main/java/com/hotent/chkpower/controller/WDailyFundsController.java | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/chkpower/src/main/java/com/hotent/chkpower/controller/WFinanceController.java | 2 +- backend/chkpower/src/main/java/com/hotent/chkpower/dao/WDailyFundsDao.java | 30 ++++++++++++++++++++++++++++++ backend/chkpower/src/main/java/com/hotent/chkpower/manager/WAfterScriptManager.java | 5 ++++- backend/chkpower/src/main/java/com/hotent/chkpower/manager/WDailyFundsManager.java | 39 +++++++++++++++++++++++++++++++++++++++ backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WAfterScriptManagerImpl.java | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WDailyFundsManagerImpl.java | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/chkpower/src/main/java/com/hotent/chkpower/model/WDailyFunds.java | 363 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/chkpower/src/main/resources/mapper/WCurrentMapper.xml | 2 +- backend/chkpower/src/main/resources/mapper/WDailyFundsMapper.xml | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/chkpower/src/main/resources/mapper/WFinanceMapper.xml | 2 +- 12 files changed, 744 insertions(+), 7 deletions(-) create mode 100644 backend/chkpower/src/main/java/com/hotent/chkpower/controller/WDailyFundsController.java create mode 100644 backend/chkpower/src/main/java/com/hotent/chkpower/dao/WDailyFundsDao.java create mode 100644 backend/chkpower/src/main/java/com/hotent/chkpower/manager/WDailyFundsManager.java create mode 100644 backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WDailyFundsManagerImpl.java create mode 100644 backend/chkpower/src/main/java/com/hotent/chkpower/model/WDailyFunds.java create mode 100644 backend/chkpower/src/main/resources/mapper/WDailyFundsMapper.xml diff --git a/backend/chkpower/src/main/java/com/hotent/chkpower/controller/WCurrentController.java b/backend/chkpower/src/main/java/com/hotent/chkpower/controller/WCurrentController.java index acca452..6c458da 100644 --- a/backend/chkpower/src/main/java/com/hotent/chkpower/controller/WCurrentController.java +++ b/backend/chkpower/src/main/java/com/hotent/chkpower/controller/WCurrentController.java @@ -84,7 +84,7 @@ public class WCurrentController extends BaseController> list = new ArrayList>(); BigDecimal hz = new BigDecimal(0.00); for (String orgType : gslxList) { - List> listData = baseService.getCurrentAccountBalanceList(orgType, date + " 00:00:00"); + List> listData = baseService.getCurrentAccountBalanceList(orgType, date); BigDecimal totalBalance = listData.stream() .filter(d -> d.containsKey("F_account_balance")) // 确保键存在 .map(d -> { diff --git a/backend/chkpower/src/main/java/com/hotent/chkpower/controller/WDailyFundsController.java b/backend/chkpower/src/main/java/com/hotent/chkpower/controller/WDailyFundsController.java new file mode 100644 index 0000000..8bd6a59 --- /dev/null +++ b/backend/chkpower/src/main/java/com/hotent/chkpower/controller/WDailyFundsController.java @@ -0,0 +1,56 @@ +package com.hotent.chkpower.controller; + + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import com.hotent.base.model.CommonResult; +import com.hotent.base.util.StringUtil; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.web.bind.annotation.RestController; +import com.hotent.base.controller.BaseController; +import com.hotent.chkpower.model.WDailyFunds; +import com.hotent.chkpower.manager.WDailyFundsManager; + +/** + * 每日资金 前端控制器 + * + * @company 广州宏天软件股份有限公司 + * @author cw + * @since 2024-07-08 + */ +@RestController +@RequestMapping("/wDailyFunds/v1/") +public class WDailyFundsController extends BaseController { + + /** + * 根据id获取每日资金数据详情 + * @param id + * @return + * @throws Exception + * ModelAndView + */ + @GetMapping(value="/getDetail") + @ApiOperation(value="根据id获取每日资金数据详情",httpMethod = "GET",notes = "根据id获取每日资金数据详情") + public CommonResult getDetail(@ApiParam(name="id",value="业务对象主键", required = true)@RequestParam(required=true) String id) throws Exception{ + return CommonResult.ok().value(baseService.getDetail(id)); + } + /** + * 新增,更新每日资金 + * @param wDailyFunds + * @throws Exception + * @return + * @exception + */ + @PostMapping(value="/save") + @ApiOperation(value = "新增,更新每日资金数据", httpMethod = "POST", notes = "新增,更新每日资金数据") + public CommonResult save(@ApiParam(name="WDailyFunds",value="每日资金对象", required = true)@RequestBody WDailyFunds wDailyFunds) throws Exception{ + String msg = StringUtil.isEmpty(wDailyFunds.getId()) ? "添加每日资金成功" : "更新每日资金成功"; + baseService.createOrUpdate(wDailyFunds); + return CommonResult.ok().message(msg); + } + +} diff --git a/backend/chkpower/src/main/java/com/hotent/chkpower/controller/WFinanceController.java b/backend/chkpower/src/main/java/com/hotent/chkpower/controller/WFinanceController.java index 1520cad..79a1141 100644 --- a/backend/chkpower/src/main/java/com/hotent/chkpower/controller/WFinanceController.java +++ b/backend/chkpower/src/main/java/com/hotent/chkpower/controller/WFinanceController.java @@ -92,7 +92,7 @@ public class WFinanceController extends BaseController> listData = baseService.getTransactionDetailsList(orgType, date + " 00:00:00"); + List> listData = baseService.getTransactionDetailsList(orgType, date); if (listData != null && listData.size() > 0) { for (HashMap datum : listData) { datum.put("Serial_Number",String.valueOf(Serial_Number++)); diff --git a/backend/chkpower/src/main/java/com/hotent/chkpower/dao/WDailyFundsDao.java b/backend/chkpower/src/main/java/com/hotent/chkpower/dao/WDailyFundsDao.java new file mode 100644 index 0000000..42814ce --- /dev/null +++ b/backend/chkpower/src/main/java/com/hotent/chkpower/dao/WDailyFundsDao.java @@ -0,0 +1,30 @@ +package com.hotent.chkpower.dao; + +import com.hotent.chkpower.model.WCurrent; +import com.hotent.chkpower.model.WDailyFunds; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +import java.time.LocalDateTime; +import java.util.HashMap; +import java.util.List; + +/** + * 每日资金 Mapper 接口 + * + * @company 广州宏天软件股份有限公司 + * @author cw + * @since 2024-07-08 + */ +public interface WDailyFundsDao extends BaseMapper { + + + void insertInitWDailyFunds(@Param("fDate") LocalDateTime fDate); + + + Integer selectWDailyFundsCount(@Param("fDate") LocalDateTime fDate); + + + List selectWDailyFundsNews(@Param("wCurrentList") List> wCurrentList, @Param("fDate") LocalDateTime fDate); + +} diff --git a/backend/chkpower/src/main/java/com/hotent/chkpower/manager/WAfterScriptManager.java b/backend/chkpower/src/main/java/com/hotent/chkpower/manager/WAfterScriptManager.java index 35c7639..1c7fc5c 100644 --- a/backend/chkpower/src/main/java/com/hotent/chkpower/manager/WAfterScriptManager.java +++ b/backend/chkpower/src/main/java/com/hotent/chkpower/manager/WAfterScriptManager.java @@ -4,6 +4,9 @@ import java.util.Map; public interface WAfterScriptManager { - void editCurrent(Map map); + void editCurrentReport(Map map); + + + void editFinance(Map map); } diff --git a/backend/chkpower/src/main/java/com/hotent/chkpower/manager/WDailyFundsManager.java b/backend/chkpower/src/main/java/com/hotent/chkpower/manager/WDailyFundsManager.java new file mode 100644 index 0000000..b1ae2a4 --- /dev/null +++ b/backend/chkpower/src/main/java/com/hotent/chkpower/manager/WDailyFundsManager.java @@ -0,0 +1,39 @@ +package com.hotent.chkpower.manager; + +import com.hotent.chkpower.model.WCurrent; +import com.hotent.chkpower.model.WDailyFunds; +import com.hotent.base.manager.BaseManager; + +import java.time.LocalDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 每日资金 服务类 + * + * @company 广州宏天软件股份有限公司 + * @author cw + * @since 2024-07-08 + */ +public interface WDailyFundsManager extends BaseManager { + /** + * 根据主键获取详情 + * @param id + * @return + */ + WDailyFunds getDetail(String id); + /** + * 新建、更新每日资金 + * @param wDailyFunds + * @return + */ + void createOrUpdate(WDailyFunds wDailyFunds); + + + + + void editWDailyFunds(List> wCurrentList, LocalDateTime date); + + +} diff --git a/backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WAfterScriptManagerImpl.java b/backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WAfterScriptManagerImpl.java index 6be0815..400d9ce 100644 --- a/backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WAfterScriptManagerImpl.java +++ b/backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WAfterScriptManagerImpl.java @@ -1,11 +1,26 @@ package com.hotent.chkpower.manager.impl; +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; import com.hotent.chkpower.manager.WAfterScriptManager; +import com.hotent.chkpower.manager.WDailyFundsManager; +import com.hotent.chkpower.model.WCurrent; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.activiti.engine.impl.util.json.JSONObject; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; +import java.lang.reflect.Type; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; import java.util.Map; @Service @@ -13,10 +28,39 @@ import java.util.Map; @Slf4j @Transactional public class WAfterScriptManagerImpl implements WAfterScriptManager { + @Resource + private WDailyFundsManager wDailyFundsManager; @Override - public void editCurrent(Map map) { - System.out.println(map); + public void editCurrentReport(Map map) { + LocalDateTime date = convertStringToLocalDateTime(map.get("date").toString()); + String json = map.get("subMap").toString(); + // 将 JSON 字符串转换为 JSONObject + JSONObject jsonObject = new JSONObject(json); + String currentDetail = String.valueOf(jsonObject.get("current_detail")); + Gson gson = new Gson(); + List> wCurrentList = gson.fromJson(currentDetail, List.class); + wDailyFundsManager.editWDailyFunds(wCurrentList, date); + } + + @Override + public void editFinance(Map map) { + LocalDateTime date = convertStringToLocalDateTime(map.get("date").toString()); + HashMap stringStringHashMap = new HashMap<>(); + stringStringHashMap.put("F_org_id",String.valueOf(map.get("org_id"))); + List> list= new ArrayList>(); + list.add(stringStringHashMap); + wDailyFundsManager.editWDailyFunds(list, date); + } + + + private static LocalDateTime convertStringToLocalDateTime(String dateString) { + String datePart = dateString.substring(0, 10); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + LocalDate date = LocalDate.parse(datePart, formatter); + LocalDateTime dateTime = LocalDateTime.of(date, LocalTime.MIDNIGHT); + System.out.println("LocalDateTime with default time: " + dateTime); + return dateTime; } } diff --git a/backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WDailyFundsManagerImpl.java b/backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WDailyFundsManagerImpl.java new file mode 100644 index 0000000..10bf520 --- /dev/null +++ b/backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WDailyFundsManagerImpl.java @@ -0,0 +1,97 @@ +package com.hotent.chkpower.manager.impl; + +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.hotent.chkpower.model.WCurrent; +import com.hotent.chkpower.model.WDailyFunds; +import com.hotent.chkpower.dao.WDailyFundsDao; +import com.hotent.chkpower.manager.WDailyFundsManager; +import com.hotent.base.manager.impl.BaseManagerImpl; +import com.hotent.runtime.script.ScriptImpl; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.HashMap; +import java.util.List; + + +/** + * 每日资金 服务实现类 + * + * @author cw + * @company 广州宏天软件股份有限公司 + * @since 2024-07-08 + */ +@Service +public class WDailyFundsManagerImpl extends BaseManagerImpl implements WDailyFundsManager { + @Resource + private ScriptImpl scriptImpl; + + @Override + public WDailyFunds getDetail(String id) { + WDailyFunds wDailyFunds = this.get(id); + + + return wDailyFunds; + } + + @Override + @Transactional + public void createOrUpdate(WDailyFunds wDailyFunds) { + //新建或更新 + this.saveOrUpdate(wDailyFunds); + } + + + @Override + public void editWDailyFunds(List> wCurrentList, LocalDateTime fDate) { + if (wCurrentList == null || wCurrentList.size() == 0) {return;} + //验证 + verifyInitWDailyFunds(fDate); + List data = baseMapper.selectWDailyFundsNews(wCurrentList, fDate); + if (data != null && data.size() > 0){ + for (WDailyFunds wDailyFunds : data) { + LambdaUpdateWrapper wrapper = Wrappers.lambdaUpdate(); + //昨日余额 + wrapper.set(WDailyFunds::getFYesterdayAccountBalance, wDailyFunds.getFYesterdayAccountBalance()); + //今日余额 + wrapper.set(WDailyFunds::getFTodayAccountBalance, wDailyFunds.getFTodayAccountBalance()); + //余额差额 + wrapper.set(WDailyFunds::getFAccountBalanceDifference, wDailyFunds.getFAccountBalanceDifference()); + //今日净现金流 + wrapper.set(WDailyFunds::getFTodayNetCashFlow, wDailyFunds.getFTodayNetCashFlow()); + //今日被冻结金额 + wrapper.set(WDailyFunds::getFTodayFreezeAmount, wDailyFunds.getFTodayFreezeAmount()); + //今日冻结上限 + wrapper.set(WDailyFunds::getFTodayFreezing, wDailyFunds.getFTodayFreezing()); + + //更新时间 + wrapper.set(WDailyFunds::getFUpdateTime, LocalDateTime.now()); + //更新人 + wrapper.set(WDailyFunds::getFUpdateBy, scriptImpl.getCurrentUserName()); + //更新人id + wrapper.set(WDailyFunds::getFUpdateId, scriptImpl.getCurrentUserId()); + + //复核状态 + wrapper.set(WDailyFunds::getFInspStatusName, "待复核"); + //复核时间 + wrapper.set(WDailyFunds::getFInspTime, null); + //复核备注 + wrapper.set(WDailyFunds::getFInspNotes, null); + //条件 + wrapper.eq(WDailyFunds::getId, wDailyFunds.getId()); + baseMapper.update(null,wrapper); + } + } + } + + private void verifyInitWDailyFunds(LocalDateTime fDate) { + Integer count = baseMapper.selectWDailyFundsCount(fDate); + if (count == null || count == 0) { + baseMapper.insertInitWDailyFunds(fDate); + } + } + +} diff --git a/backend/chkpower/src/main/java/com/hotent/chkpower/model/WDailyFunds.java b/backend/chkpower/src/main/java/com/hotent/chkpower/model/WDailyFunds.java new file mode 100644 index 0000000..2e6cab4 --- /dev/null +++ b/backend/chkpower/src/main/java/com/hotent/chkpower/model/WDailyFunds.java @@ -0,0 +1,363 @@ +package com.hotent.chkpower.model; + +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.hotent.base.entity.BaseModel; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import com.baomidou.mybatisplus.annotation.TableId; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.TableField; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonProperty; +/** + * 每日资金 + * + * @company 广州宏天软件股份有限公司 + * @author cw + * @since 2024-07-08 + */ +@ApiModel(value="WDailyFunds对象", description="每日资金") +public class WDailyFunds extends BaseModel { + + private static final long serialVersionUID = 1L; + @ApiModelProperty(value = "主键") + @TableId(value = "ID_", type = IdType.ASSIGN_ID) + @JsonProperty("id") + private String id; + + @ApiModelProperty(value = "外键") + @TableField("REF_ID_") + @JsonProperty("refId") + private String refId; + + @ApiModelProperty(value = "日期") + @TableField("F_date") + @JsonProperty("fDate") + private LocalDateTime fDate; + + @ApiModelProperty(value = "公司") + @TableField("F_org_name") + @JsonProperty("fOrgName") + private String fOrgName; + + @ApiModelProperty(value = "公司id") + @TableField("F_org_id") + @JsonProperty("fOrgId") + private String fOrgId; + + @ApiModelProperty(value = "公司类型") + @TableField("F_org_type") + @JsonProperty("fOrgType") + private String fOrgType; + + @ApiModelProperty(value = "昨日余额") + @TableField("F_yesterday_account_balance") + @JsonProperty("fYesterdayAccountBalance") + private BigDecimal fYesterdayAccountBalance; + + @ApiModelProperty(value = "今日余额") + @TableField("F_today_account_balance") + @JsonProperty("fTodayAccountBalance") + private BigDecimal fTodayAccountBalance; + + @ApiModelProperty(value = "余额差额") + @TableField("F_account_balance_difference") + @JsonProperty("fAccountBalanceDifference") + private BigDecimal fAccountBalanceDifference; + + @ApiModelProperty(value = "今日净现金流") + @TableField("F_today_net_cash_flow") + @JsonProperty("fTodayNetCashFlow") + private BigDecimal fTodayNetCashFlow; + + @ApiModelProperty(value = "今日被冻结金额") + @TableField("F_today_freeze_amount") + @JsonProperty("fTodayFreezeAmount") + private BigDecimal fTodayFreezeAmount; + + @ApiModelProperty(value = "今日冻结上限") + @TableField("F_today_freezing") + @JsonProperty("fTodayFreezing") + private BigDecimal fTodayFreezing; + + @ApiModelProperty(value = "复核状态") + @TableField("F_insp_status_name") + @JsonProperty("fInspStatusName") + private String fInspStatusName; + + @ApiModelProperty(value = "复核时间") + @TableField("F_insp_time") + @JsonProperty("fInspTime") + private LocalDateTime fInspTime; + + @ApiModelProperty(value = "复核备注") + @TableField("F_insp_notes") + @JsonProperty("fInspNotes") + private String fInspNotes; + + @ApiModelProperty(value = "复核人") + @TableField("F_insp_by") + @JsonProperty("fInspBy") + private String fInspBy; + + @ApiModelProperty(value = "复核人id") + @TableField("F_insp_id") + @JsonProperty("fInspId") + private String fInspId; + + @ApiModelProperty(value = "创建人") + @TableField("F_create_by") + @JsonProperty("fCreateBy") + private String fCreateBy; + + @ApiModelProperty(value = "创建人id") + @TableField("F_create_id") + @JsonProperty("fCreateId") + private String fCreateId; + + @ApiModelProperty(value = "创建时间") + @TableField("F_create_time") + @JsonProperty("fCreateTime") + private LocalDateTime fCreateTime; + + @ApiModelProperty(value = "修改人") + @TableField("F_update_by") + @JsonProperty("fUpdateBy") + private String fUpdateBy; + + @ApiModelProperty(value = "修改人id") + @TableField("F_update_id") + @JsonProperty("fUpdateId") + private String fUpdateId; + + @ApiModelProperty(value = "修改时间") + @TableField("F_update_time") + @JsonProperty("fUpdateTime") + private LocalDateTime fUpdateTime; + + @ApiModelProperty(value = "表单数据版本") + @TableField("F_form_data_rev_") + @JsonProperty("fFormDataRev") + private Long fFormDataRev; + + @ApiModelProperty(value = "排序") + @TableField("F_order_no") + @JsonProperty("fOrderNo") + private BigDecimal fOrderNo; + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + public String getRefId() { + return refId; + } + + public void setRefId(String refId) { + this.refId = refId; + } + public LocalDateTime getFDate() { + return fDate; + } + + public void setFDate(LocalDateTime fDate) { + this.fDate = fDate; + } + public String getFOrgName() { + return fOrgName; + } + + public void setFOrgName(String fOrgName) { + this.fOrgName = fOrgName; + } + public String getFOrgId() { + return fOrgId; + } + + public void setFOrgId(String fOrgId) { + this.fOrgId = fOrgId; + } + public String getFOrgType() { + return fOrgType; + } + + public void setFOrgType(String fOrgType) { + this.fOrgType = fOrgType; + } + public BigDecimal getFYesterdayAccountBalance() { + return fYesterdayAccountBalance; + } + + public void setFYesterdayAccountBalance(BigDecimal fYesterdayAccountBalance) { + this.fYesterdayAccountBalance = fYesterdayAccountBalance; + } + public BigDecimal getFTodayAccountBalance() { + return fTodayAccountBalance; + } + + public void setFTodayAccountBalance(BigDecimal fTodayAccountBalance) { + this.fTodayAccountBalance = fTodayAccountBalance; + } + public BigDecimal getFAccountBalanceDifference() { + return fAccountBalanceDifference; + } + + public void setFAccountBalanceDifference(BigDecimal fAccountBalanceDifference) { + this.fAccountBalanceDifference = fAccountBalanceDifference; + } + public BigDecimal getFTodayNetCashFlow() { + return fTodayNetCashFlow; + } + + public void setFTodayNetCashFlow(BigDecimal fTodayNetCashFlow) { + this.fTodayNetCashFlow = fTodayNetCashFlow; + } + public BigDecimal getFTodayFreezeAmount() { + return fTodayFreezeAmount; + } + + public void setFTodayFreezeAmount(BigDecimal fTodayFreezeAmount) { + this.fTodayFreezeAmount = fTodayFreezeAmount; + } + public BigDecimal getFTodayFreezing() { + return fTodayFreezing; + } + + public void setFTodayFreezing(BigDecimal fTodayFreezing) { + this.fTodayFreezing = fTodayFreezing; + } + public String getFInspStatusName() { + return fInspStatusName; + } + + public void setFInspStatusName(String fInspStatusName) { + this.fInspStatusName = fInspStatusName; + } + public LocalDateTime getFInspTime() { + return fInspTime; + } + + public void setFInspTime(LocalDateTime fInspTime) { + this.fInspTime = fInspTime; + } + public String getFInspNotes() { + return fInspNotes; + } + + public void setFInspNotes(String fInspNotes) { + this.fInspNotes = fInspNotes; + } + public String getFInspBy() { + return fInspBy; + } + + public void setFInspBy(String fInspBy) { + this.fInspBy = fInspBy; + } + public String getFInspId() { + return fInspId; + } + + public void setFInspId(String fInspId) { + this.fInspId = fInspId; + } + public String getFCreateBy() { + return fCreateBy; + } + + public void setFCreateBy(String fCreateBy) { + this.fCreateBy = fCreateBy; + } + public String getFCreateId() { + return fCreateId; + } + + public void setFCreateId(String fCreateId) { + this.fCreateId = fCreateId; + } + public LocalDateTime getFCreateTime() { + return fCreateTime; + } + + public void setFCreateTime(LocalDateTime fCreateTime) { + this.fCreateTime = fCreateTime; + } + public String getFUpdateBy() { + return fUpdateBy; + } + + public void setFUpdateBy(String fUpdateBy) { + this.fUpdateBy = fUpdateBy; + } + public String getFUpdateId() { + return fUpdateId; + } + + public void setFUpdateId(String fUpdateId) { + this.fUpdateId = fUpdateId; + } + public LocalDateTime getFUpdateTime() { + return fUpdateTime; + } + + public void setFUpdateTime(LocalDateTime fUpdateTime) { + this.fUpdateTime = fUpdateTime; + } + public Long getFFormDataRev() { + return fFormDataRev; + } + + public void setFFormDataRev(Long fFormDataRev) { + this.fFormDataRev = fFormDataRev; + } + public BigDecimal getFOrderNo() { + return fOrderNo; + } + + public void setFOrderNo(BigDecimal fOrderNo) { + this.fOrderNo = fOrderNo; + } + + + @Override + protected Serializable pkVal() { + return this.id; + } + + @Override + public String toString() { + return "WDailyFunds{" + + "id=" + id + + ", refId=" + refId + + ", fDate=" + fDate + + ", fOrgName=" + fOrgName + + ", fOrgId=" + fOrgId + + ", fOrgType=" + fOrgType + + ", fYesterdayAccountBalance=" + fYesterdayAccountBalance + + ", fTodayAccountBalance=" + fTodayAccountBalance + + ", fAccountBalanceDifference=" + fAccountBalanceDifference + + ", fTodayNetCashFlow=" + fTodayNetCashFlow + + ", fTodayFreezeAmount=" + fTodayFreezeAmount + + ", fTodayFreezing=" + fTodayFreezing + + ", fInspStatusName=" + fInspStatusName + + ", fInspTime=" + fInspTime + + ", fInspNotes=" + fInspNotes + + ", fInspBy=" + fInspBy + + ", fInspId=" + fInspId + + ", fCreateBy=" + fCreateBy + + ", fCreateId=" + fCreateId + + ", fCreateTime=" + fCreateTime + + ", fUpdateBy=" + fUpdateBy + + ", fUpdateId=" + fUpdateId + + ", fUpdateTime=" + fUpdateTime + + ", fFormDataRev=" + fFormDataRev + + ", fOrderNo=" + fOrderNo + + "}"; + } +} diff --git a/backend/chkpower/src/main/resources/mapper/WCurrentMapper.xml b/backend/chkpower/src/main/resources/mapper/WCurrentMapper.xml index 59d6d96..8b9c9d8 100644 --- a/backend/chkpower/src/main/resources/mapper/WCurrentMapper.xml +++ b/backend/chkpower/src/main/resources/mapper/WCurrentMapper.xml @@ -107,7 +107,7 @@ LEFT JOIN ( SELECT F_org_id, F_org_name,SUM(F_account_balance) AS F_account_balance FROM w_current - WHERE F_date =#{fDate} + WHERE DATE(F_date) =DATE(#{fDate}) GROUP BY F_org_id, F_org_name ) YE ON YE.F_org_id = acc.F_org_id WHERE 1=1 diff --git a/backend/chkpower/src/main/resources/mapper/WDailyFundsMapper.xml b/backend/chkpower/src/main/resources/mapper/WDailyFundsMapper.xml new file mode 100644 index 0000000..88b0127 --- /dev/null +++ b/backend/chkpower/src/main/resources/mapper/WDailyFundsMapper.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ID_, REF_ID_, F_date, F_org_name, F_org_id, F_org_type, F_yesterday_account_balance, F_today_account_balance, F_account_balance_difference, F_today_net_cash_flow, F_today_freeze_amount, F_today_freezing, F_insp_status_name, F_insp_time, F_insp_notes, F_insp_by, F_insp_id, F_create_by, F_create_id, F_create_time, F_update_by, F_update_id, F_update_time, F_form_data_rev_, F_order_no + + + + + + + + + + INSERT into w_daily_funds(ID_,F_date,F_org_id,F_org_name,F_org_type,F_order_no,F_insp_status_name) + SELECT REPLACE(UUID(), '-', '') as ID_,DATE_FORMAT(#{fDate,jdbcType=TIMESTAMP}, '%Y-%m-%d 00:00:00') as F_date,org.ID_ as F_org_id,org.NAME_ as F_org_name,orgParams.VALUE_ as F_org_type,org.ORDER_NO_ as F_order_no,'待复核' as F_insp_status_name + FROM uc_org org + JOIN uc_org_params orgParams on orgParams.ORG_ID_= org.ID_ + + + + + + diff --git a/backend/chkpower/src/main/resources/mapper/WFinanceMapper.xml b/backend/chkpower/src/main/resources/mapper/WFinanceMapper.xml index 40f1e72..fe1326b 100644 --- a/backend/chkpower/src/main/resources/mapper/WFinanceMapper.xml +++ b/backend/chkpower/src/main/resources/mapper/WFinanceMapper.xml @@ -65,7 +65,7 @@ LEFT JOIN ( SELECT F_org_id,SUM(F_total_income) AS F_total_income,SUM(F_total_disbursement) AS F_total_disbursement,SUM(F_total_net_cash_flow) AS F_total_net_cash_flow FROM w_finance - WHERE F_date = #{fDate} + WHERE DATE(F_date) = DATE(#{fDate}) GROUP BY F_org_id ) JE ON JE.F_org_id = org.ID_ WHERE 1=1 -- libgit2 0.21.2