Просмотр исходного кода

[铜锣湾][修改][预账单]

release_toaliyun_real
luozukai 7 лет назад
committed by Stormeye Wu
Родитель
Сommit
5d932ba305
6 измененных файлов: 30 добавлений и 14 удалений
  1. +7
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
  2. +9
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java
  3. +3
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  4. +4
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  5. +2
    -1
      mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml
  6. +5
    -2
      mallinkService/src/main/resources/mapper/WxBillRentMapper.xml

+ 7
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java Просмотреть файл

@@ -93,17 +93,18 @@ public class WxFlowServiceImpl implements WxFlowService {
*/
@Override
public void updateBusinessStatus(Map<String, Object> mapInfo,Integer applyStatus){
Long businessId = Long.parseLong((String)mapInfo.get("businessId"));
Long businessId = Long.parseLong(mapInfo.get("businessId").toString());
Integer flowType = (Integer)mapInfo.get("flowType");
List<Map<String,Object>> variables = (List)mapInfo.get("variables");
Boolean supplement = (Boolean)mapInfo.get("supplement");
Integer contractType = 0;// 1租赁合同2点位合同3物业合同4点位物业合同
Integer contractType = 0;
String str = (String)getVariableByKey(variables,"contractType");
if(StringUtils.isNotBlank(str)){
contractType = Integer.parseInt(str);
}

if(1 == flowType){
// 1租赁合同 2点位合同 3物业 4点位物业合同
if(contractType.intValue() == 1 || contractType.intValue() == 2){
WxRentContract rent = new WxRentContract();
rent.setId(businessId);
@@ -177,7 +178,7 @@ public class WxFlowServiceImpl implements WxFlowService {
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class})
public ResultData start(Map<String, Object> params,Long userId,String userName,String tenantId) {
String remark = (String)params.get("remark");
Long businessId = Long.parseLong((String)params.get("businessId"));
Long businessId = Long.parseLong(params.get("businessId").toString());
Integer flowType = (Integer)params.get("businessType");
List<Map<String,String>> taskAssignee = (List)params.get("taskAssignee");
List<Map<String,Object>> variables = (List)params.get("variables");
@@ -438,7 +439,7 @@ public class WxFlowServiceImpl implements WxFlowService {
wxMsgValidationcode.setTenantId(tenantId);
MallUserInfo starter = (MallUserInfo)mapInfo.get("starter");
List<Map<String,String>> taskAssigneeList = (List)mapInfo.get("taskAssignee");
Long businessId = Long.parseLong((String)mapInfo.get("businessId"));
Long businessId = Long.parseLong(mapInfo.get("businessId").toString());

// 判断下个节点是否有设置审批人,没有,直接通过,有,发短信通知
if(!isEnded(processInstanceId)){
@@ -520,7 +521,7 @@ public class WxFlowServiceImpl implements WxFlowService {

Task task = taskService.createTaskQuery().processInstanceId(processInstanceId).singleResult();
Map<String,Object> mapInfo = taskService.getVariables(task.getId());
Long businessId = Long.parseLong((String)mapInfo.get("businessId"));
Long businessId = Long.parseLong(mapInfo.get("businessId").toString());
Integer flowType = (Integer)mapInfo.get("flowType");
MallUserInfo starter = (MallUserInfo)mapInfo.get("starter");

@@ -576,7 +577,7 @@ public class WxFlowServiceImpl implements WxFlowService {

Task task = taskService.createTaskQuery().processInstanceId(processInstanceId).singleResult();
Map<String,Object> mapInfo = taskService.getVariables(task.getId());
Long businessId = Long.parseLong((String)mapInfo.get("businessId"));
Long businessId = Long.parseLong(mapInfo.get("businessId").toString());
Integer flowType = (Integer)mapInfo.get("flowType");

String taskName;


+ 9
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java Просмотреть файл

@@ -315,8 +315,16 @@ public class WxMerchantServiceImpl implements WxMerchantService {
wxRentContract.setUpdatetime(new Date());
wxRentContract.setStatus(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode());
wxRentContractMapper.updateByPrimaryKeySelective(wxRentContract);

//预览账单改为正式,并写入商户id(租赁合同需要绑定商户才变成已签约)
WxBillRent billRent = new WxBillRent();
billRent.setRentContractId(wxMerchant.getRentContractId());
billRent.setIsPreview(EnumIsPreview.NO.getCode());
billRent.setMerchantId(merchantId);
wxBillRentMapper.updatePreviewStatus(billRent);

//创建账单
wxRentContractService.buildRent(wxMerchant, userId,null,EnumIsPreview.NO.getCode());
//wxRentContractService.buildRent(wxMerchant, userId,null,EnumIsPreview.NO.getCode());
//创建押金
wxRentContractService.buildDeposit(wxMerchant, userId);
}


+ 3
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java Просмотреть файл

@@ -316,10 +316,11 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
//wxBillProperty.setMerchantId(record.getMerchantId());
//List<Map<String, Object>> billPropertyList = wxBillPropertyMapper.queryBillPropertyList(wxBillProperty);
//if (billPropertyList.size() == 0) {
//预览账单改为正式
//预览账单改为正式,并写入商户id
WxBillProperty billProperty = new WxBillProperty();
billProperty.setPropertyContractId(id);
billProperty.setIsPreview(EnumIsPreview.YES.getCode());
billProperty.setIsPreview(EnumIsPreview.NO.getCode());
billProperty.setMerchantId(record.getMerchantId());
wxBillPropertyMapper.updatePreviewStatus(billProperty);

WxMerchant wxMerchant = new WxMerchant();


+ 4
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Просмотреть файл

@@ -969,11 +969,13 @@ public class WxRentContractServiceImpl implements WxRentContractService {
WxBillRent wxBillRent = new WxBillRent();
wxBillRent.setMerchantId(record.getMerchantId());

//预览账单改为正式
//预览账单改为正式,并写入商户id
WxBillRent billRent = new WxBillRent();
billRent.setRentContractId(id);
billRent.setIsPreview(EnumIsPreview.YES.getCode());
billRent.setIsPreview(EnumIsPreview.NO.getCode());
billRent.setMerchantId(record.getMerchantId());
wxBillRentMapper.updatePreviewStatus(billRent);

// List<Map<String, Object>> billRentList = wxBillRentMapper.queryBillRentList(wxBillRent);
// if (billRentList.size() == 0) {
WxMerchant wxMerchant = new WxMerchant();


+ 2
- 1
mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml Просмотреть файл

@@ -143,6 +143,7 @@
</update>

<update id="updatePreviewStatus" parameterType="com.iformall.domain.po.WxBillProperty">
update wx_bill_property set is_preview = #{isPreview} where property_contract_id = #{propertyContractId}
update wx_bill_property set is_preview = #{isPreview},merchant_id = #{merchantId}
where property_contract_id = #{propertyContractId}
</update>
</mapper>

+ 5
- 2
mallinkService/src/main/resources/mapper/WxBillRentMapper.xml Просмотреть файл

@@ -134,10 +134,13 @@
</delete>

<update id="update" parameterType="com.iformall.domain.po.WxBillRent">
update wx_bill_rent set receive_pay = #{receivePay} where id = #{id}
update wx_bill_rent set updatetime = now()
<if test=" null != receivePay ">,receive_pay = #{receivePay}</if>
where id = #{id}
</update>

<update id="updatePreviewStatus" parameterType="com.iformall.domain.po.WxBillRent">
update wx_bill_rent set is_preview = #{isPreview} where rent_contract_id = #{rentContractId}
update wx_bill_rent set is_preview = #{isPreview},merchant_id = #{merchantId}
where rent_contract_id = #{rentContractId}
</update>
</mapper>

Загрузка…
Отмена
Сохранить