Commit c31c9a06 by 陶光胜

代码规范

parent 29e75637
...@@ -59,7 +59,7 @@ public interface TabAppletCustomPageMapper { ...@@ -59,7 +59,7 @@ public interface TabAppletCustomPageMapper {
* @param record 实体对象 * @param record 实体对象
* @return 更新条目数 * @return 更新条目数
*/ */
int updateByPrimaryKeyWithBLOBs(TabAppletCustomPage record); int updateByPrimaryKeyWithBlobs(TabAppletCustomPage record);
/** /**
* 根据主键更新记录 * 根据主键更新记录
......
...@@ -58,7 +58,7 @@ public interface TabAppletPageComponentMapper { ...@@ -58,7 +58,7 @@ public interface TabAppletPageComponentMapper {
* @param record 实体对象 * @param record 实体对象
* @return 更新条目数 * @return 更新条目数
*/ */
int updateByPrimaryKeyWithBLOBs(TabAppletPageComponent record); int updateByPrimaryKeyWithBlobs(TabAppletPageComponent record);
/** /**
* 根据主键更新记录 * 根据主键更新记录
......
package com.gic.enterprise.entity; package com.gic.enterprise.entity;
import com.gic.commons.annotation.SkipNamingCheck;
import java.util.Date; import java.util.Date;
/** /**
...@@ -9,6 +11,7 @@ import java.util.Date; ...@@ -9,6 +11,7 @@ import java.util.Date;
* @author taogs * @author taogs
* @date 2020/9/11 15:46 * @date 2020/9/11 15:46
*/ */
@SkipNamingCheck
public class TabQrcodeDownload { public class TabQrcodeDownload {
/** /**
* *
......
...@@ -64,29 +64,6 @@ public class LinkServiceImpl implements LinkService { ...@@ -64,29 +64,6 @@ public class LinkServiceImpl implements LinkService {
return tabLinkMapper.updateByPrimaryKeySelective(tabLink); return tabLinkMapper.updateByPrimaryKeySelective(tabLink);
} }
// @Override
// public Integer saveLinkMenu(Integer parentId, String name, Integer type) {
// TabLink tabLink = new TabLink();
// tabLink.setCreateTime(new Date());
// tabLink.setParentId(parentId);
// tabLink.setStatus(Constants.NORMAL_STATUS);
// tabLink.setType(type);
// tabLink.setName(name);
// tabLink.setIsCustom(Constants.NORMAL_STATUS);
// tabLink.setEnterpriseType(LinkEnterpriseTypeEnum.ALL.getCode());
// tabLinkMapper.insertSelective(tabLink);
// return tabLink.getLinkId();
// }
//
// @Override
// public int updateLinkMenu(Integer linkId, String name, Integer type) {
// TabLink tabLink = new TabLink();
// tabLink.setLinkId(linkId);
// tabLink.setName(name);
// tabLink.setType(type);
// return tabLinkMapper.updateByPrimaryKeySelective(tabLink);
// }
@Override @Override
public void updateLinkMenu(LinkDTO linkDTO) { public void updateLinkMenu(LinkDTO linkDTO) {
TabLink tabLink = EntityUtil.changeEntityByJSON(TabLink.class, linkDTO); TabLink tabLink = EntityUtil.changeEntityByJSON(TabLink.class, linkDTO);
......
...@@ -120,11 +120,9 @@ public class CustomGuideApiServiceImpl implements CustomGuideApiService { ...@@ -120,11 +120,9 @@ public class CustomGuideApiServiceImpl implements CustomGuideApiService {
} else { } else {
themeStr = "tint-green"; themeStr = "tint-green";
} }
// networkTimeout
Map<String, Object> networkTimeoutMap = new HashMap<String, Object>(); Map<String, Object> networkTimeoutMap = new HashMap<String, Object>();
networkTimeoutMap.put("request", 20000); networkTimeoutMap.put("request", 20000);
networkTimeoutMap.put("downloadFile", 20000); networkTimeoutMap.put("downloadFile", 20000);
// tabBar
List<Map<String, Object>> tabBarList = new ArrayList<>(); List<Map<String, Object>> tabBarList = new ArrayList<>();
Set<String> pathSet = new HashSet<String>() ; Set<String> pathSet = new HashSet<String>() ;
String iconPath = "/images/footbar/"+themeStr+"/"; String iconPath = "/images/footbar/"+themeStr+"/";
...@@ -152,29 +150,42 @@ public class CustomGuideApiServiceImpl implements CustomGuideApiService { ...@@ -152,29 +150,42 @@ public class CustomGuideApiServiceImpl implements CustomGuideApiService {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "存在相同的路径"); return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "存在相同的路径");
} }
Map<String, Object> tabBar = new HashMap<String, Object>(); Map<String, Object> tabBar = new HashMap<String, Object>();
Map<String, Object> windowMap = new HashMap<String, Object>();
Map<String, Object> ext = new HashMap<String, Object>();
List<String> appIdList = new ArrayList<>() ;
buildMap(tabBar, windowMap, ext, tabBarList, response, appid, themeStr, maxVersion, enterpriseId, appIdList);
log.info("ext文件,enterpriseId={} , appid={}" , enterpriseId, appIdList);
ext.put("navigateToMiniProgramAppIdList", appIdList) ;
returnMap.put("extEnable", true);
returnMap.put("extAppid", appid);
returnMap.put("ext", ext);
returnMap.put("extPages", new HashMap<String, Object>());
returnMap.put("window", windowMap);
returnMap.put("tabBar", tabBar);
returnMap.put("networkTimeout", networkTimeoutMap);
returnMap.put("navigateToMiniProgramAppIdList", appIdList) ;
return ServiceResponse.success(returnMap);
}
private void buildMap(Map<String, Object> tabBar, Map<String, Object> windowMap, Map<String, Object> ext,
List<Map<String, Object>> tabBarList, ServiceResponse<EnterpriseDTO> response, String appid,
String themeStr, Integer maxVersion, Integer enterpriseId, List<String> appIdList){
tabBar.put("color", "#999999"); tabBar.put("color", "#999999");
tabBar.put("selectedColor", "#dabb7d"); tabBar.put("selectedColor", "#dabb7d");
tabBar.put("backgroundColor", "#ffffff"); tabBar.put("backgroundColor", "#ffffff");
tabBar.put("borderStyle", "black"); tabBar.put("borderStyle", "black");
tabBar.put("list", tabBarList); tabBar.put("list", tabBarList);
// window
Map<String, Object> windowMap = new HashMap<String, Object>();
windowMap.put("enablePullDownRefresh", false); windowMap.put("enablePullDownRefresh", false);
windowMap.put("backgroundTextStyle", "light"); windowMap.put("backgroundTextStyle", "light");
windowMap.put("navigationBarBackgroundColor", "#fff"); windowMap.put("navigationBarBackgroundColor", "#fff");
windowMap.put("navigationBarTitleText", response.getResult().getEnterpriseName()); windowMap.put("navigationBarTitleText", response.getResult().getEnterpriseName());
windowMap.put("navigationBarTextStyle", "black"); windowMap.put("navigationBarTextStyle", "black");
Map<String, Object> ext = new HashMap<String, Object>();
ext.put("name", response.getResult().getEnterpriseName()); ext.put("name", response.getResult().getEnterpriseName());
ext.put("appid", appid); ext.put("appid", appid);
ext.put("brandName", response.getResult().getEnterpriseName()); ext.put("brandName", response.getResult().getEnterpriseName());
ext.put("theme", themeStr); ext.put("theme", themeStr);
ext.put("tabBar", tabBar); ext.put("tabBar", tabBar);
ext.put("build", maxVersion); ext.put("build", maxVersion);
//
List<String> appIdList = new ArrayList<>() ;
ServiceResponse<Page<AppletAppDTO>> page = this.appletAppApiService.page(null, enterpriseId, 1, 1, 1, 1000); ServiceResponse<Page<AppletAppDTO>> page = this.appletAppApiService.page(null, enterpriseId, 1, 1, 1, 1000);
if(page.isSuccess() && page.getResult()!= null){ if(page.isSuccess() && page.getResult()!= null){
List<AppletAppDTO> wxaList = page.getResult().getResult(); List<AppletAppDTO> wxaList = page.getResult().getResult();
...@@ -189,17 +200,5 @@ public class CustomGuideApiServiceImpl implements CustomGuideApiService { ...@@ -189,17 +200,5 @@ public class CustomGuideApiServiceImpl implements CustomGuideApiService {
} }
} }
} }
log.info("ext文件,enterpriseId={} , appid={}" , enterpriseId, appIdList);
ext.put("navigateToMiniProgramAppIdList", appIdList) ;
// return
returnMap.put("extEnable", true);
returnMap.put("extAppid", appid);
returnMap.put("ext", ext);
returnMap.put("extPages", new HashMap<String, Object>());
returnMap.put("window", windowMap);
returnMap.put("tabBar", tabBar);
returnMap.put("networkTimeout", networkTimeoutMap);
returnMap.put("navigateToMiniProgramAppIdList", appIdList) ;
return ServiceResponse.success(returnMap);
} }
} }
...@@ -45,8 +45,8 @@ public class CustomStoreApiServiceImpl implements CustomStoreApiService { ...@@ -45,8 +45,8 @@ public class CustomStoreApiServiceImpl implements CustomStoreApiService {
public ServiceResponse<Page<CustomStoreDTO>> pageCustomStore(Integer enterpriseId, String search, String appid, Integer pageNum, Integer pageSize) { public ServiceResponse<Page<CustomStoreDTO>> pageCustomStore(Integer enterpriseId, String search, String appid, Integer pageNum, Integer pageSize) {
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
com.github.pagehelper.Page<TabCustomStore> page = this.customStoreService.pageCustomStore(search, enterpriseId, appid); com.github.pagehelper.Page<TabCustomStore> page = this.customStoreService.pageCustomStore(search, enterpriseId, appid);
Page<CustomStoreDTO> storeDTOPage = PageHelperUtils.changePageHelperToCurrentPage(page, CustomStoreDTO.class); Page<CustomStoreDTO> storePage = PageHelperUtils.changePageHelperToCurrentPage(page, CustomStoreDTO.class);
return ServiceResponse.success(storeDTOPage); return ServiceResponse.success(storePage);
} }
......
...@@ -109,7 +109,7 @@ public class DoubleCallingApiServiceImpl implements DoubleCallingApiService { ...@@ -109,7 +109,7 @@ public class DoubleCallingApiServiceImpl implements DoubleCallingApiService {
billingAccountService.deductAccountByCache(doubleCallingRecordDTO.getFee(), doubleCallingRecordDTO.getEnterpriseId()); billingAccountService.deductAccountByCache(doubleCallingRecordDTO.getFee(), doubleCallingRecordDTO.getEnterpriseId());
// 队列 // 队列
// client.sendMessage("doubleCallDealDbMq", arg); // client.sendMessage("doubleCallDealDbMq", arg);
this.executeDatabase2(arg); this.executeDatabaseTwo(arg);
} catch (Exception e) { } catch (Exception e) {
logger.warn("调用mq失败", e); logger.warn("调用mq失败", e);
} }
...@@ -147,7 +147,7 @@ public class DoubleCallingApiServiceImpl implements DoubleCallingApiService { ...@@ -147,7 +147,7 @@ public class DoubleCallingApiServiceImpl implements DoubleCallingApiService {
return ServiceResponse.success(); return ServiceResponse.success();
} }
public ServiceResponse<Void> executeDatabase2(String arg) { public ServiceResponse<Void> executeDatabaseTwo(String arg) {
logger.info("执行双向呼叫计费:{}", arg); logger.info("执行双向呼叫计费:{}", arg);
DoubleCallingRecordDTO doubleCallingRecordDTO = JSON.parseObject(arg, DoubleCallingRecordDTO.class); DoubleCallingRecordDTO doubleCallingRecordDTO = JSON.parseObject(arg, DoubleCallingRecordDTO.class);
doubleCallingRecordDTO.setPaySerialNumber(CreateRandomUtils.createSerialNumber()); doubleCallingRecordDTO.setPaySerialNumber(CreateRandomUtils.createSerialNumber());
......
...@@ -571,9 +571,9 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService { ...@@ -571,9 +571,9 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
params.getEnterpriseId(), params.getOperName(), params.getOrderType(), params.getStatus()); params.getEnterpriseId(), params.getOperName(), params.getOrderType(), params.getStatus());
if (list.isSuccess()) { if (list.isSuccess()) {
Page<OrderGicHbDTO> page1 = list.getResult(); Page<OrderGicHbDTO> orderGicHbPage = list.getResult();
resultPage = EntityUtil.changeEntityNew(Page.class, page1); resultPage = EntityUtil.changeEntityNew(Page.class, orderGicHbPage);
List<OrderGicDTO> orderGicDTOList = EntityUtil.changeEntityListNew(OrderGicDTO.class, page1.getResult()); List<OrderGicDTO> orderGicDTOList = EntityUtil.changeEntityListNew(OrderGicDTO.class, orderGicHbPage.getResult());
resultPage.setResult(orderGicDTOList); resultPage.setResult(orderGicDTOList);
} }
return ServiceResponse.success(resultPage); return ServiceResponse.success(resultPage);
......
...@@ -22,7 +22,7 @@ import com.gic.log.api.dto.SystemSetLogDTO; ...@@ -22,7 +22,7 @@ import com.gic.log.api.dto.SystemSetLogDTO;
import com.gic.log.api.service.LogApiService; import com.gic.log.api.service.LogApiService;
import com.gic.marketing.process.api.service.sms.SmsSendApiService; import com.gic.marketing.process.api.service.sms.SmsSendApiService;
import com.gic.thirdparty.api.dto.ScanPayReqDataDTO; import com.gic.thirdparty.api.dto.ScanPayReqDataDTO;
import com.gic.thirdparty.api.service.Pay4WXService; import com.gic.thirdparty.api.service.Pay4WxService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
...@@ -43,7 +43,7 @@ public class WxPayStrategy implements PayStrategy { ...@@ -43,7 +43,7 @@ public class WxPayStrategy implements PayStrategy {
private Logger logger = LogManager.getLogger(WxPayStrategy.class); private Logger logger = LogManager.getLogger(WxPayStrategy.class);
@Autowired @Autowired
private Pay4WXService pay4WxService; private Pay4WxService pay4WxService;
@Autowired @Autowired
private BillingPayInfoService billingPayInfoService; private BillingPayInfoService billingPayInfoService;
@Autowired @Autowired
...@@ -134,9 +134,9 @@ public class WxPayStrategy implements PayStrategy { ...@@ -134,9 +134,9 @@ public class WxPayStrategy implements PayStrategy {
case 2: case 2:
// 短信套餐包购买 // 短信套餐包购买
this.billingOrderService.updateBySerialNumber(billingPayInfo.getOrderSerialNumber(), resData.getTotalFeePaid(), BillingAuditStatusEnum.PASS.getCode(), resData.getTimeEnd()); this.billingOrderService.updateBySerialNumber(billingPayInfo.getOrderSerialNumber(), resData.getTotalFeePaid(), BillingAuditStatusEnum.PASS.getCode(), resData.getTimeEnd());
TabBillingRechargeRecord rechargeRecord2 = billingRechargeRecordService.getRechargeRecordBySerialNumber(billingPayInfo.getOrderSerialNumber()); TabBillingRechargeRecord tabBillingRechargeRecord = billingRechargeRecordService.getRechargeRecordBySerialNumber(billingPayInfo.getOrderSerialNumber());
UserDTO userDto2 = userApiService.getUserById(rechargeRecord2.getInitiatorUser()).getResult(); UserDTO user = userApiService.getUserById(tabBillingRechargeRecord.getInitiatorUser()).getResult();
createLog("支付", "订单内容", userDto2); createLog("支付", "订单内容", user);
break; break;
default: default:
break; break;
...@@ -164,7 +164,7 @@ public class WxPayStrategy implements PayStrategy { ...@@ -164,7 +164,7 @@ public class WxPayStrategy implements PayStrategy {
"", "",
"NATIVE" "NATIVE"
); );
ServiceResponse<String> serviceResponse = pay4WxService.createPrePaymentOrderForWX(scanPayReqDataDTO); ServiceResponse<String> serviceResponse = pay4WxService.createPrePaymentOrderForWx(scanPayReqDataDTO);
if (serviceResponse.isSuccess()) { if (serviceResponse.isSuccess()) {
// 生成支付记录 // 生成支付记录
BillingPayInfoDTO billingPayInfoDTO = new BillingPayInfoDTO(); BillingPayInfoDTO billingPayInfoDTO = new BillingPayInfoDTO();
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<dubbo:service interface="com.gic.enterprise.service.BillingOrderApiService" ref="billingOrderApiService" timeout="60000" /> <dubbo:service interface="com.gic.enterprise.service.BillingOrderApiService" ref="billingOrderApiService" timeout="60000" />
<!--微信支付--> <!--微信支付-->
<dubbo:reference interface="com.gic.thirdparty.api.service.Pay4WXService" id="pay4WXService" timeout="6000" /> <dubbo:reference interface="com.gic.thirdparty.api.service.Pay4WxService" id="pay4WxService" timeout="6000" />
<!--卡券--> <!--卡券-->
<dubbo:service interface="com.gic.enterprise.service.BillingCouponCardApiService" ref="billingCouponCardApiService" timeout="6000" /> <dubbo:service interface="com.gic.enterprise.service.BillingCouponCardApiService" ref="billingCouponCardApiService" timeout="6000" />
......
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
</set> </set>
where page_id = #{pageId,jdbcType=INTEGER} where page_id = #{pageId,jdbcType=INTEGER}
</update> </update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.gic.enterprise.entity.TabAppletCustomPage"> <update id="updateByPrimaryKeyWithBlobs" parameterType="com.gic.enterprise.entity.TabAppletCustomPage">
update tab_applet_custom_page update tab_applet_custom_page
set enterprise_id = #{enterpriseId,jdbcType=INTEGER}, set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR}, title = #{title,jdbcType=VARCHAR},
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
</set> </set>
where component_id = #{componentId,jdbcType=INTEGER} where component_id = #{componentId,jdbcType=INTEGER}
</update> </update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.gic.enterprise.entity.TabAppletPageComponent"> <update id="updateByPrimaryKeyWithBlobs" parameterType="com.gic.enterprise.entity.TabAppletPageComponent">
update tab_applet_page_component update tab_applet_page_component
set enterprise_id = #{enterpriseId,jdbcType=INTEGER}, set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
page_id = #{pageId,jdbcType=INTEGER}, page_id = #{pageId,jdbcType=INTEGER},
......
...@@ -348,20 +348,20 @@ public class QrcodeController { ...@@ -348,20 +348,20 @@ public class QrcodeController {
logger.warn("e", e1); logger.warn("e", e1);
} }
} }
}).start(); });
} }
private byte[] createFwhQrcode(Integer qrCodeId, int type, String appkey, Date endTime, String title, UserDetail userDetail){ private byte[] createFwhQrcode(Integer qrCodeId, int type, String appkey, Date endTime, String title, UserDetail userDetail){
ServiceResponse<String> qRcodeURL = null; ServiceResponse<String> qRcodeUrl = null;
if(type == 1){ if(type == 1){
int expireSecond = Integer.valueOf((endTime.getTime() - System.currentTimeMillis())/1000+""); int expireSecond = Integer.valueOf((endTime.getTime() - System.currentTimeMillis())/1000+"");
qRcodeURL = this.weixinBaseFunService.getTemporaryQRcodeURL(appkey, qrCodeId + "", expireSecond); qRcodeUrl = this.weixinBaseFunService.getTemporaryQRcodeURL(appkey, qrCodeId + "", expireSecond);
}else { }else {
qRcodeURL = this.weixinBaseFunService.getQRcodeURL(appkey, qrCodeId + ""); qRcodeUrl = this.weixinBaseFunService.getQRcodeURL(appkey, qrCodeId + "");
} }
if(qRcodeURL.isSuccess()){ if(qRcodeUrl.isSuccess()){
return QrcodeUtils.createQrcode(qRcodeURL.getResult(), userDetail.getEnterpriseInfo().getLogo(), title); return QrcodeUtils.createQrcode(qRcodeUrl.getResult(), userDetail.getEnterpriseInfo().getLogo(), title);
} }
return null; return null;
} }
...@@ -383,13 +383,13 @@ public class QrcodeController { ...@@ -383,13 +383,13 @@ public class QrcodeController {
if(scenes.isSuccess() && scenes.getResult() != null){ if(scenes.isSuccess() && scenes.getResult() != null){
List<QrcodeScenesDTO> result = scenes.getResult().getResult(); List<QrcodeScenesDTO> result = scenes.getResult().getResult();
if(CollectionUtils.isNotEmpty(result)){ if(CollectionUtils.isNotEmpty(result)){
for(QrcodeScenesDTO dto1 : result){ for(QrcodeScenesDTO scenesDTO : result){
if(dto.getId().intValue() == dto1.getScenesClassifyId().intValue()){ if(dto.getId().intValue() == scenesDTO.getScenesClassifyId().intValue()){
JSONObject scenesJSON = new JSONObject(); JSONObject scenesJson = new JSONObject();
scenesJSON.put("id", dto1.getScenesId()); scenesJson.put("id", scenesDTO.getScenesId());
scenesJSON.put("name", dto1.getScenesName()); scenesJson.put("name", scenesDTO.getScenesName());
scenesJSON.put("children", this.getScenesValueData(dto1, valueResponse)); scenesJson.put("children", this.getScenesValueData(scenesDTO, valueResponse));
scenesArr.add(scenesJSON); scenesArr.add(scenesJson);
} }
} }
} }
...@@ -404,11 +404,11 @@ public class QrcodeController { ...@@ -404,11 +404,11 @@ public class QrcodeController {
if(CollectionUtils.isNotEmpty(valueList)){ if(CollectionUtils.isNotEmpty(valueList)){
for(QrcodeScenesValueDTO valueDTO : valueList){ for(QrcodeScenesValueDTO valueDTO : valueList){
if(valueDTO.getScenesId().intValue() == dto1.getScenesId().intValue()){ if(valueDTO.getScenesId().intValue() == dto1.getScenesId().intValue()){
JSONObject valueJSON = new JSONObject(); JSONObject valueJson = new JSONObject();
valueJSON.put("id", valueDTO.getValueId()); valueJson.put("id", valueDTO.getValueId());
valueJSON.put("name", valueDTO.getName()); valueJson.put("name", valueDTO.getName());
valueJSON.put("children", new JSONArray()); valueJson.put("children", new JSONArray());
valueArr.add(valueJSON); valueArr.add(valueJson);
} }
} }
} }
......
...@@ -121,17 +121,125 @@ public class DoubleCallingRecordController extends DownloadUtils { ...@@ -121,17 +121,125 @@ public class DoubleCallingRecordController extends DownloadUtils {
} }
private enum DoubleCallingFieldEnum{ private enum DoubleCallingFieldEnum{
/**
* 扣费时间
* @Title:
* @Description:
* @author taogs
* @param null
* @return
* @throws
*/
deductionTime("deductionTime", "扣费时间", 0), deductionTime("deductionTime", "扣费时间", 0),
/**
* 支付流水号
* @Title:
* @Description:
* @author taogs
* @param null
* @return
* @throws
*/
paySerialNumber("paySerialNumber", "支付流水号", 0), paySerialNumber("paySerialNumber", "支付流水号", 0),
/**
* 主叫名称
* @Title:
* @Description:
* @author taogs
* @param null
* @return
* @throws
*/
callerName("callerName", "主叫名称", 0), callerName("callerName", "主叫名称", 0),
/**
* 主叫号码
* @Title:
* @Description:
* @author taogs
* @param null
* @return
* @throws
*/
callerPhone("callerPhone", "主叫号码", 1), callerPhone("callerPhone", "主叫号码", 1),
/**
* 被叫号码
* @Title:
* @Description:
* @author taogs
* @param null
* @return
* @throws
*/
calledPhone("calledPhone", "被叫号码", 1), calledPhone("calledPhone", "被叫号码", 1),
/**
* 服务门店
* @Title:
* @Description:
* @author taogs
* @param null
* @return
* @throws
*/
storeName("storeName", "服务门店", 0), storeName("storeName", "服务门店", 0),
/**
* 门店分组
* @Title:
* @Description:
* @author taogs
* @param null
* @return
* @throws
*/
storeGroupName("storeGroupName", "门店分组", 0), storeGroupName("storeGroupName", "门店分组", 0),
/**
* 呼叫时间
* @Title:
* @Description:
* @author taogs
* @param null
* @return
* @throws
*/
callTime("callTime", "呼叫时间", 0), callTime("callTime", "呼叫时间", 0),
/**
* 通话时间
* @Title:
* @Description:
* @author taogs
* @param null
* @return
* @throws
*/
voiceTime("voiceTime", "通话时间", 0), voiceTime("voiceTime", "通话时间", 0),
/**
* 应用
* @Title:
* @Description:
* @author taogs
* @param null
* @return
* @throws
*/
appName("appName", "应用", 0), appName("appName", "应用", 0),
/**
* 说明
* @Title:
* @Description:
* @author taogs
* @param null
* @return
* @throws
*/
remark("remark", "说明", 0), remark("remark", "说明", 0),
/**
* 费用
* @Title:
* @Description:
* @author taogs
* @param null
* @return
* @throws
*/
fee("fee", "费用", 0), fee("fee", "费用", 0),
; ;
private String fieldCode; private String fieldCode;
......
...@@ -122,21 +122,69 @@ public class InternationalSmsRecordController extends DownloadUtils { ...@@ -122,21 +122,69 @@ public class InternationalSmsRecordController extends DownloadUtils {
} }
private enum InternationalSmsFieldEnum { private enum InternationalSmsFieldEnum {
/**
* 扣费时间
*/
deductionTime("deductionTime", "扣费时间", 0), deductionTime("deductionTime", "扣费时间", 0),
/**
* 国家(或地区)
*/
nation_code("nation_code", "国家(或地区)", 0), nation_code("nation_code", "国家(或地区)", 0),
/**
* 国家(或地区)码
*/
nation_name("nation_name", "国家(或地区)码", 0), nation_name("nation_name", "国家(或地区)码", 0),
/**
* 支付流水号
*/
paySerialNumber("paySerialNumber", "支付流水号", 0), paySerialNumber("paySerialNumber", "支付流水号", 0),
/**
* 条数
*/
billNumber("billNumber", "条数", 0), billNumber("billNumber", "条数", 0),
/**
* 费用
*/
fee("fee", "费用", 0), fee("fee", "费用", 0),
/**
* 接收手机号
*/
receivePhone("receivePhone", "接收手机号", 1), receivePhone("receivePhone", "接收手机号", 1),
/**
* 会员卡
*/
memberCardName("memberCardName", "会员卡", 0), memberCardName("memberCardName", "会员卡", 0),
/**
* 会员姓名
*/
memberName("memberName", "会员姓名", 0), memberName("memberName", "会员姓名", 0),
/**
* 服务门店
*/
storeName("storeName", "服务门店", 0), storeName("storeName", "服务门店", 0),
/**
* 门店分组
*/
storeGroupName("storeGroupName", "门店分组", 0), storeGroupName("storeGroupName", "门店分组", 0),
/**
* 店招品牌
*/
storeBrandName("storeBrandName", "店招品牌", 0), storeBrandName("storeBrandName", "店招品牌", 0),
/**
* 支付方式
*/
payType("payType", "支付方式", 0), payType("payType", "支付方式", 0),
/**
* 应用
*/
appName("appName", "应用", 0), appName("appName", "应用", 0),
/**
* 短信内容
*/
smsContent("smsContent", "短信内容", 0), smsContent("smsContent", "短信内容", 0),
/**
* 操作人
*/
userName("userName", "操作人", 0), userName("userName", "操作人", 0),
; ;
private String fieldCode; private String fieldCode;
......
...@@ -121,18 +121,57 @@ public class RecordingStorageRecordController extends DownloadUtils { ...@@ -121,18 +121,57 @@ public class RecordingStorageRecordController extends DownloadUtils {
} }
private enum RecordingStorageFieldEnum{ private enum RecordingStorageFieldEnum{
/**
* 扣费时间
*/
deductionTime("deductionTime", "扣费时间", 0), deductionTime("deductionTime", "扣费时间", 0),
/**
* 支付流水号
*/
paySerialNumber("paySerialNumber", "支付流水号", 0), paySerialNumber("paySerialNumber", "支付流水号", 0),
/**
* 录音存储时长
*/
storageDuration("storageDuration", "录音存储时长", 0), storageDuration("storageDuration", "录音存储时长", 0),
/**
* 主叫姓名
*/
callerName("callerName", "主叫姓名", 0), callerName("callerName", "主叫姓名", 0),
/**
* 主叫号码
*/
callerPhone("callerPhone", "主叫号码", 1), callerPhone("callerPhone", "主叫号码", 1),
/**
* 被叫号码
*/
calledPhone("calledPhone", "被叫号码", 1), calledPhone("calledPhone", "被叫号码", 1),
/**
* 服务门店
*/
storeName("storeName", "服务门店", 0), storeName("storeName", "服务门店", 0),
/**
* 门店分组
*/
storeGroupName("storeGroupName", "门店分组", 0), storeGroupName("storeGroupName", "门店分组", 0),
/**
* 呼叫时间
*/
callTime("callTime", "呼叫时间", 0), callTime("callTime", "呼叫时间", 0),
/**
* 通话时间
*/
voiceTime("voiceTime", "通话时间", 0), voiceTime("voiceTime", "通话时间", 0),
/**
* 应用
*/
appName("appName", "应用", 0), appName("appName", "应用", 0),
/**
* 说明
*/
remark("remark", "说明", 0), remark("remark", "说明", 0),
/**
* 费用
*/
fee("fee", "费用", 0), fee("fee", "费用", 0),
; ;
private String fieldCode; private String fieldCode;
......
...@@ -131,15 +131,45 @@ public class SmsPackageRecordController extends DownloadUtils { ...@@ -131,15 +131,45 @@ public class SmsPackageRecordController extends DownloadUtils {
} }
private enum SmsPackageFieldEnum{ private enum SmsPackageFieldEnum{
/**
* 扣费时间
*/
deductionTime("deductionTime", "扣费时间", 0), deductionTime("deductionTime", "扣费时间", 0),
/**
* 产品信息
*/
productName("productName", "产品信息", 0), productName("productName", "产品信息", 0),
/**
* 单价
*/
itemFee("itemFee", "单价", 0), itemFee("itemFee", "单价", 0),
/**
* 数量
*/
itemCount("itemCount", "数量", 0), itemCount("itemCount", "数量", 0),
/**
* 应付金额
*/
totalFee("totalFee", "应付金额", 0), totalFee("totalFee", "应付金额", 0),
/**
* 优惠方式
*/
discountTypeName("discountTypeName", "优惠方式", 0), discountTypeName("discountTypeName", "优惠方式", 0),
/**
* 优惠券名称
*/
cardName("cardName", "优惠券名称", 0), cardName("cardName", "优惠券名称", 0),
/**
* 优惠金额
*/
cardAmount("cardAmount", "优惠金额", 0), cardAmount("cardAmount", "优惠金额", 0),
/**
* 实付金额
*/
paidFee("paidFee", "实付金额", 0), paidFee("paidFee", "实付金额", 0),
/**
* 操作人
*/
operatorName("operatorName", "操作人", 0), operatorName("operatorName", "操作人", 0),
; ;
private String fieldCode; private String fieldCode;
......
...@@ -123,19 +123,58 @@ public class SmsRecordController extends DownloadUtils { ...@@ -123,19 +123,58 @@ public class SmsRecordController extends DownloadUtils {
} }
private enum SmsFieldEnum { private enum SmsFieldEnum {
/**
* 扣费时间
*/
deductionTime("deductionTime", "扣费时间", 0), deductionTime("deductionTime", "扣费时间", 0),
/**
* 支付流水号
*/
paySerialNumber("paySerialNumber", "支付流水号", 0), paySerialNumber("paySerialNumber", "支付流水号", 0),
/**
* 条数
*/
billNumber("billNumber", "条数", 0), billNumber("billNumber", "条数", 0),
fee("fee", "费用", 0), fee("fee", "费用", 0),
/**
* 接收手机号
*/
receivePhone("receivePhone", "接收手机号", 1), receivePhone("receivePhone", "接收手机号", 1),
/**
* 会员卡
*/
memberCardName("memberCardName", "会员卡", 0), memberCardName("memberCardName", "会员卡", 0),
/**
* 会员姓名
*/
memberName("memberName", "会员姓名", 0), memberName("memberName", "会员姓名", 0),
/**
* 服务门店
*/
storeName("storeName", "服务门店", 0), storeName("storeName", "服务门店", 0),
/**
* 门店分组
*/
storeGroupName("storeGroupName", "门店分组", 0), storeGroupName("storeGroupName", "门店分组", 0),
/**
* 店招品牌
*/
storeBrandName("storeBrandName", "店招品牌", 0), storeBrandName("storeBrandName", "店招品牌", 0),
/**
* 支付方式
*/
payType("payType", "支付方式", 0), payType("payType", "支付方式", 0),
/**
* 应用
*/
appName("appName", "应用", 0), appName("appName", "应用", 0),
/**
* 短信内容
*/
smsContent("smsContent", "短信内容", 0), smsContent("smsContent", "短信内容", 0),
/**
* 操作人
*/
userName("userName", "操作人", 0), userName("userName", "操作人", 0),
; ;
private String fieldCode; private String fieldCode;
......
...@@ -121,13 +121,37 @@ public class VoiceCodeRecordController extends DownloadUtils { ...@@ -121,13 +121,37 @@ public class VoiceCodeRecordController extends DownloadUtils {
} }
private enum VoiceCodeFieldEnum{ private enum VoiceCodeFieldEnum{
/**
* 扣费时间
*/
deductionTime("deductionTime", "扣费时间", 0), deductionTime("deductionTime", "扣费时间", 0),
/**
* 支付流水号
*/
paySerialNumber("paySerialNumber", "支付流水号", 0), paySerialNumber("paySerialNumber", "支付流水号", 0),
/**
* 接收号码
*/
receivePhone("receivePhone", "接收号码", 1), receivePhone("receivePhone", "接收号码", 1),
/**
* 应用
*/
appName("appName", "应用", 0), appName("appName", "应用", 0),
/**
* 费用
*/
fee("fee", "费用", 0), fee("fee", "费用", 0),
/**
* 会员姓名
*/
memberName("memberName", "会员姓名", 0), memberName("memberName", "会员姓名", 0),
/**
* 服务门店
*/
storeName("storeName", "服务门店", 0), storeName("storeName", "服务门店", 0),
/**
* 门店分组
*/
storeGroupName("storeGroupName", "门店分组", 0), storeGroupName("storeGroupName", "门店分组", 0),
; ;
private String fieldCode; private String fieldCode;
......
...@@ -607,80 +607,14 @@ public class WmStoreSyncController { ...@@ -607,80 +607,14 @@ public class WmStoreSyncController {
public void run() { public void run() {
try { try {
if (oneAndOne) { if (oneAndOne) {
RedissonClient redisClient = RedisUtil.getRedisClient(); this.setOneAndOne();
RMap<String, String> rMap = redisClient.getMap(REDIS_KEY + enterpriseId);
for (Map<Integer, String> row : data) {
String regionName = row.get(0);
String storeCode = row.get(1);
StoreRegionDTO storeRegion = getStoreRegion(enterpriseId, regionName);
if (storeRegion == null) {
rMap.put(regionName + "-" + storeCode, "门店域不存在");
continue;
}
StoreDTO storeDTO = getStoreByRegionAndCode(enterpriseId, storeRegion.getRegionId(), storeCode);
if (storeDTO == null) {
rMap.put(regionName + "-" + storeCode, "门店code不存在");
continue;
}
List<WeimobPhysicalStoreDTO> list = new ArrayList<>(1);
WeimobPhysicalStoreDTO obj = getWeimobPhsicalStore(storeDTO);
if (obj != null) {
ServiceResponse<Boolean> existStoreResponse = this.weimobStoreSiteService.existWeimobPhysicalStore(wmMallStoreId,
enterpriseId, storeDTO.getStoreInfoId());
if (existStoreResponse.isSuccess()) {
if (!existStoreResponse.getResult()) {
list.add(obj);
}
}
}
if (CollectionUtils.isEmpty(list)) {
//同步过的记录日志,不能再次同步
this.wmStoreSyncLogApiService.saveWmStoreSyncLog(Arrays.asList(storeDTO.getStoreId()),
wmMallStoreId, 2, enterpriseId);
// 导购同步
rMap.put(regionName + "-" + storeCode, "微盟侧已存在");
clerkApiService.syncClerkToWeimob(wmMallStoreId, Arrays.asList(storeDTO.getStoreId()), enterpriseId);
} else {
LOGGER.info("实体门店同步到微盟的参数:{}", JSON.toJSONString(list));
ServiceResponse<List<Integer>> weimobResult = this.weimobStoreSiteService
.addWeimobPhysicalStoreBatch(wmMallStoreId, enterpriseId, list);
LOGGER.info("实体门店批量到微盟结果:{}", JSON.toJSONString(weimobResult));
if (!weimobResult.isSuccess()) {
HashMap<Integer, String> map = JSON.parseObject(weimobResult.getMessage(), HashMap.class);
StringBuilder errorIds = new StringBuilder();
Map<String, String> errorMessage = new HashMap<>(16);
for (Map.Entry<Integer, String> entry : map.entrySet()) {
errorIds.append(entry.getKey()).append(GlobalInfo.FLAG_COMMA);
errorMessage.put(entry.getKey().toString(), entry.getValue());
}
//因为是一条一条处理,所以失败了,就不会有成功的,不用 导购同步逻辑
List<StoreDTO> hasSuccessStoreList = getStoreList(errorIds.toString(), enterpriseId);
hasSuccessStoreList.forEach(e -> rMap.put(e.getRegionId() + "-" + e.getStoreCode(),
errorMessage.get(storeDTO.getStoreInfoId().toString())));
} else {
rMap.put(regionName + "-" + storeCode, "成功");
//同步过的记录日志,不能再次同步
this.wmStoreSyncLogApiService.saveWmStoreSyncLog(Arrays.asList(storeDTO.getStoreId()),
wmMallStoreId, 2, enterpriseId);
// 导购同步
clerkApiService.syncClerkToWeimob(wmMallStoreId, Arrays.asList(storeDTO.getStoreId()), enterpriseId);
}
}
}
} else { } else {
RedissonClient redisClient = RedisUtil.getRedisClient(); RedissonClient redisClient = RedisUtil.getRedisClient();
RMap<String, String> rMap = redisClient.getMap(STORE_BRANCH_REDIS_KEY + enterpriseId); RMap<String, String> rMap = redisClient.getMap(STORE_BRANCH_REDIS_KEY + enterpriseId);
StoreDTO headStore = storeApiService.getStoreById(enterpriseId, headerStoreId).getResult(); StoreDTO headStore = storeApiService.getStoreById(enterpriseId, headerStoreId).getResult();
WeimobPhysicalStoreDTO wmPhysicalStoreDTO = getWeimobPhsicalStore(headStore); WeimobPhysicalStoreDTO wmPhysicalStoreDTO = getWeimobPhsicalStore(headStore);
//标志位,如果成功,则需要把总店下面的导购也同步一下 //标志位,如果成功,则需要把总店下面的导购也同步一下
int valid = 0; int valid = 0;
for (Map<Integer, String> row : data) { for (Map<Integer, String> row : data) {
String regionName = row.get(0); String regionName = row.get(0);
String storeCode = row.get(1); String storeCode = row.get(1);
...@@ -722,6 +656,71 @@ public class WmStoreSyncController { ...@@ -722,6 +656,71 @@ public class WmStoreSyncController {
} }
} }
private void setOneAndOne(){
RedissonClient redisClient = RedisUtil.getRedisClient();
RMap<String, String> rMap = redisClient.getMap(REDIS_KEY + enterpriseId);
for (Map<Integer, String> row : data) {
String regionName = row.get(0);
String storeCode = row.get(1);
StoreRegionDTO storeRegion = getStoreRegion(enterpriseId, regionName);
if (storeRegion == null) {
rMap.put(regionName + "-" + storeCode, "门店域不存在");
continue;
}
StoreDTO storeDTO = getStoreByRegionAndCode(enterpriseId, storeRegion.getRegionId(), storeCode);
if (storeDTO == null) {
rMap.put(regionName + "-" + storeCode, "门店code不存在");
continue;
}
List<WeimobPhysicalStoreDTO> list = new ArrayList<>(1);
WeimobPhysicalStoreDTO obj = getWeimobPhsicalStore(storeDTO);
if (obj != null) {
ServiceResponse<Boolean> existStoreResponse = this.weimobStoreSiteService.existWeimobPhysicalStore(wmMallStoreId,
enterpriseId, storeDTO.getStoreInfoId());
if (existStoreResponse.isSuccess()) {
if (!existStoreResponse.getResult()) {
list.add(obj);
}
}
}
if (CollectionUtils.isEmpty(list)) {
//同步过的记录日志,不能再次同步
this.wmStoreSyncLogApiService.saveWmStoreSyncLog(Arrays.asList(storeDTO.getStoreId()),
wmMallStoreId, 2, enterpriseId);
// 导购同步
rMap.put(regionName + "-" + storeCode, "微盟侧已存在");
clerkApiService.syncClerkToWeimob(wmMallStoreId, Arrays.asList(storeDTO.getStoreId()), enterpriseId);
} else {
LOGGER.info("实体门店同步到微盟的参数:{}", JSON.toJSONString(list));
ServiceResponse<List<Integer>> weimobResult = this.weimobStoreSiteService
.addWeimobPhysicalStoreBatch(wmMallStoreId, enterpriseId, list);
LOGGER.info("实体门店批量到微盟结果:{}", JSON.toJSONString(weimobResult));
if (!weimobResult.isSuccess()) {
HashMap<Integer, String> map = JSON.parseObject(weimobResult.getMessage(), HashMap.class);
StringBuilder errorIds = new StringBuilder();
Map<String, String> errorMessage = new HashMap<>(16);
for (Map.Entry<Integer, String> entry : map.entrySet()) {
errorIds.append(entry.getKey()).append(GlobalInfo.FLAG_COMMA);
errorMessage.put(entry.getKey().toString(), entry.getValue());
}
//因为是一条一条处理,所以失败了,就不会有成功的,不用 导购同步逻辑
List<StoreDTO> hasSuccessStoreList = getStoreList(errorIds.toString(), enterpriseId);
hasSuccessStoreList.forEach(e -> rMap.put(e.getRegionId() + "-" + e.getStoreCode(),
errorMessage.get(storeDTO.getStoreInfoId().toString())));
} else {
rMap.put(regionName + "-" + storeCode, "成功");
//同步过的记录日志,不能再次同步
this.wmStoreSyncLogApiService.saveWmStoreSyncLog(Arrays.asList(storeDTO.getStoreId()),
wmMallStoreId, 2, enterpriseId);
// 导购同步
clerkApiService.syncClerkToWeimob(wmMallStoreId, Arrays.asList(storeDTO.getStoreId()), enterpriseId);
}
}
}
}
private List<StoreDTO> getStoreList(String storeInfoIds, Integer enterpriseId) { private List<StoreDTO> getStoreList(String storeInfoIds, Integer enterpriseId) {
String[] subStoreIdArr = storeInfoIds.split(","); String[] subStoreIdArr = storeInfoIds.split(",");
//一次性查询分店列表数据 //一次性查询分店列表数据
......
package com.gic.enterprise.web.qo; package com.gic.enterprise.web.qo;
import com.gic.commons.annotation.SkipNamingCheck;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import java.io.Serializable; import java.io.Serializable;
...@@ -12,6 +13,7 @@ import java.util.List; ...@@ -12,6 +13,7 @@ import java.util.List;
* @author taogs * @author taogs
* @date 2020/9/11 15:34 * @date 2020/9/11 15:34
*/ */
@SkipNamingCheck
public class QrcodeQO implements Serializable { public class QrcodeQO implements Serializable {
private Integer h5 = 0; private Integer h5 = 0;
private String appletIds; private String appletIds;
......
...@@ -25,7 +25,7 @@ public class ExcelUtils { ...@@ -25,7 +25,7 @@ public class ExcelUtils {
private static final String XLS = "xls"; private static final String XLS = "xls";
private static final String XLSX = "xlsx"; private static final String XLSX = "xlsx";
public static XSSFWorkbook getXSSFWorkbook(String sheetName, List<List<String>> everyLines, XSSFWorkbook wb) { public static XSSFWorkbook getXssfWorkbook(String sheetName, List<List<String>> everyLines, XSSFWorkbook wb) {
if (CollectionUtils.isEmpty(everyLines)) { if (CollectionUtils.isEmpty(everyLines)) {
return null; return null;
} }
...@@ -63,9 +63,9 @@ public class ExcelUtils { ...@@ -63,9 +63,9 @@ public class ExcelUtils {
for (int j = 0; j < everyLines.get(i).size(); j++) { for (int j = 0; j < everyLines.get(i).size(); j++) {
sheet.setColumnWidth(j, COLUMN_HEIGHT); sheet.setColumnWidth(j, COLUMN_HEIGHT);
//将内容按顺序赋给对应的列对象 //将内容按顺序赋给对应的列对象
XSSFCell cell1 = row.createCell(j); XSSFCell xssfCell = row.createCell(j);
cell1.setCellValue(everyLines.get(i).get(j)); xssfCell.setCellValue(everyLines.get(i).get(j));
cell1.setCellStyle(style); xssfCell.setCellStyle(style);
} }
} }
return wb; return wb;
...@@ -77,11 +77,11 @@ public class ExcelUtils { ...@@ -77,11 +77,11 @@ public class ExcelUtils {
XSSFWorkbook workbook = new XSSFWorkbook(); // 创建工作簿对象 XSSFWorkbook workbook = new XSSFWorkbook(); // 创建工作簿对象
XSSFSheet sheet = workbook.createSheet(title); // 创建工作表 XSSFSheet sheet = workbook.createSheet(title); // 创建工作表
XSSFRow row1 = sheet.createRow(0); XSSFRow xssfRow = sheet.createRow(0);
row1.setZeroHeight(true); xssfRow.setZeroHeight(true);
XSSFCell cell1 = row1.createCell(0); XSSFCell xssfCell = xssfRow.createCell(0);
if (StringUtils.isNotBlank(regionIdStr)) { if (StringUtils.isNotBlank(regionIdStr)) {
cell1.setCellValue(regionIdStr); xssfCell.setCellValue(regionIdStr);
} }
XSSFRow rowm = sheet.createRow(1); // 产生表格标题行 XSSFRow rowm = sheet.createRow(1); // 产生表格标题行
...@@ -175,10 +175,6 @@ public class ExcelUtils { ...@@ -175,10 +175,6 @@ public class ExcelUtils {
style.setFillPattern(CellStyle.SOLID_FOREGROUND); style.setFillPattern(CellStyle.SOLID_FOREGROUND);
return style; return style;
} }
/*
* 列头单元格样式
*/
private static XSSFCellStyle getColumnTopStyle(XSSFWorkbook workbook) { private static XSSFCellStyle getColumnTopStyle(XSSFWorkbook workbook) {
// 设置字体 // 设置字体
...@@ -220,47 +216,28 @@ public class ExcelUtils { ...@@ -220,47 +216,28 @@ public class ExcelUtils {
} }
/* /**
* 列数据信息单元格样式 * getStyle
* @Title: getStyle
* @Description:
* @author taogs
* @param workbook
* @return org.apache.poi.xssf.usermodel.XSSFCellStyle
* @throws
*/ */
private static XSSFCellStyle getStyle(XSSFWorkbook workbook) { private static XSSFCellStyle getStyle(XSSFWorkbook workbook) {
// 设置字体
XSSFFont font = workbook.createFont(); XSSFFont font = workbook.createFont();
// 设置字体大小
// font.setFontHeightInPoints((short)10);
// 字体加粗
// font.setBoldweight(XSSFFont.BOLDWEIGHT_BOLD);
// 设置字体名字
font.setFontName("Courier New"); font.setFontName("Courier New");
font.setColor(IndexedColors.RED.index); font.setColor(IndexedColors.RED.index);
// 设置样式;
XSSFCellStyle style = workbook.createCellStyle(); XSSFCellStyle style = workbook.createCellStyle();
// 设置底边框;
style.setBorderBottom(XSSFCellStyle.BORDER_THIN); style.setBorderBottom(XSSFCellStyle.BORDER_THIN);
// 设置底边框颜色;
// style.setBottomBorderColor(XSSFColor.BLACK.index);
// 设置左边框;
style.setBorderLeft(XSSFCellStyle.BORDER_THIN); style.setBorderLeft(XSSFCellStyle.BORDER_THIN);
// 设置左边框颜色;
// style.setLeftBorderColor(XSSFColor.BLACK.index);
// 设置右边框;
style.setBorderRight(XSSFCellStyle.BORDER_THIN); style.setBorderRight(XSSFCellStyle.BORDER_THIN);
// 设置右边框颜色;
// style.setRightBorderColor(XSSFColor.BLACK.index);
// 设置顶边框;
style.setBorderTop(XSSFCellStyle.BORDER_THIN); style.setBorderTop(XSSFCellStyle.BORDER_THIN);
// 设置顶边框颜色;
// style.setTopBorderColor(XSSFColor.BLACK.index);
// 在样式用应用设置的字体;
style.setFont(font); style.setFont(font);
// 设置自动换行;
style.setWrapText(false); style.setWrapText(false);
// 设置水平对齐的样式为居中对齐;
style.setAlignment(XSSFCellStyle.ALIGN_CENTER); style.setAlignment(XSSFCellStyle.ALIGN_CENTER);
// 设置垂直对齐的样式为居中对齐;
style.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER); style.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER);
return style; return style;
} }
...@@ -284,7 +261,7 @@ public class ExcelUtils { ...@@ -284,7 +261,7 @@ public class ExcelUtils {
* @return * @return
*/ */
public static List<Map<Integer, String>> readExcel(int row, String fileType, Workbook xssfWorkbook, Map<Integer, Boolean> dateTypeMap) { public static List<Map<Integer, String>> readExcel(int row, String fileType, Workbook xssfWorkbook, Map<Integer, Boolean> dateTypeMap) {
if (fileType.equals(XLSX)) { if (XLSX.equals(fileType)) {
return readXlsx(xssfWorkbook, row, dateTypeMap); return readXlsx(xssfWorkbook, row, dateTypeMap);
} else { } else {
return null; return null;
...@@ -293,7 +270,7 @@ public class ExcelUtils { ...@@ -293,7 +270,7 @@ public class ExcelUtils {
public static List<Map<Integer, String>> readXlsx(Workbook xssfWorkbook, int row, Map<Integer, Boolean> dateTypeMap) { public static List<Map<Integer, String>> readXlsx(Workbook xssfWorkbook, int row, Map<Integer, Boolean> dateTypeMap) {
List<Map<Integer, String>> result = new ArrayList<Map<Integer, String>>(); List<Map<Integer, String>> result = new ArrayList<Map<Integer, String>>();
SimpleDateFormat format = new SimpleDateFormat(Constants.dateformat); SimpleDateFormat format = new SimpleDateFormat(Constants.DATE_FORMAT);
// XSSFWorkbook xssfWorkbook = new XSSFWorkbook(in); // XSSFWorkbook xssfWorkbook = new XSSFWorkbook(in);
for (int numSheet = 0; numSheet < 1; numSheet++) { for (int numSheet = 0; numSheet < 1; numSheet++) {
Sheet xssfSheet = xssfWorkbook.getSheetAt(numSheet); Sheet xssfSheet = xssfWorkbook.getSheetAt(numSheet);
......
...@@ -40,8 +40,8 @@ public class QrcodeUtils { ...@@ -40,8 +40,8 @@ public class QrcodeUtils {
Map<EncodeHintType, Object> hints = new HashMap<EncodeHintType, Object>(); Map<EncodeHintType, Object> hints = new HashMap<EncodeHintType, Object>();
hints.put(EncodeHintType.CHARACTER_SET, "UTF-8"); hints.put(EncodeHintType.CHARACTER_SET, "UTF-8");
try { try {
BufferedImage bim = getQR_CODEBufferedImage(url, BarcodeFormat.QR_CODE, WIDTH, HEIGHT, hints); BufferedImage bim = getQrcodeBufferedImage(url, BarcodeFormat.QR_CODE, WIDTH, HEIGHT, hints);
imageByte = addLogo_QRCode(bim, getPicByte(logoPic), logoName, format); imageByte = addLogoQrcode(bim, getPicByte(logoPic), logoName, format);
return imageByte; return imageByte;
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage()); log.error(e.getMessage());
...@@ -84,7 +84,7 @@ public class QrcodeUtils { ...@@ -84,7 +84,7 @@ public class QrcodeUtils {
* 图片后缀名 * 图片后缀名
* @return * @return
*/ */
private static byte[] addLogo_QRCode(BufferedImage bim, byte[] logoPic, String logoName, String format) { private static byte[] addLogoQrcode(BufferedImage bim, byte[] logoPic, String logoName, String format) {
try { try {
/** /**
* 读取二维码图片,并构建绘图对象 * 读取二维码图片,并构建绘图对象
...@@ -104,7 +104,6 @@ public class QrcodeUtils { ...@@ -104,7 +104,6 @@ public class QrcodeUtils {
image.flush(); image.flush();
// image = outImage; // image = outImage;
} }
if (logoPic != null) { if (logoPic != null) {
/** /**
* 读取Logo图片 * 读取Logo图片
...@@ -171,7 +170,7 @@ public class QrcodeUtils { ...@@ -171,7 +170,7 @@ public class QrcodeUtils {
* 设置参数 * 设置参数
* @return * @return
*/ */
private static BufferedImage getQR_CODEBufferedImage(String content, BarcodeFormat barcodeFormat, int width, int height, private static BufferedImage getQrcodeBufferedImage(String content, BarcodeFormat barcodeFormat, int width, int height,
Map<EncodeHintType, ?> hints) { Map<EncodeHintType, ?> hints) {
MultiFormatWriter multiFormatWriter = null; MultiFormatWriter multiFormatWriter = null;
BitMatrix bm = null; BitMatrix bm = null;
......
...@@ -58,7 +58,6 @@ public class DoubleCallingRecordVO implements Serializable { ...@@ -58,7 +58,6 @@ public class DoubleCallingRecordVO implements Serializable {
/** /**
* 被叫 * 被叫
*/ */
// @NotBlank(message = "被叫名")
private String calledName; private String calledName;
/** /**
......
...@@ -421,7 +421,7 @@ public class EnterpriseController { ...@@ -421,7 +421,7 @@ public class EnterpriseController {
@RequestMapping("/list-gic-default-service") @RequestMapping("/list-gic-default-service")
public RestResponse listGicDefaultService() { public RestResponse listGicDefaultService() {
return ResultControllerUtils.commonResult(serveApiService.listServePropByGICDefaultAPP()); return ResultControllerUtils.commonResult(serveApiService.listServePropByGICDefaultApp());
} }
@RequestMapping("/enterprise-detail") @RequestMapping("/enterprise-detail")
...@@ -673,8 +673,7 @@ public class EnterpriseController { ...@@ -673,8 +673,7 @@ public class EnterpriseController {
@RequestMapping("/order-detail") @RequestMapping("/order-detail")
public RestResponse orderDetail(String orderNum) { public RestResponse orderDetail(String orderNum) {
ServiceResponse<TransferAccountsApprovalDTO> transferResult = transferAccountsApprovalApiService ServiceResponse<TransferAccountsApprovalDTO> transferResult = transferAccountsApprovalApiService.getByOrderNumber(orderNum);
.getByOrderNumber(orderNum);
if (transferResult.isSuccess()) { if (transferResult.isSuccess()) {
TransferAccountsApprovalDTO transfer = transferResult.getResult(); TransferAccountsApprovalDTO transfer = transferResult.getResult();
TransferApprovalServiceVO vo = EntityUtil.changeEntityNew(TransferApprovalServiceVO.class, transfer); TransferApprovalServiceVO vo = EntityUtil.changeEntityNew(TransferApprovalServiceVO.class, transfer);
...@@ -683,41 +682,9 @@ public class EnterpriseController { ...@@ -683,41 +682,9 @@ public class EnterpriseController {
vo = new TransferApprovalServiceVO(); vo = new TransferApprovalServiceVO();
vo.setOrderNumber(orderNum); vo.setOrderNumber(orderNum);
} }
ServiceResponse<OrderDTO> orderResult = orderApiService.getOrderForFinance(orderNum); ServiceResponse<OrderDTO> orderResult = orderApiService.getOrderForFinance(orderNum);
if (orderResult.isSuccess()) { if (orderResult.isSuccess()) {
OrderDTO orderDTO = orderResult.getResult(); OrderDTO orderDTO = this.buildVo(orderResult, vo);
vo.setOrderCreateTime(orderDTO.getCreateTime());
//支付类型
vo.setPayType(orderDTO.getPayType());
//支付流水号
vo.setPayInfoSerialNumber(orderDTO.getPayNumber());
if (vo.getOrderType() == null) {
//没有走财务转账审批
Integer serveType = orderDTO.getServeType();
if (serveType != null) {
if (serveType.intValue() == com.gic.enterprise.constant.Constants.ONE) {
vo.setOrderType(OrderTypeEnum.SERVICE.getCode());
} else if (serveType.intValue() == com.gic.enterprise.constant.Constants.TWO) {
vo.setOrderType(OrderTypeEnum.PACKAGE.getCode());
} else if (serveType.intValue() == com.gic.enterprise.constant.Constants.THREE) {
vo.setOrderType(OrderTypeEnum.EXTENSION_PACKAGE.getCode());
}
}
}
vo.setTotalCountFee(vo.getPlannedAmount());
vo.setRelationOrderType(orderDTO.getOrderType());
vo.setOperType(orderDTO.getOperType());
vo.setOperName(orderDTO.getOperName());
vo.setPayTime(orderDTO.getPayTime());
vo.setPayAmount(orderDTO.getPayAmount());
vo.setStatus(orderDTO.getStatus());
vo.setPayDetail(orderDTO.getPayDetail());
if (orderDTO.getOrderId() != null) {
vo.setOrderId(orderDTO.getOrderId().toString());
}
String couponName = orderDTO.getCouponName(); String couponName = orderDTO.getCouponName();
if (!StringUtils.isBlank(couponName)) { if (!StringUtils.isBlank(couponName)) {
ServiceDiscountVO discountVO = new ServiceDiscountVO(); ServiceDiscountVO discountVO = new ServiceDiscountVO();
...@@ -732,38 +699,13 @@ public class EnterpriseController { ...@@ -732,38 +699,13 @@ public class EnterpriseController {
for (OrderItemDTO itemDTO : orderDTO.getOrderItemList()) { for (OrderItemDTO itemDTO : orderDTO.getOrderItemList()) {
if (itemDTO.getServeType() == 1) { if (itemDTO.getServeType() == 1) {
//服务 //服务
ServiceInfoVO serviceInfoVO = new ServiceInfoVO(); this.buildService(serviceInfoVOList, itemDTO);
serviceInfoVO.setServeName(itemDTO.getServeName());
serviceInfoVO.setSkuInfo(itemDTO.getSkuInfo());
//销售价
serviceInfoVO.setTotalAmount(itemDTO.getSaleAmount());
serviceInfoVO.setServeInfo(itemDTO.getServeInfo());
serviceInfoVO.setApplicationId(itemDTO.getApplicationId());
serviceInfoVO.setPayDetail(itemDTO.getPayDetail());
serviceInfoVOList.add(serviceInfoVO);
} else if (itemDTO.getServeType() == 2) { } else if (itemDTO.getServeType() == 2) {
//license //license
LicenseVO licenseVO = new LicenseVO(); this.buildLicenes(licenseVOList, itemDTO);
licenseVO.setLicenseUnit(itemDTO.getLicenseUnit());
licenseVO.setServeName(itemDTO.getServeName());
//销售价
licenseVO.setTotalAmount(itemDTO.getSaleAmount());
licenseVO.setServeQuantity(itemDTO.getServeQuantity());
licenseVO.setServeInfo(itemDTO.getServeInfo());
licenseVO.setApplicationId(itemDTO.getApplicationId());
licenseVO.setPayDetail(itemDTO.getPayDetail());
licenseVOList.add(licenseVO);
} else if (itemDTO.getServeType() == 3) { } else if (itemDTO.getServeType() == 3) {
//拓展包 //拓展包
ExpandPackageVO expandPackageVO = new ExpandPackageVO(); this.buildExtendPackage(expandPackageVOList, itemDTO);
expandPackageVO.setImageUrl(itemDTO.getImageUrl());
expandPackageVO.setServeName(itemDTO.getServeName());
expandPackageVO.setServeQuantity(itemDTO.getServeQuantity());
//销售价
expandPackageVO.setTotalAmount(itemDTO.getSaleAmount());
expandPackageVO.setServeInfo(itemDTO.getServeInfo());
expandPackageVO.setPayDetail(itemDTO.getPayDetail());
expandPackageVOList.add(expandPackageVO);
} }
} }
Map<Long, List<LicenseVO>> licenseMap; Map<Long, List<LicenseVO>> licenseMap;
...@@ -802,7 +744,6 @@ public class EnterpriseController { ...@@ -802,7 +744,6 @@ public class EnterpriseController {
serviceInfoVOList.add(temp); serviceInfoVOList.add(temp);
vo.setServiceInfoVOList(serviceInfoVOList); vo.setServiceInfoVOList(serviceInfoVOList);
} }
if (expandPackageVOList.size() > 0) { if (expandPackageVOList.size() > 0) {
vo.setExpandPackageVOList(expandPackageVOList); vo.setExpandPackageVOList(expandPackageVOList);
} }
...@@ -816,6 +757,77 @@ public class EnterpriseController { ...@@ -816,6 +757,77 @@ public class EnterpriseController {
} }
} }
private OrderDTO buildVo(ServiceResponse<OrderDTO> orderResult, TransferApprovalServiceVO vo){
OrderDTO orderDTO = orderResult.getResult();
vo.setOrderCreateTime(orderDTO.getCreateTime());
//支付类型
vo.setPayType(orderDTO.getPayType());
//支付流水号
vo.setPayInfoSerialNumber(orderDTO.getPayNumber());
if (vo.getOrderType() == null) {
//没有走财务转账审批
Integer serveType = orderDTO.getServeType();
if (serveType != null) {
if (serveType.intValue() == com.gic.enterprise.constant.Constants.ONE) {
vo.setOrderType(OrderTypeEnum.SERVICE.getCode());
} else if (serveType.intValue() == com.gic.enterprise.constant.Constants.TWO) {
vo.setOrderType(OrderTypeEnum.PACKAGE.getCode());
} else if (serveType.intValue() == com.gic.enterprise.constant.Constants.THREE) {
vo.setOrderType(OrderTypeEnum.EXTENSION_PACKAGE.getCode());
}
}
}
vo.setTotalCountFee(vo.getPlannedAmount());
vo.setRelationOrderType(orderDTO.getOrderType());
vo.setOperType(orderDTO.getOperType());
vo.setOperName(orderDTO.getOperName());
vo.setPayTime(orderDTO.getPayTime());
vo.setPayAmount(orderDTO.getPayAmount());
vo.setStatus(orderDTO.getStatus());
vo.setPayDetail(orderDTO.getPayDetail());
if (orderDTO.getOrderId() != null) {
vo.setOrderId(orderDTO.getOrderId().toString());
}
return orderDTO;
}
private void buildService(List<ServiceInfoVO> serviceInfoVOList, OrderItemDTO itemDTO){
ServiceInfoVO serviceInfoVO = new ServiceInfoVO();
serviceInfoVO.setServeName(itemDTO.getServeName());
serviceInfoVO.setSkuInfo(itemDTO.getSkuInfo());
//销售价
serviceInfoVO.setTotalAmount(itemDTO.getSaleAmount());
serviceInfoVO.setServeInfo(itemDTO.getServeInfo());
serviceInfoVO.setApplicationId(itemDTO.getApplicationId());
serviceInfoVO.setPayDetail(itemDTO.getPayDetail());
serviceInfoVOList.add(serviceInfoVO);
}
private void buildLicenes(List<LicenseVO> licenseVOList, OrderItemDTO itemDTO){
LicenseVO licenseVO = new LicenseVO();
licenseVO.setLicenseUnit(itemDTO.getLicenseUnit());
licenseVO.setServeName(itemDTO.getServeName());
//销售价
licenseVO.setTotalAmount(itemDTO.getSaleAmount());
licenseVO.setServeQuantity(itemDTO.getServeQuantity());
licenseVO.setServeInfo(itemDTO.getServeInfo());
licenseVO.setApplicationId(itemDTO.getApplicationId());
licenseVO.setPayDetail(itemDTO.getPayDetail());
licenseVOList.add(licenseVO);
}
private void buildExtendPackage(List<ExpandPackageVO> expandPackageVOList, OrderItemDTO itemDTO){
ExpandPackageVO expandPackageVO = new ExpandPackageVO();
expandPackageVO.setImageUrl(itemDTO.getImageUrl());
expandPackageVO.setServeName(itemDTO.getServeName());
expandPackageVO.setServeQuantity(itemDTO.getServeQuantity());
//销售价
expandPackageVO.setTotalAmount(itemDTO.getSaleAmount());
expandPackageVO.setServeInfo(itemDTO.getServeInfo());
expandPackageVO.setPayDetail(itemDTO.getPayDetail());
expandPackageVOList.add(expandPackageVO);
}
public static List<Map<String, Object>> changeListToTree(int initId, List<EnterpriseInitDTO> list) { public static List<Map<String, Object>> changeListToTree(int initId, List<EnterpriseInitDTO> list) {
List<Map<String, Object>> result = new ArrayList<>(); List<Map<String, Object>> result = new ArrayList<>();
if (list != null) { if (list != null) {
......
...@@ -154,9 +154,9 @@ public class EnterpriseSmsController { ...@@ -154,9 +154,9 @@ public class EnterpriseSmsController {
page.setPageSize(Integer.MAX_VALUE); page.setPageSize(Integer.MAX_VALUE);
ServiceResponse<Page<EnterpriseSmsSignDTO>> result = smsOuterApiService.listSmsSignByEid(enterpriseId, page); ServiceResponse<Page<EnterpriseSmsSignDTO>> result = smsOuterApiService.listSmsSignByEid(enterpriseId, page);
if (result.isSuccess()) { if (result.isSuccess()) {
Page<EnterpriseSmsSignDTO> page1 = result.getResult(); Page<EnterpriseSmsSignDTO> smsSignPage = result.getResult();
if (page1 != null) { if (smsSignPage != null) {
List<EnterpriseSmsSignDTO> list = page1.getResult(); List<EnterpriseSmsSignDTO> list = smsSignPage.getResult();
if (CollectionUtils.isNotEmpty(list)) { if (CollectionUtils.isNotEmpty(list)) {
//有一条数据就符合条件 //有一条数据就符合条件
return true; return true;
......
...@@ -40,18 +40,6 @@ public class LinkController { ...@@ -40,18 +40,6 @@ public class LinkController {
return ResultControllerUtils.commonResult(serviceResponse); return ResultControllerUtils.commonResult(serviceResponse);
} }
// @RequestMapping("/save-link-menu")
// public RestResponse saveLinkMenu(Integer parentId, String name, Integer type) {
// ServiceResponse<Void> serviceResponse = linkApiService.saveLinkMenu(parentId, name, type);
// return ResultControllerUtils.commonResult(serviceResponse);
// }
//
// @RequestMapping("/update-link-menu")
// public RestResponse updateLinkMenu(Integer linkId, String name, Integer type) {
// ServiceResponse<Void> serviceResponse = linkApiService.updateLinkMenu(linkId, name, type);
// return ResultControllerUtils.commonResult(serviceResponse);
// }
@RequestMapping("/save-link-child-menu") @RequestMapping("/save-link-child-menu")
public RestResponse saveLinkChildMenu(@Validated(LinkQO.LinkSaveValid.class) LinkQO linkQO) { public RestResponse saveLinkChildMenu(@Validated(LinkQO.LinkSaveValid.class) LinkQO linkQO) {
ServiceResponse<Void> serviceResponse = linkApiService.saveLinkChildMenu(EntityUtil.changeEntityByJSON(LinkDTO.class, linkQO)); ServiceResponse<Void> serviceResponse = linkApiService.saveLinkChildMenu(EntityUtil.changeEntityByJSON(LinkDTO.class, linkQO));
......
...@@ -109,21 +109,21 @@ public class MqController { ...@@ -109,21 +109,21 @@ public class MqController {
@RequestMapping("/update-console") @RequestMapping("/update-console")
public RestResponse updateConsole(Integer dispatchWorkerNum, Integer readWorkerNum, Integer checkWorkerNum, Integer readingMessageStopped) { public RestResponse updateConsole(Integer dispatchWorkerNum, Integer readWorkerNum, Integer checkWorkerNum, Integer readingMessageStopped) {
UpdateResponse updateResponse0 = mqConfigService.updateDispatchWorkerNum(dispatchWorkerNum); UpdateResponse updateDispatchResponse = mqConfigService.updateDispatchWorkerNum(dispatchWorkerNum);
if (!updateResponse0.isSuccess()) { if (!updateDispatchResponse.isSuccess()) {
return RestResponse.failure(ErrorCode.SYSTEM_ERROR.getCode(), updateResponse0.getMessage()); return RestResponse.failure(ErrorCode.SYSTEM_ERROR.getCode(), updateDispatchResponse.getMessage());
} }
UpdateResponse updateResponse1 = mqConfigService.updateReadWorkerNum(readWorkerNum); UpdateResponse updateReadResponse = mqConfigService.updateReadWorkerNum(readWorkerNum);
if (!updateResponse1.isSuccess()) { if (!updateReadResponse.isSuccess()) {
return RestResponse.failure(ErrorCode.SYSTEM_ERROR.getCode(), updateResponse1.getMessage()); return RestResponse.failure(ErrorCode.SYSTEM_ERROR.getCode(), updateReadResponse.getMessage());
} }
UpdateResponse updateResponse2 = mqConfigService.updateCheckWorkerNum(checkWorkerNum); UpdateResponse updateCheckResponse = mqConfigService.updateCheckWorkerNum(checkWorkerNum);
if (!updateResponse2.isSuccess()) { if (!updateCheckResponse.isSuccess()) {
return RestResponse.failure(ErrorCode.SYSTEM_ERROR.getCode(), updateResponse2.getMessage()); return RestResponse.failure(ErrorCode.SYSTEM_ERROR.getCode(), updateCheckResponse.getMessage());
} }
UpdateResponse updateResponse3 = mqConfigService.stopReadingMessage(1 == readingMessageStopped); UpdateResponse stopReadingResponse = mqConfigService.stopReadingMessage(1 == readingMessageStopped);
if (!updateResponse3.isSuccess()) { if (!stopReadingResponse.isSuccess()) {
return RestResponse.failure(ErrorCode.SYSTEM_ERROR.getCode(), updateResponse3.getMessage()); return RestResponse.failure(ErrorCode.SYSTEM_ERROR.getCode(), stopReadingResponse.getMessage());
} }
return RestResponse.success(); return RestResponse.success();
} }
......
...@@ -35,13 +35,13 @@ public class ProvinceController { ...@@ -35,13 +35,13 @@ public class ProvinceController {
return RestResponse.success(); return RestResponse.success();
} }
List<String> result = new ArrayList<>(); List<String> result = new ArrayList<>();
ServiceResponse<List<ProvinceDTO>> serviceResponse = this.provincesApiService.selectAllProvince(); ServiceResponse<List<ProvinceDTO>> provinceResponse = this.provincesApiService.selectAllProvince();
ServiceResponse<List<CityDTO>> serviceResponse1 = this.provincesApiService.selectAllCity(); ServiceResponse<List<CityDTO>> cityResponse = this.provincesApiService.selectAllCity();
ServiceResponse<List<CountyDTO>> serviceResponse2 = this.provincesApiService.selectAllCounty(); ServiceResponse<List<CountyDTO>> countyResponse = this.provincesApiService.selectAllCounty();
String[] idArr = ids.split(","); String[] idArr = ids.split(",");
for (String id : idArr) { for (String id : idArr) {
if (serviceResponse.isSuccess()) { if (provinceResponse.isSuccess()) {
List<ProvinceDTO> provinceDTOList = serviceResponse.getResult(); List<ProvinceDTO> provinceDTOList = provinceResponse.getResult();
for (ProvinceDTO provinceDTO : provinceDTOList) { for (ProvinceDTO provinceDTO : provinceDTOList) {
if (id.equals(provinceDTO.getProvinceId())) { if (id.equals(provinceDTO.getProvinceId())) {
result.add(provinceDTO.getProvinceName()); result.add(provinceDTO.getProvinceName());
...@@ -49,8 +49,8 @@ public class ProvinceController { ...@@ -49,8 +49,8 @@ public class ProvinceController {
} }
} }
} }
if (serviceResponse1.isSuccess()) { if (cityResponse.isSuccess()) {
List<CityDTO> cityDTOList = serviceResponse1.getResult(); List<CityDTO> cityDTOList = cityResponse.getResult();
for (CityDTO cityDTO : cityDTOList) { for (CityDTO cityDTO : cityDTOList) {
if (id.equals(cityDTO.getCityId())) { if (id.equals(cityDTO.getCityId())) {
result.add(cityDTO.getCityName()); result.add(cityDTO.getCityName());
...@@ -58,8 +58,8 @@ public class ProvinceController { ...@@ -58,8 +58,8 @@ public class ProvinceController {
} }
} }
} }
if (serviceResponse2.isSuccess()) { if (countyResponse.isSuccess()) {
List<CountyDTO> countyDTOList = serviceResponse2.getResult(); List<CountyDTO> countyDTOList = countyResponse.getResult();
for (CountyDTO countyDTO : countyDTOList) { for (CountyDTO countyDTO : countyDTOList) {
if (id.equals(countyDTO.getCountyId())) { if (id.equals(countyDTO.getCountyId())) {
result.add(countyDTO.getCountyName()); result.add(countyDTO.getCountyName());
......
...@@ -63,9 +63,9 @@ public class ExcelUtils { ...@@ -63,9 +63,9 @@ public class ExcelUtils {
for (int j = 0; j < everyLines.get(i).size(); j++) { for (int j = 0; j < everyLines.get(i).size(); j++) {
sheet.setColumnWidth(j, COLUMN_HEIGHT); sheet.setColumnWidth(j, COLUMN_HEIGHT);
//将内容按顺序赋给对应的列对象 //将内容按顺序赋给对应的列对象
XSSFCell cell1 = row.createCell(j); XSSFCell xssfCell = row.createCell(j);
cell1.setCellValue(everyLines.get(i).get(j)); xssfCell.setCellValue(everyLines.get(i).get(j));
cell1.setCellStyle(style); xssfCell.setCellStyle(style);
} }
} }
return wb; return wb;
...@@ -79,9 +79,9 @@ public class ExcelUtils { ...@@ -79,9 +79,9 @@ public class ExcelUtils {
XSSFRow row1 = sheet.createRow(0); XSSFRow row1 = sheet.createRow(0);
row1.setZeroHeight(true); row1.setZeroHeight(true);
XSSFCell cell1 = row1.createCell(0); XSSFCell xssfCell = row1.createCell(0);
if (StringUtils.isNotBlank(regionIdStr)) { if (StringUtils.isNotBlank(regionIdStr)) {
cell1.setCellValue(regionIdStr); xssfCell.setCellValue(regionIdStr);
} }
XSSFRow rowm = sheet.createRow(1); // 产生表格标题行 XSSFRow rowm = sheet.createRow(1); // 产生表格标题行
...@@ -282,7 +282,7 @@ public class ExcelUtils { ...@@ -282,7 +282,7 @@ public class ExcelUtils {
* @return * @return
*/ */
public static List<Map<Integer, String>> readExcel(int row, String fileType, Workbook xssfWorkbook, Map<Integer, Boolean> dateTypeMap) { public static List<Map<Integer, String>> readExcel(int row, String fileType, Workbook xssfWorkbook, Map<Integer, Boolean> dateTypeMap) {
if (fileType.equals(XLSX)) { if (XLSX.equals(fileType)) {Map
return readXlsx(xssfWorkbook, row, dateTypeMap); return readXlsx(xssfWorkbook, row, dateTypeMap);
} else { } else {
return null; return null;
...@@ -291,7 +291,7 @@ public class ExcelUtils { ...@@ -291,7 +291,7 @@ public class ExcelUtils {
public static List<Map<Integer, String>> readXlsx(Workbook xssfWorkbook, int row, Map<Integer, Boolean> dateTypeMap) { public static List<Map<Integer, String>> readXlsx(Workbook xssfWorkbook, int row, Map<Integer, Boolean> dateTypeMap) {
List<Map<Integer, String>> result = new ArrayList<Map<Integer, String>>(); List<Map<Integer, String>> result = new ArrayList<Map<Integer, String>>();
SimpleDateFormat format = new SimpleDateFormat(Constants.dateformat); SimpleDateFormat format = new SimpleDateFormat(Constants.DATE_FORMAT);
// XSSFWorkbook xssfWorkbook = new XSSFWorkbook(in); // XSSFWorkbook xssfWorkbook = new XSSFWorkbook(in);
for (int numSheet = 0; numSheet < 1; numSheet++) { for (int numSheet = 0; numSheet < 1; numSheet++) {
Sheet xssfSheet = xssfWorkbook.getSheetAt(numSheet); Sheet xssfSheet = xssfWorkbook.getSheetAt(numSheet);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment