重新制作卡支付合同

master
dalong306 3 years ago
parent 22e2d038b9
commit 1c145d82ca

@ -249,6 +249,17 @@ public class TestController {
sos.write(bos.toByteArray()); sos.write(bos.toByteArray());
sos.close(); sos.close();
} }
/**
*
*
* @param clientMoniker
* @param manager
* @throws Exception
*/
@ManagerMapping(value = "/{clientMoniker}/export/aggregate/card_agree_pdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR})
public void exportAggregateCardAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) throws Exception {
clientManager.getAggregateCardAgreeFileAgain(clientMoniker, manager);
}
public JSONObject getBankAccountByClientId(int client_id) { public JSONObject getBankAccountByClientId(int client_id) {
List<JSONObject> list = clientBankAccountMapper.clientBankAccounts(client_id); List<JSONObject> list = clientBankAccountMapper.clientBankAccounts(client_id);
@ -630,6 +641,113 @@ public class TestController {
} }
/**
*
*/
// @GetMapping(value = "/batch_update_wxsubmerchantId_other")
// public void batchUpdateWxSubmerchantIdForOther() {
// JSONObject clientJson = clientMapper.findClient(9);
// JSONObject wechatMcc = paymentChannelMccGoodMapper.findWechatPayMccByClientId(clientJson.getIntValue("client_id"));
// JSONObject clientConfig = clientConfigMapper.find(clientJson.getIntValue("client_id"));
// if(clientJson==null){
// logger.info("=========>没有查询到client:"+clientJson.getInteger("client_id"));
// return;
// }
// if(wechatMcc==null){
// logger.info("=========>没有查询到mcc:"+clientJson.getInteger("client_id"));
// return;
// }
// // company_name short_name industry company_phone contact_person contact_phone contact_email 这些字段不能为空
// if(TextUtils.isEmpty(clientJson.getString("short_name"))||
// TextUtils.isEmpty(clientJson.getString("industry"))||
// TextUtils.isEmpty(clientJson.getString("company_phone"))||
// TextUtils.isEmpty(clientJson.getString("contact_phone"))||
// TextUtils.isEmpty(clientJson.getString("contact_person"))||
// TextUtils.isEmpty(clientJson.getString("contact_email"))||
// TextUtils.isEmpty(wechatMcc.getString("mc_code"))){
// logger.error("=======>数据不完整clientid"+clientJson.getInteger("client_id")+"");
// return;
// }
//
// NewSubMerchantIdApply newSubMerchantIdApply=new NewSubMerchantIdApply();
// newSubMerchantIdApply.setMerchant_id(clientJson.getString("merchant_id"));
// newSubMerchantIdApply.setSub_mch_id(clientJson.getString("sub_merchant_id"));
//// newSubMerchantIdApply.setMerchantRemark(jsonObject.getString("merchant_remark"));
// newSubMerchantIdApply.setMerchant_name(cutLength("Pineapple Techology Pty Ltd",128));
// newSubMerchantIdApply.setAddress(cutLength(clientJson.getString("address"),128));
// newSubMerchantIdApply.setMerchant_shortname(cutLength(clientJson.getString("short_name"),64));
// newSubMerchantIdApply.setBusiness_category(clientJson.getString("industry"));
// newSubMerchantIdApply.setWebsite(cutLength(clientJson.getString("company_website"),100));
// newSubMerchantIdApply.setOffice_phone(cutLength(clientJson.getString("company_phone"),20));
// newSubMerchantIdApply.setContact_phone(cutLength(clientJson.getString("contact_phone"),16));
// newSubMerchantIdApply.setContact_name(cutLength(clientJson.getString("contact_person"),32));
// newSubMerchantIdApply.setContact_email(cutLength(clientJson.getString("contact_email"),50));
// newSubMerchantIdApply.setMcc_code(cutLength(wechatMcc.getString("mc_code"),10));
//
// if(!TextUtils.isEmpty(clientConfig.getString("client_pay_type"))){
// if(clientConfig.getString("client_pay_type").indexOf("1")>=0
// &&clientConfig.getString("client_pay_type").indexOf("2")>=0){
// newSubMerchantIdApply.setBusiness_type("BOTH");
// }else if(clientConfig.getString("client_pay_type").indexOf("1")>=0){
// newSubMerchantIdApply.setBusiness_type("ONLINE");
// }
// else if(clientConfig.getString("client_pay_type").indexOf("2")>=0){
// newSubMerchantIdApply.setBusiness_type("OFFLINE");
// }
// }else{
// newSubMerchantIdApply.setBusiness_type("BOTH");
// }
// if (!TextUtils.isEmpty(clientJson.getString("business_structure"))) {
// newSubMerchantIdApply.setMerchant_type(clientJson.getString("business_structure").equals("Registered body(Sole Trader)")?"INDIVIDUAL":"ENTERPRISE") ;
// }else{
// newSubMerchantIdApply.setMerchant_type("INDIVIDUAL") ;
// }
//
// newSubMerchantIdApply.setCompany_register_no(cutLength(TextUtils.isEmpty(clientJson.getString("acn"))?clientJson.getString("abn"):clientJson.getString("acn"),50));
// if (!TextUtils.isEmpty(clientJson.getString("certificat_expire_date"))) {
// newSubMerchantIdApply.setCertificat_expire_date(clientJson.getString("certificat_expire_date"));
// } else {
// newSubMerchantIdApply.setCertificat_expire_date("PERMANENT");
// }
//
//
// if("ENTERPRISE".equalsIgnoreCase(newSubMerchantIdApply.getMerchant_type())&&TextUtils.isEmpty(newSubMerchantIdApply.getCompany_register_no())){
// logger.error("=======>公司注册号为空clientid"+clientJson.getInteger("client_id")+":"+clientJson.getString("client_moniker"));
// return;
// }
// if("BOTH".equalsIgnoreCase(newSubMerchantIdApply.getBusiness_type())&&(TextUtils.isEmpty(newSubMerchantIdApply.getAddress())||
// TextUtils.isEmpty(newSubMerchantIdApply.getWebsite()))){
// logger.error("=======>公司类型为BOTH网址或地址为空clientid:"+clientJson.getInteger("client_id")+":"+clientJson.getString("client_moniker"));
// return;
// }
// else if("OFFLINE".equalsIgnoreCase(newSubMerchantIdApply.getBusiness_type())&&(TextUtils.isEmpty(newSubMerchantIdApply.getAddress()))){
// logger.error("=======>公司类型为OFFLINE地址为空clientid:"+clientJson.getInteger("client_id")+":"+clientJson.getString("client_moniker"));
// return;
// }
// else if("ONLINE".equalsIgnoreCase(newSubMerchantIdApply.getBusiness_type())&&
// TextUtils.isEmpty(newSubMerchantIdApply.getWebsite())){
// logger.error("=======>公司类型为ONLINE网址为空clientid:"+clientJson.getInteger("client_id")+":"+clientJson.getString("client_moniker"));
// return;
// }
// JSONObject params = newSubMerchantIdApply.insertObject(clientJson);
//// params.put("merchant_app_id", jsonObject.getString("merchant_app_id"));
// SubMerchantInfoInheritance subMerchantInfo = JSON.toJavaObject(params, SubMerchantInfoInheritance.class);
// params.put("operator","System");
//
// WxPayMerchantRegister register = Optional.ofNullable(merchantChannelApplicationManager.getRegister(WxPayMerchantRegister.class))
// .orElseThrow(() -> new ServerErrorException("No Register found for wechat"));
//
// JSONObject manager=new JSONObject();
// manager.put("display_name","System");
// register.modifyForBatch( clientJson, subMerchantInfo, manager);
// try {
// Thread.sleep(500);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
//
//
// }
public String cutLength(String str,int maxlen){ public String cutLength(String str,int maxlen){
if(TextUtils.isEmpty(str))return ""; if(TextUtils.isEmpty(str))return "";
if(str.length()>maxlen){ if(str.length()>maxlen){

@ -391,6 +391,8 @@ public interface ClientManager {
void getAggregateAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception; void getAggregateAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception;
void getAggregateCardAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception; void getAggregateCardAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception;
//重新制作卡支付合同
void getAggregateCardAgreeFileAgain(String clientMoniker, JSONObject manager) throws Exception;
void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal,String rateid,HttpServletResponse httpResponse); void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal,String rateid,HttpServletResponse httpResponse);

@ -3049,6 +3049,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
} }
@Override
@Transactional
public void getAggregateCardAgreeFileAgain(String clientMoniker, JSONObject manager) throws Exception {
logger.info("========>重新制作卡支付合同");
exportLetterOfferPDF(clientMoniker, manager);
logger.info("========>卡支付合同制作完成");
}
@Override @Override
@Transactional @Transactional
public void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal, String rateid, HttpServletResponse httpResponse) { public void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal, String rateid, HttpServletResponse httpResponse) {

Loading…
Cancel
Save