Browse Source

Merge branch 'develop' of https://git.youlane.cn/server/formallProject into develop

release_toaliyun_real
Burce 6 years ago
parent
commit
670839e4d9
3 changed files with 45 additions and 9 deletions
  1. +1
    -0
      mallinkAdmin/src/main/resources/db/migration/V201909031716__L_CONTRACT.sql
  2. +43
    -8
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java
  3. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java

+ 1
- 0
mallinkAdmin/src/main/resources/db/migration/V201909031716__L_CONTRACT.sql View File

@@ -0,0 +1 @@
update wx_flow_config set type=21 where name = '结算单审核';

+ 43
- 8
mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java View File

@@ -120,6 +120,9 @@ public class WxBillAllServiceImpl implements WxBillAllService {
@Autowired
WxBillSettleRecordService wxBillSettleRecordService;

@Autowired
WxBillSettleService wxBillSettleService;

@Override
public Map<String, Object> listAsPage(WxBillAll record, Integer pageIndex, Integer pageSize) {
//更新各账单状态
@@ -788,18 +791,50 @@ public class WxBillAllServiceImpl implements WxBillAllService {

@Override
public void exportSettleBill(WxBillSettle wxBillSettle, HttpServletRequest request, HttpServletResponse response) {
//商场名称
WxMall wxMall = wxMallMapper.getByTenantId(wxBillSettle.getTenantId());
wxBillSettle = wxBillSettleService.getById(wxBillSettle.getId());
if(wxBillSettle.getReceiveBillIds() == null) wxBillSettle.setReceiveBillIds(new ArrayList<>());
if(wxBillSettle.getPayBillIds() == null) wxBillSettle.setPayBillIds(new ArrayList<>());

//映射结果
Map<String, Object> result = new HashMap<>();
result.put("mall", wxMall.getName());

//编号
String number = "JF" + DateUtils.getSystemTime("yyyyMMddHHmmss");
result.put("number", number);

WxMall wxMall = wxMallMapper.getByTenantId(wxBillSettle.getTenantId());
result.put("mall", wxMall.getName());
result.put("merchant",wxMerchantMapper.selectByPrimaryKey(wxBillSettle.getMerchantId()).getName());
result.put("num", wxBillSettle.getSettleNumber());
result.put("cdate", DateUtils.format(wxBillSettle.getCreatetime()));

BigDecimal receiveM = (new BigDecimal(wxBillSettle.getReceiveMoney()).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP));
BigDecimal payM = (new BigDecimal(wxBillSettle.getPayMoney()).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP));
BigDecimal bM = (new BigDecimal(wxBillSettle.getBalance()).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP));
result.put("receiveM", receiveM.toString()+"元");
result.put("payM", payM.toString()+"元");
result.put("bM", bM.toString()+"元");
result.put("receiveMU", PriceUtil.digitUppercase(receiveM.doubleValue()));
result.put("payMU", PriceUtil.digitUppercase(payM.doubleValue()));
result.put("bMU", PriceUtil.digitUppercase(bM.doubleValue()));

List<Map<String,String>> rowsParams = new ArrayList<>();
int size = wxBillSettle.getReceiveBillIds().size() > wxBillSettle.getPayBillIds().size()?wxBillSettle.getReceiveBillIds().size():wxBillSettle.getPayBillIds().size();
int count = 1;
for (int i = 0; i < size ; i++) {
WxBillSettleBill bill = wxBillSettle.getReceiveBillIds().get(i);
Map<String,String> map = new HashedMap();
if(bill != null){
map.put("s1",count+"");
map.put("bn1",bill.getBillName());
map.put("money1",bill.getReceivePay());
}
WxBillSettleBill payBill = wxBillSettle.getPayBillIds().get(i);
if(payBill != null){
map.put("bn2",payBill.getBillName());
map.put("money2",payBill.getReceivePay());
}
rowsParams.add(map);
count++;
}

String templatePath = "contract-word-template/bill_owe.docx";
String templatePath = "contract-word-template/settle.docx";
String filepath = fmUploadDir;
String filename = UUID.randomUUID() + ".docx";
String exportFileName = "催缴单.docx";


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java View File

@@ -286,7 +286,7 @@ public class WxFlowServiceImpl implements WxFlowService {
WxBillSettle wxBillSettle = new WxBillSettle();
wxBillSettle.setId(businessId);
wxBillSettle.setApplyStatus(applyStatus);
wxBillSettleMapper.update(wxBillSettle);
wxBillSettleMapper.updateByPrimaryKeySelective(wxBillSettle);

//审批完成,账单解冻
if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) {


Loading…
Cancel
Save