|
|
@ -255,42 +255,7 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
brandInfo.setCode(sd.getBrandCode()); |
|
|
|
brandInfoService.insert(brandInfo); |
|
|
|
} |
|
|
|
String dalei=sd.getCategoryb(); |
|
|
|
String[] split_dalei = dalei.split("]"); |
|
|
|
String key_dalei = split_dalei[0].replace("[","");//key
|
|
|
|
String v_dalei=split_dalei[1];//类别value
|
|
|
|
DictCommonDetailsVo category_dalei = dictCommonService.fetchByKeyAndType(key_dalei, "category"); |
|
|
|
if(category_dalei==null){ |
|
|
|
DictCommon dc=new DictCommon(); |
|
|
|
dc.setDictType("category"); |
|
|
|
dc.setDictKey(key_dalei); |
|
|
|
dc.setDictValue(v_dalei); |
|
|
|
dictCommonService.insert(dc); |
|
|
|
} |
|
|
|
String zhonglei=sd.getCategorym(); |
|
|
|
String[] split_zhonglei = zhonglei.split("]"); |
|
|
|
String key_zhonglei = split_zhonglei[0].replace("[","");//key
|
|
|
|
String v_zhonglei=split_zhonglei[1];//类别value
|
|
|
|
DictCommonDetailsVo category_zhonglei = dictCommonService.fetchByKeyAndType(key_zhonglei, "category"); |
|
|
|
if(category_zhonglei==null){ |
|
|
|
DictCommon dc=new DictCommon(); |
|
|
|
dc.setDictType("category"); |
|
|
|
dc.setDictKey(key_zhonglei); |
|
|
|
dc.setDictValue(v_zhonglei); |
|
|
|
dictCommonService.insert(dc); |
|
|
|
} |
|
|
|
String xiaolei=sd.getCategorys(); |
|
|
|
String[] split_xiaolei = xiaolei.split("]"); |
|
|
|
String key_xiaolei = split_xiaolei[0].replace("[","");//key
|
|
|
|
String v_xiaolei=split_xiaolei[1];//类别value
|
|
|
|
DictCommonDetailsVo category = dictCommonService.fetchByKeyAndType(key_xiaolei, "category"); |
|
|
|
if(category==null){ |
|
|
|
DictCommon dc=new DictCommon(); |
|
|
|
dc.setDictType("category"); |
|
|
|
dc.setDictKey(key_xiaolei); |
|
|
|
dc.setDictValue(v_xiaolei); |
|
|
|
dictCommonService.insert(dc); |
|
|
|
} |
|
|
|
validDictcommon(sd); |
|
|
|
} |
|
|
|
baseMapper.updateStoreName(salesDatas.get(0).getDataDate()); |
|
|
|
baseMapper.deleteSalesDataByDate(salesDatas.get(0).getDataDate()); |
|
|
@ -299,6 +264,46 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
private void validDictcommon(SalesData sd) { |
|
|
|
String xiaolei= sd.getCategorys(); |
|
|
|
String[] split_xiaolei = xiaolei.split("]"); |
|
|
|
String key_xiaolei = split_xiaolei[0].replace("[","");//key
|
|
|
|
String v_xiaolei=split_xiaolei[1];//类别value
|
|
|
|
DictCommonDetailsVo category = dictCommonService.fetchByKeyAndType(key_xiaolei, "category"); |
|
|
|
if(category==null){ |
|
|
|
DictCommon dc=new DictCommon(); |
|
|
|
dc.setDictType("category"); |
|
|
|
dc.setDictKey(key_xiaolei); |
|
|
|
dc.setDictValue(v_xiaolei); |
|
|
|
dictCommonService.insert(dc); |
|
|
|
String dalei= sd.getCategoryb(); |
|
|
|
String[] split_dalei = dalei.split("]"); |
|
|
|
String key_dalei = split_dalei[0].replace("[","");//key
|
|
|
|
String v_dalei=split_dalei[1];//类别value
|
|
|
|
DictCommonDetailsVo category_dalei = dictCommonService.fetchByKeyAndType(key_dalei, "category"); |
|
|
|
if(category_dalei==null){ |
|
|
|
DictCommon dc_dalei=new DictCommon(); |
|
|
|
dc_dalei.setDictType("category"); |
|
|
|
dc_dalei.setDictKey(key_dalei); |
|
|
|
dc_dalei.setDictValue(v_dalei); |
|
|
|
dictCommonService.insert(dc_dalei); |
|
|
|
String zhonglei= sd.getCategorym(); |
|
|
|
String[] split_zhonglei = zhonglei.split("]"); |
|
|
|
String key_zhonglei = split_zhonglei[0].replace("[","");//key
|
|
|
|
String v_zhonglei=split_zhonglei[1];//类别value
|
|
|
|
DictCommonDetailsVo category_zhonglei = dictCommonService.fetchByKeyAndType(key_zhonglei, "category"); |
|
|
|
if(category_zhonglei==null){ |
|
|
|
DictCommon dc_zhonglei=new DictCommon(); |
|
|
|
dc_zhonglei.setDictType("category"); |
|
|
|
dc_zhonglei.setDictKey(key_zhonglei); |
|
|
|
dc_zhonglei.setDictValue(v_zhonglei); |
|
|
|
dictCommonService.insert(dc_zhonglei); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void readBrandPeriodSorXls1(MultipartFile file,String sid) { |
|
|
|
|
|
|
|
/*ResultBean<FileUploadResult> fub = fileUploadComponent.uploadFile(file, "PurchaseRequisitionTobaccoDetails"); |
|
|
|