Commit be44f3e7 by kangxiaoshan

tkio增加俩字段

parent 55363bff
......@@ -7,11 +7,8 @@
</component>
<component name="ChangeListManager">
<list default="true" id="fcaffbb7-50d8-4ab8-9bad-0a6fbd39f63b" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/main/java/common/model/QcloudAccount.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/common/repository/QcloudAccountRepository.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/common/service/impl/ContractServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/common/service/impl/ContractServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/spring/applicationContext.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/spring/applicationContext.xml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -174,7 +171,7 @@
<path>
<item name="services root" type="e789fda9:ObjectUtils$Sentinel" />
<item name="Tomcat Server" type="7427dc5b:ServiceModel$ServiceGroupNode" />
<item name="Running" type="7427dc5b:ServiceModel$ServiceGroupNode" />
<item name="Finished" type="7427dc5b:ServiceModel$ServiceGroupNode" />
</path>
</expand>
<select />
......@@ -257,74 +254,74 @@
<screen x="0" y="0" width="1366" height="728" />
</state>
<state x="352" y="132" key="#xdebugger.evaluate/0.0.1366.728@0.0.1366.728" timestamp="1596003888437" />
<state width="461" height="438" key="DebuggerActiveHint" timestamp="1596003841176">
<state width="461" height="438" key="DebuggerActiveHint" timestamp="1603882985971">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="461" height="438" key="DebuggerActiveHint/0.0.1366.728@0.0.1366.728" timestamp="1596003841176" />
<state width="1111" height="308" key="GridCell.Tab.0.bottom" timestamp="1597321228164">
<state width="461" height="438" key="DebuggerActiveHint/0.0.1366.728@0.0.1366.728" timestamp="1603882985971" />
<state width="1111" height="357" key="GridCell.Tab.0.bottom" timestamp="1603882987346">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.0.bottom/0.0.1366.728@0.0.1366.728" timestamp="1597321228164" />
<state width="1111" height="308" key="GridCell.Tab.0.center" timestamp="1597321228164">
<state width="1111" height="357" key="GridCell.Tab.0.bottom/0.0.1366.728@0.0.1366.728" timestamp="1603882987346" />
<state width="1111" height="357" key="GridCell.Tab.0.center" timestamp="1603882987346">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.0.center/0.0.1366.728@0.0.1366.728" timestamp="1597321228164" />
<state width="1111" height="308" key="GridCell.Tab.0.left" timestamp="1597321228164">
<state width="1111" height="357" key="GridCell.Tab.0.center/0.0.1366.728@0.0.1366.728" timestamp="1603882987346" />
<state width="1111" height="357" key="GridCell.Tab.0.left" timestamp="1603882987346">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.0.left/0.0.1366.728@0.0.1366.728" timestamp="1597321228164" />
<state width="1111" height="308" key="GridCell.Tab.0.right" timestamp="1597321228164">
<state width="1111" height="357" key="GridCell.Tab.0.left/0.0.1366.728@0.0.1366.728" timestamp="1603882987346" />
<state width="1111" height="357" key="GridCell.Tab.0.right" timestamp="1603882987346">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.0.right/0.0.1366.728@0.0.1366.728" timestamp="1597321228164" />
<state width="1111" height="308" key="GridCell.Tab.1.bottom" timestamp="1597321228165">
<state width="1111" height="357" key="GridCell.Tab.0.right/0.0.1366.728@0.0.1366.728" timestamp="1603882987346" />
<state width="1111" height="357" key="GridCell.Tab.1.bottom" timestamp="1603882973705">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.1.bottom/0.0.1366.728@0.0.1366.728" timestamp="1597321228165" />
<state width="1111" height="308" key="GridCell.Tab.1.center" timestamp="1597321228164">
<state width="1111" height="357" key="GridCell.Tab.1.bottom/0.0.1366.728@0.0.1366.728" timestamp="1603882973705" />
<state width="1111" height="357" key="GridCell.Tab.1.center" timestamp="1603882973705">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.1.center/0.0.1366.728@0.0.1366.728" timestamp="1597321228164" />
<state width="1111" height="308" key="GridCell.Tab.1.left" timestamp="1597321228164">
<state width="1111" height="357" key="GridCell.Tab.1.center/0.0.1366.728@0.0.1366.728" timestamp="1603882973705" />
<state width="1111" height="357" key="GridCell.Tab.1.left" timestamp="1603882973705">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.1.left/0.0.1366.728@0.0.1366.728" timestamp="1597321228164" />
<state width="1111" height="308" key="GridCell.Tab.1.right" timestamp="1597321228165">
<state width="1111" height="357" key="GridCell.Tab.1.left/0.0.1366.728@0.0.1366.728" timestamp="1603882973705" />
<state width="1111" height="357" key="GridCell.Tab.1.right" timestamp="1603882973705">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.1.right/0.0.1366.728@0.0.1366.728" timestamp="1597321228165" />
<state width="1111" height="308" key="GridCell.Tab.2.bottom" timestamp="1597321227940">
<state width="1111" height="357" key="GridCell.Tab.1.right/0.0.1366.728@0.0.1366.728" timestamp="1603882973705" />
<state width="1111" height="357" key="GridCell.Tab.2.bottom" timestamp="1603882838355">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.2.bottom/0.0.1366.728@0.0.1366.728" timestamp="1597321227940" />
<state width="1111" height="308" key="GridCell.Tab.2.center" timestamp="1597321227939">
<state width="1111" height="357" key="GridCell.Tab.2.bottom/0.0.1366.728@0.0.1366.728" timestamp="1603882838355" />
<state width="1111" height="357" key="GridCell.Tab.2.center" timestamp="1603882838355">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.2.center/0.0.1366.728@0.0.1366.728" timestamp="1597321227939" />
<state width="1111" height="308" key="GridCell.Tab.2.left" timestamp="1597321227939">
<state width="1111" height="357" key="GridCell.Tab.2.center/0.0.1366.728@0.0.1366.728" timestamp="1603882838355" />
<state width="1111" height="357" key="GridCell.Tab.2.left" timestamp="1603882838355">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.2.left/0.0.1366.728@0.0.1366.728" timestamp="1597321227939" />
<state width="1111" height="308" key="GridCell.Tab.2.right" timestamp="1597321227939">
<state width="1111" height="357" key="GridCell.Tab.2.left/0.0.1366.728@0.0.1366.728" timestamp="1603882838355" />
<state width="1111" height="357" key="GridCell.Tab.2.right" timestamp="1603882838355">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.2.right/0.0.1366.728@0.0.1366.728" timestamp="1597321227939" />
<state width="1111" height="308" key="GridCell.Tab.3.bottom" timestamp="1597321227940">
<state width="1111" height="357" key="GridCell.Tab.2.right/0.0.1366.728@0.0.1366.728" timestamp="1603882838355" />
<state width="1111" height="357" key="GridCell.Tab.3.bottom" timestamp="1603882838356">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.3.bottom/0.0.1366.728@0.0.1366.728" timestamp="1597321227940" />
<state width="1111" height="308" key="GridCell.Tab.3.center" timestamp="1597321227940">
<state width="1111" height="357" key="GridCell.Tab.3.bottom/0.0.1366.728@0.0.1366.728" timestamp="1603882838356" />
<state width="1111" height="357" key="GridCell.Tab.3.center" timestamp="1603882838356">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.3.center/0.0.1366.728@0.0.1366.728" timestamp="1597321227940" />
<state width="1111" height="308" key="GridCell.Tab.3.left" timestamp="1597321227940">
<state width="1111" height="357" key="GridCell.Tab.3.center/0.0.1366.728@0.0.1366.728" timestamp="1603882838356" />
<state width="1111" height="357" key="GridCell.Tab.3.left" timestamp="1603882838356">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.3.left/0.0.1366.728@0.0.1366.728" timestamp="1597321227940" />
<state width="1111" height="308" key="GridCell.Tab.3.right" timestamp="1597321227940">
<state width="1111" height="357" key="GridCell.Tab.3.left/0.0.1366.728@0.0.1366.728" timestamp="1603882838356" />
<state width="1111" height="357" key="GridCell.Tab.3.right" timestamp="1603882838356">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.3.right/0.0.1366.728@0.0.1366.728" timestamp="1597321227940" />
<state width="1111" height="357" key="GridCell.Tab.3.right/0.0.1366.728@0.0.1366.728" timestamp="1603882838356" />
<state width="1111" height="308" key="GridCell.Tab.6.bottom" timestamp="1595298613992">
<screen x="0" y="0" width="1366" height="728" />
</state>
......@@ -361,13 +358,24 @@
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="498" height="446" key="SwitcherDM/0.0.1366.728@0.0.1366.728" timestamp="1595411365033" />
<state width="691" height="364" key="XDebugger.FullValuePopup" timestamp="1595471656041">
<state width="691" height="364" key="XDebugger.FullValuePopup" timestamp="1603882985968">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="691" height="364" key="XDebugger.FullValuePopup/0.0.1366.728@0.0.1366.728" timestamp="1595471656041" />
<state x="225" y="100" key="com.intellij.xdebugger.impl.breakpoints.ui.BreakpointsDialogFactory$2" timestamp="1595063525107">
<state width="691" height="364" key="XDebugger.FullValuePopup/0.0.1366.728@0.0.1366.728" timestamp="1603882985968" />
<state x="359" y="97" width="647" height="534" key="find.popup" timestamp="1603878341475">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state x="225" y="100" key="com.intellij.xdebugger.impl.breakpoints.ui.BreakpointsDialogFactory$2/0.0.1366.728@0.0.1366.728" timestamp="1595063525107" />
<state x="359" y="97" width="647" height="534" key="find.popup/0.0.1366.728@0.0.1366.728" timestamp="1603878341475" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/common/service/impl/ContractServiceImpl.java</url>
<line>2611</line>
<option name="timeStamp" value="4" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
</project>
\ No newline at end of file
......@@ -436,7 +436,7 @@ public class ContractServiceImpl implements ContractService {
List list = new ArrayList();
if ( "io".equals(platform)) {
if ("io".equals(platform)) {
List<PackageType> packageTypeList = packageTypeRepository.findIsNewAll();
for (PackageType p : packageTypeList) {
p.setType("main");
......@@ -570,7 +570,7 @@ public class ContractServiceImpl implements ContractService {
//this.calculateShareIncome(resource);//判断是否计算调整金
//判断库里是否已有合同的主账号
if("tkio".equals(resource.getPlatform())){
if ("tkio".equals(resource.getPlatform())) {
List<Contract> contracts = contractRepository.findByPlatformAndEmail(resource.getPlatform(), resource.getEmail());
CalculationFlow calculationFlow = new CalculationFlow();
calculationFlow.setEmail(resource.getEmail());
......@@ -579,9 +579,9 @@ public class ContractServiceImpl implements ContractService {
calculationFlow.setTriggerType("新建");
calculationFlow.setCreateTime(DateUtil.getCurrentDateStr());
calculationFlow.setIsAll(false);
if(contracts==null || contracts.size()>0){
if (contracts == null || contracts.size() > 0) {
for (Contract contract : contracts) {
if(intersection(contract,resource)){//有交集
if (intersection(contract, resource)) {//有交集
calculationFlow.setIsAll(true);
break;
}
......@@ -642,7 +642,7 @@ public class ContractServiceImpl implements ContractService {
IncrementFlow flow = new IncrementFlow();
Account account = accountRepository.findByEmail(resource.getEmail());
flow.setAccount(account.getId());
flow.setFlow(extraFlow*10000);
flow.setFlow(extraFlow * 10000);
flow.setEndDate(resource.getEndDate());
flow.setStartDate(resource.getStartDate());
flow.setContractCode(resource.getContractCode());
......@@ -715,7 +715,7 @@ public class ContractServiceImpl implements ContractService {
IncrementFlow flow = new IncrementFlow();
Account account = accountRepository.findByEmail(resource.getEmail());
flow.setAccount(account.getId());
flow.setFlow(extraFlow*10000);
flow.setFlow(extraFlow * 10000);
flow.setEndDate(resource.getEndDate());
flow.setStartDate(resource.getStartDate());
flow.setContractCode(resource.getContractCode());
......@@ -894,7 +894,7 @@ public class ContractServiceImpl implements ContractService {
resource.setId(contract.getId());
//判断库里是否已有合同的主账号
if("tkio".equals(resource.getPlatform()) && (contract.getStartDate()!=resource.getStartDate()&&contract.getEndDate()!=resource.getEndDate())){
if ("tkio".equals(resource.getPlatform()) && (contract.getStartDate() != resource.getStartDate() && contract.getEndDate() != resource.getEndDate())) {
List<Contract> contracts = contractRepository.findByPlatformAndEmail(resource.getPlatform(), resource.getEmail());
CalculationFlow calculationFlow = new CalculationFlow();
calculationFlow.setEmail(resource.getEmail());
......@@ -903,10 +903,10 @@ public class ContractServiceImpl implements ContractService {
calculationFlow.setTriggerType("编辑");
calculationFlow.setCreateTime(DateUtil.getCurrentDateStr(DateUtil.C_TIME_PATTON_DEFAULT));
calculationFlow.setIsAll(false);
if(contracts==null || contracts.size()>0){
if (contracts == null || contracts.size() > 0) {
for (Contract contract1 : contracts) {
if(contract1.getId()!=contract.getId()){
if(intersection(contract1,resource) || intersection(contract1,contract)){//有交集
if (contract1.getId() != contract.getId()) {
if (intersection(contract1, resource) || intersection(contract1, contract)) {//有交集
calculationFlow.setIsAll(true);
break;
}
......@@ -919,13 +919,14 @@ public class ContractServiceImpl implements ContractService {
return contractRepository.save(resource);
}
public Boolean intersection(Contract contract1 ,Contract contract2 ){
return (DateUtil.getDate(contract1.getStartDate()).getTime()<=DateUtil.getDate(contract2.getStartDate()).getTime()&&
DateUtil.getDate(contract1.getEndDate()).getTime()>=DateUtil.getDate(contract2.getStartDate()).getTime() )||
(DateUtil.getDate(contract1.getStartDate()).getTime()<=DateUtil.getDate(contract2.getEndDate()).getTime()&&
DateUtil.getDate(contract1.getEndDate()).getTime()>=DateUtil.getDate(contract2.getEndDate()).getTime()) ||
(DateUtil.getDate(contract2.getStartDate()).getTime()<=DateUtil.getDate(contract1.getStartDate()).getTime()&&
DateUtil.getDate(contract2.getEndDate()).getTime()>=DateUtil.getDate(contract1.getEndDate()).getTime());
public Boolean intersection(Contract contract1, Contract contract2) {
return (DateUtil.getDate(contract1.getStartDate()).getTime() <= DateUtil.getDate(contract2.getStartDate()).getTime() &&
DateUtil.getDate(contract1.getEndDate()).getTime() >= DateUtil.getDate(contract2.getStartDate()).getTime()) ||
(DateUtil.getDate(contract1.getStartDate()).getTime() <= DateUtil.getDate(contract2.getEndDate()).getTime() &&
DateUtil.getDate(contract1.getEndDate()).getTime() >= DateUtil.getDate(contract2.getEndDate()).getTime()) ||
(DateUtil.getDate(contract2.getStartDate()).getTime() <= DateUtil.getDate(contract1.getStartDate()).getTime() &&
DateUtil.getDate(contract2.getEndDate()).getTime() >= DateUtil.getDate(contract1.getEndDate()).getTime());
}
private List<ChangeDelDetail> changeDelInfoForContract(Contract byfind, Contract resource, Long pid, String ip) {
......@@ -1423,8 +1424,8 @@ public class ContractServiceImpl implements ContractService {
c.setMyBodyName(bodyMap.get(c.getMyBodyCode()));
c.setTradeName(tradeTypeMap.get(c.getTradeType() + ""));
c.setDs(new DateTime(c.getCreateTime()).toString("yyyy-MM-dd"));
if(c.getBarrioId()!=null)
c.setBarrioName(barrioCitiesNameMap.get(barrioCitiesNameMap.get(c.getBarrioId()).getParentId()).getName());
if (c.getBarrioId() != null)
c.setBarrioName(barrioCitiesNameMap.get(barrioCitiesNameMap.get(c.getBarrioId()).getParentId()).getName());
if ((c.getExtraFlow() != null && c.getExtraFlow() > 0) ||
(c.getDiscountTimeLong() != null && c.getDiscountTimeLong() > 0)) {
......@@ -1457,7 +1458,7 @@ public class ContractServiceImpl implements ContractService {
// c.setPriceLevelName(typeMap.containsKey(c.getPriceLevel()) ? typeMap.get(c.getPriceLevel()).getPackageName() : "");
//} else {
c.setPriceLevelName(packageBaseMap.get(c.getPriceLevel()) == null ? "" : packageBaseMap.get(c.getPriceLevel()).getPackageName());
c.setPriceLevelName(packageBaseMap.get(c.getPriceLevel()) == null ? "" : packageBaseMap.get(c.getPriceLevel()).getPackageName());
//}
// c.setCreateName(saleMap.containsKey(c.getCreateAccount()) ? saleMap.get(c.getCreateAccount()) : "");
......@@ -1537,10 +1538,10 @@ public class ContractServiceImpl implements ContractService {
contract.setSaleName(saleMap.containsKey(contract.getSale()) ? saleMap.get(contract.getSale()) : "");
//if ("tkio".equals(platform)) {
// contract.setPriceLevelName(typeMap.containsKey(contract.getPriceLevel()) ? typeMap.get(contract.getPriceLevel()).getPackageName() : "");
// contract.setPriceLevelName(typeMap.containsKey(contract.getPriceLevel()) ? typeMap.get(contract.getPriceLevel()).getPackageName() : "");
//} else {
contract.setPriceLevelName(packageBaseMap.get(contract.getPriceLevel()) == null ? "" : packageBaseMap.get(contract.getPriceLevel()).getPackageName());
contract.setPriceLevelName(packageBaseMap.get(contract.getPriceLevel()) == null ? "" : packageBaseMap.get(contract.getPriceLevel()).getPackageName());
//}
contract.setCreateName(saleMap.containsKey(contract.getCreateAccount()) ? saleMap.get(contract.getCreateAccount()) : "");
......@@ -1738,7 +1739,7 @@ public class ContractServiceImpl implements ContractService {
contract.setStatus(ContractStatusEnum.SUSPEND.getKey());
showTip = true;
//判断库里是否已有合同的主账号
if("tkio".equals(resource.getPlatform())){
if ("tkio".equals(resource.getPlatform())) {
List<Contract> contracts = contractRepository.findByPlatformAndEmail(resource.getPlatform(), resource.getEmail());
CalculationFlow calculationFlow = new CalculationFlow();
calculationFlow.setEmail(resource.getEmail());
......@@ -1747,10 +1748,10 @@ public class ContractServiceImpl implements ContractService {
calculationFlow.setTriggerType("中止");
calculationFlow.setCreateTime(DateUtil.getCurrentDateStr());
calculationFlow.setIsAll(false);
if(contracts==null || contracts.size()>0){
if (contracts == null || contracts.size() > 0) {
for (Contract contract1 : contracts) {
if(contract1.getId()!=contract.getId()){
if(intersection(contract1,contract)){//有交集
if (contract1.getId() != contract.getId()) {
if (intersection(contract1, contract)) {//有交集
calculationFlow.setIsAll(true);
break;
}
......@@ -2123,7 +2124,7 @@ public class ContractServiceImpl implements ContractService {
}
} else {*/
cm.setPackageName(packageBaseMap.get(cm.getPriceLevel()) == null ? "" : packageBaseMap.get(cm.getPriceLevel()).getPackageName());
cm.setPackageName(packageBaseMap.get(cm.getPriceLevel()) == null ? "" : packageBaseMap.get(cm.getPriceLevel()).getPackageName());
//}
}
......@@ -2306,9 +2307,9 @@ public class ContractServiceImpl implements ContractService {
InputStream stream = null;
try {
int row_length;
if(platform.equals("tkio")){
if (platform.equals("tkio")) {
row_length = 15;
}else{
} else {
row_length = 13;
}
stream = file.getInputStream();
......@@ -2384,7 +2385,7 @@ public class ContractServiceImpl implements ContractService {
if (!parseRowData(row, row_length, null, titleKey)) {
return ResultModel.ERROR(ResultStatus.FORMAT_FILE_ERRO);
}
if(!platform.equals("tkio")){
if (!platform.equals("tkio")) {
titleKey.remove("合同流量");
titleKey.remove("track_flow");
titleKey.remove("赠送流量");
......@@ -2392,8 +2393,15 @@ public class ContractServiceImpl implements ContractService {
}
int row_already = titleKey.size();
String extend_row_sql = "platform,product,my_body_code,create_time,code_num,type,status,back_status,ds," +
"create_account,create_name,extra_flow,relation_contract,invoice_money,first_back_id";
String extend_row_sql = null;
if ("tkio".equals(platform)) {
extend_row_sql = "platform,product,my_body_code,create_time,code_num,type,status,back_status,ds," +
"create_account,create_name,relation_contract,invoice_money,first_back_id";
} else {
extend_row_sql = "platform,product,my_body_code,create_time,code_num,type,status,back_status,ds," +
"create_account,create_name,extra_flow,relation_contract,invoice_money,first_back_id";
}
int extend_size = extend_row_sql.split(",").length;
......@@ -2469,9 +2477,9 @@ public class ContractServiceImpl implements ContractService {
if (packageMap != null && (!packageMap.containsKey(dataSTR) && !packageMap.containsValue(Long.parseLong(dataSTR)))) {
return ResultModel.ERROR("第" + line_num + "行【套餐】错误");
} else {
if(platform.equals("tkio")){
if (platform.equals("tkio")) {
s_data[w] = dataSTR;
}else{
} else {
s_data[w] = packageMap.get(dataSTR);
}
}
......@@ -2484,6 +2492,7 @@ public class ContractServiceImpl implements ContractService {
&& !"mm/dd/yy".equals(dfmate)
&& !"dd-mmm-yy".equals(dfmate)
&& !"yyyy/m/d".equals(dfmate)
&& !"yyyy/m/d;@".equals(dfmate)
) {
return ResultModel.ERROR("第" + line_num + "行【日期单元格】错误");
}
......@@ -2491,7 +2500,7 @@ public class ContractServiceImpl implements ContractService {
if (org.apache.poi.ss.usermodel.DateUtil.isCellDateFormatted(cell)) {
// 用于转化为日期格式
Date d = cell.getDateCellValue();
if("start_date".equals(sheetTitle) ){
if ("start_date".equals(sheetTitle)) {
createTime = d;
}
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
......@@ -2508,16 +2517,16 @@ public class ContractServiceImpl implements ContractService {
s_data[w] = dataSTR.replace(",", "");
} else if ("barrio_id".equals(sheetTitle)) {
if(barrioCityMap.containsKey(Long.parseLong(dataSTR))){
if (barrioCityMap.containsKey(Long.parseLong(dataSTR))) {
s_data[w] = dataSTR;
}else{
} else {
return ResultModel.ERROR("第" + line_num + "行【行政区域】code错误");
}
} else {
s_data[w] = dataSTR;
if ("email".equals(sheetTitle) && !StringUtils.isEmpty(dataSTR) && "tkio".equals(platformexcl)) {
if(!accountsEmail.contains(dataSTR.trim())){
if (!accountsEmail.contains(dataSTR.trim())) {
moreEmail.add(dataSTR.trim());
}
accountsEmail.add(dataSTR.trim());
......@@ -2567,10 +2576,17 @@ public class ContractServiceImpl implements ContractService {
// create_account,create_name,extra_flow,relation_contract,invoice_money,first_back_id
s_data[row_already + 9] = 0;
s_data[row_already + 10] = "导入";
s_data[row_already + 11] = 0;
s_data[row_already + 12] = -1;
s_data[row_already + 13] = 0;
s_data[row_already + 14] = 0;
if ("tkio".equals(platform)) {
s_data[row_already + 11] = -1;
s_data[row_already + 12] = 0;
s_data[row_already + 13] = 0;
} else {
s_data[row_already + 11] = 0;
s_data[row_already + 12] = -1;
s_data[row_already + 13] = 0;
s_data[row_already + 14] = 0;
}
//批量添加数据
args_data.add(s_data);
}
......@@ -2595,7 +2611,7 @@ public class ContractServiceImpl implements ContractService {
// TransactionStatus transactionStatus = transactionUtils.begin();
jdbcTemplate.batchUpdate(sql.toString(), args_data);
// transactionUtils.commit(transactionStatus);
if("tkio".equals(platform)){
if ("tkio".equals(platform)) {
for (String email : moreEmail) {
CalculationFlow calculationFlow = new CalculationFlow();
calculationFlow.setEmail(email);
......
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