基础信息往来信息代码提交
parent
35ada6f5ef
commit
5fd7c291d0
@ -0,0 +1,188 @@
|
||||
package com.glxp.api.controller.basic;
|
||||
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.glxp.api.common.enums.ResultEnum;
|
||||
import com.glxp.api.common.res.BaseResponse;
|
||||
import com.glxp.api.common.util.ResultVOUtils;
|
||||
import com.glxp.api.constant.BasicProcessStatus;
|
||||
import com.glxp.api.entity.basic.BasicCorpsImportDetailEntity;
|
||||
import com.glxp.api.entity.basic.BasicCorpsImportLogEntity;
|
||||
import com.glxp.api.req.basic.FilterCorpImportLogRequest;
|
||||
import com.glxp.api.req.basic.PostBasicCorpRequest;
|
||||
import com.glxp.api.req.system.DeleteRequest;
|
||||
import com.glxp.api.res.PageSimpleResponse;
|
||||
import com.glxp.api.res.basic.BasicCorpExportLogResponse;
|
||||
import com.glxp.api.service.basic.BasicCorpImportDetailService;
|
||||
import com.glxp.api.service.basic.BasicCorpImportLogService;
|
||||
import com.glxp.api.service.thrsys.ThrSystemService;
|
||||
import com.glxp.api.util.CustomUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class BasicCorpImportLogController {
|
||||
@Resource
|
||||
BasicCorpImportLogService basicCorpImportLogService;
|
||||
@Resource
|
||||
BasicCorpImportDetailService basicCorpImportDetailService;
|
||||
@Resource
|
||||
ThrSystemService thrSystemService;
|
||||
|
||||
|
||||
@GetMapping("/udiwms/corps/importLog/filter")
|
||||
public BaseResponse filter(FilterCorpImportLogRequest filterCorpImportLogRequest,
|
||||
BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
List<BasicCorpsImportLogEntity> udiInfoImportLogEntities
|
||||
= basicCorpImportLogService.filterImportLog(filterCorpImportLogRequest);
|
||||
PageInfo<BasicCorpsImportLogEntity> pageInfo;
|
||||
pageInfo = new PageInfo<>(udiInfoImportLogEntities);
|
||||
PageSimpleResponse<BasicCorpsImportLogEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
||||
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||
pageSimpleResponse.setList(udiInfoImportLogEntities);
|
||||
return ResultVOUtils.success(pageSimpleResponse);
|
||||
}
|
||||
|
||||
@GetMapping("/udiwms/corps/importLog/filterDetail")
|
||||
public BaseResponse filterDetail(FilterCorpImportLogRequest filterCorpImportLogRequest,
|
||||
BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
List<BasicCorpsImportDetailEntity> corpImportDetailEntities = basicCorpImportDetailService.filterCorpImport(filterCorpImportLogRequest);
|
||||
PageInfo<BasicCorpsImportDetailEntity> pageInfo;
|
||||
pageInfo = new PageInfo<>(corpImportDetailEntities);
|
||||
PageSimpleResponse<BasicCorpsImportDetailEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
||||
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||
pageSimpleResponse.setList(corpImportDetailEntities);
|
||||
return ResultVOUtils.success(pageSimpleResponse);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/udiwms/corps/importLog/deleteLog")
|
||||
public BaseResponse deleteLog(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
String id = deleteRequest.getId();
|
||||
FilterCorpImportLogRequest filterCorpImportLogRequest = new FilterCorpImportLogRequest();
|
||||
filterCorpImportLogRequest.setId(Integer.parseInt(id));
|
||||
List<BasicCorpsImportLogEntity> corpImportLogEntities = basicCorpImportLogService.filterImportLog(filterCorpImportLogRequest);
|
||||
if (corpImportLogEntities != null && corpImportLogEntities.size() > 0) {
|
||||
BasicCorpsImportLogEntity corpImportLogEntity = corpImportLogEntities.get(0);
|
||||
basicCorpImportLogService.deleteById(corpImportLogEntity.getId() + "");
|
||||
basicCorpImportDetailService.deleteByGenkey(corpImportLogEntity.getGenKey());
|
||||
}
|
||||
|
||||
return ResultVOUtils.success("删除成功");
|
||||
}
|
||||
|
||||
@PostMapping("/udiwms/corps/importLog/delete")
|
||||
public BaseResponse delete(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
if (basicCorpImportDetailService.deleteById(deleteRequest.getId()))
|
||||
return ResultVOUtils.success("删除成功");
|
||||
else
|
||||
return ResultVOUtils.error(500, "删除成功");
|
||||
}
|
||||
|
||||
|
||||
//往来单位信息文件导入
|
||||
@PostMapping("/udiwms/corps/importLog/upload")
|
||||
public BaseResponse uploadCorp(@RequestParam("file") List<MultipartFile> files, @RequestParam("thirdSys") String thirdSys) {
|
||||
String filePath = "D:\\udiwms\\filePath\\";
|
||||
File createFile = new File(filePath);
|
||||
if (!createFile.exists()) {
|
||||
createFile.mkdirs();
|
||||
}
|
||||
for (int i = 0; i < files.size(); i++) {
|
||||
MultipartFile file = files.get(i);
|
||||
if (file.isEmpty()) {
|
||||
return ResultVOUtils.error(500, "上传第" + (i++) + "个文件失败");
|
||||
}
|
||||
String fileName = file.getOriginalFilename();
|
||||
//解析数据
|
||||
try {
|
||||
String fileType = fileName.substring(fileName.lastIndexOf("."));
|
||||
if (".udi".equalsIgnoreCase(fileType)) {
|
||||
String jsonData = IoUtil.read(file.getInputStream()).toString();
|
||||
BasicCorpExportLogResponse data = JSONUtil.toBean(jsonData, BasicCorpExportLogResponse.class);
|
||||
|
||||
//导入日志
|
||||
BasicCorpsImportLogEntity corpImportLogEntity = new BasicCorpsImportLogEntity();
|
||||
String genKey = CustomUtil.getId();
|
||||
corpImportLogEntity.setGenKey(genKey);
|
||||
corpImportLogEntity.setFromType("文件导入");
|
||||
corpImportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_UNPROCESS);
|
||||
corpImportLogEntity.setUpdateTime(new Date(System.currentTimeMillis()));
|
||||
basicCorpImportLogService.insertImportLog(corpImportLogEntity);
|
||||
basicCorpImportLogService.importJsonData(data);
|
||||
corpImportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
|
||||
basicCorpImportLogService.updateImportLog(corpImportLogEntity);
|
||||
} else {
|
||||
return ResultVOUtils.error(500, "请上传udi文件");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("导入往来单位信息错误,文件名为:{}", fileName);
|
||||
}
|
||||
}
|
||||
return ResultVOUtils.success("上传成功");
|
||||
}
|
||||
|
||||
|
||||
//往来单位信息接口上传
|
||||
@PostMapping("/udiwms/basic/corps/upload")
|
||||
public BaseResponse postUdiInfo(@RequestBody PostBasicCorpRequest postBasicCorpRequest, BindingResult bindingResult) {
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
|
||||
|
||||
String genKey = postBasicCorpRequest.getGenKey();
|
||||
if (genKey == null) {
|
||||
genKey = CustomUtil.getId();
|
||||
}
|
||||
BasicCorpsImportLogEntity corpImportLogEntity = basicCorpImportLogService.selectByGenKey(genKey);
|
||||
List<BasicCorpsImportDetailEntity> corpImportDetailEntities = postBasicCorpRequest.getDatas();
|
||||
if (corpImportDetailEntities != null) {
|
||||
for (BasicCorpsImportDetailEntity corpImportDetailEntity : corpImportDetailEntities) {
|
||||
corpImportDetailEntity.setGenKeyFk(genKey);
|
||||
corpImportDetailEntity.setImportStatus(BasicProcessStatus.UDIINFO_IMPORT_CODE_UNPROCESS);
|
||||
corpImportDetailEntity.setUpdateTime(new Date());
|
||||
basicCorpImportDetailService.insertCorpImport(corpImportDetailEntity);
|
||||
}
|
||||
}
|
||||
if (corpImportLogEntity == null) {
|
||||
corpImportLogEntity = new BasicCorpsImportLogEntity();
|
||||
corpImportLogEntity.setGenKey(genKey);
|
||||
corpImportLogEntity.setFromType("接口上传");
|
||||
corpImportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_UNPROCESS);
|
||||
corpImportLogEntity.setUpdateTime(new Date(System.currentTimeMillis()));
|
||||
basicCorpImportLogService.insertImportLog(corpImportLogEntity);
|
||||
} else {
|
||||
corpImportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_UNPROCESS);
|
||||
basicCorpImportLogService.updateImportLog(corpImportLogEntity);
|
||||
}
|
||||
basicCorpImportLogService.importCorps(genKey);
|
||||
return ResultVOUtils.success("上传成功");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,237 @@
|
||||
package com.glxp.api.controller.basic;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.io.file.FileWriter;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
|
||||
import com.glxp.api.constant.BasicProcessStatus;
|
||||
import com.glxp.api.dao.thrsys.ThrCorpDao;
|
||||
import com.glxp.api.entity.basic.BasicCorpEntity;
|
||||
import com.glxp.api.entity.basic.BasicCorpsExportLogEntity;
|
||||
import com.glxp.api.entity.thrsys.ThrCorpEntity;
|
||||
import com.glxp.api.req.basic.BasicCorpsExportRequest;
|
||||
import com.glxp.api.req.basic.BasicUnitMaintainFilterRequest;
|
||||
import com.glxp.api.req.thrsys.FilterThrCorpRequest;
|
||||
import com.glxp.api.res.basic.BasicCorpExportLogResponse;
|
||||
import com.glxp.api.res.thrsys.ThrCorpsResponse;
|
||||
import com.glxp.api.service.basic.BasicCorpExportLogService;
|
||||
import com.glxp.api.service.basic.BasicUnitMaintainService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class BasicGenJsonService {
|
||||
|
||||
@Resource
|
||||
BasicCorpExportLogService corpExportLogService;
|
||||
@Resource
|
||||
BasicUnitMaintainService basicUnitMaintainService;
|
||||
// @Resource
|
||||
// UdiInfoExportLogService udiInfoExportLogService;
|
||||
// @Resource
|
||||
// UdiRelevanceService udiRelevanceService;
|
||||
// @Resource
|
||||
// UdiRelevanceDao udiRelevanceDao;
|
||||
// @Resource
|
||||
// UdiInfoDao udiInfoDao;
|
||||
// @Resource
|
||||
// ThrProductsDao thrProductsDao;
|
||||
@Resource
|
||||
ThrCorpDao thrCorpDao;
|
||||
|
||||
|
||||
public void exportCorp(String genKey, BasicCorpsExportRequest basicCorpsExportRequest) {
|
||||
BasicCorpsExportLogEntity corpExportLogEntity = corpExportLogService.selectByGenKey(genKey);
|
||||
BasicCorpExportLogResponse exportData = new BasicCorpExportLogResponse();
|
||||
|
||||
List<BasicCorpEntity> unitMaintainEntities = new ArrayList<>();
|
||||
if (basicCorpsExportRequest.getIds() != null && basicCorpsExportRequest.getIds().size() > 0) {
|
||||
List<Integer> ids = basicCorpsExportRequest.getIds();
|
||||
ids.forEach(id -> {
|
||||
BasicUnitMaintainFilterRequest request = new BasicUnitMaintainFilterRequest();
|
||||
request.setId(id);
|
||||
List<BasicCorpEntity> basicUnitMaintainEntities = basicUnitMaintainService.filterList(request);
|
||||
unitMaintainEntities.addAll(basicUnitMaintainEntities);
|
||||
getThrCorpList(exportData, basicUnitMaintainEntities);
|
||||
});
|
||||
} else { //一键导出
|
||||
BasicUnitMaintainFilterRequest filterRequest = new BasicUnitMaintainFilterRequest();
|
||||
BeanUtils.copyProperties(basicCorpsExportRequest, filterRequest);
|
||||
filterRequest.setPage(null);
|
||||
List<BasicCorpEntity> basicUnitMaintainEntities = basicUnitMaintainService.filterList(filterRequest);
|
||||
unitMaintainEntities.addAll(basicUnitMaintainEntities);
|
||||
getThrCorpList(exportData, basicUnitMaintainEntities);
|
||||
}
|
||||
|
||||
exportData.setCorpList(unitMaintainEntities);
|
||||
FileWriter writer = new FileWriter(corpExportLogEntity.getFilePath());
|
||||
writer.write(JSONUtil.toJsonStr(exportData));
|
||||
corpExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
|
||||
corpExportLogService.updateCorpExportLog(corpExportLogEntity);
|
||||
}
|
||||
|
||||
|
||||
public BasicCorpExportLogResponse exportCorpJson(BasicCorpsExportRequest corpsExportRequest) {
|
||||
BasicCorpExportLogResponse exportData = new BasicCorpExportLogResponse();
|
||||
List<BasicCorpEntity> unitMaintainEntities = new ArrayList<>();
|
||||
if (corpsExportRequest.getIds() != null && corpsExportRequest.getIds().size() > 0) {
|
||||
List<Integer> ids = corpsExportRequest.getIds();
|
||||
ids.forEach(id -> {
|
||||
BasicUnitMaintainFilterRequest request = new BasicUnitMaintainFilterRequest();
|
||||
request.setId(id);
|
||||
List<BasicCorpEntity> basicUnitMaintainEntities = basicUnitMaintainService.filterList(request);
|
||||
unitMaintainEntities.addAll(basicUnitMaintainEntities);
|
||||
getThrCorpList(exportData, basicUnitMaintainEntities);
|
||||
});
|
||||
} else { //一键导出
|
||||
BasicUnitMaintainFilterRequest filterRequest = new BasicUnitMaintainFilterRequest();
|
||||
BeanUtils.copyProperties(corpsExportRequest, filterRequest);
|
||||
filterRequest.setPage(null);
|
||||
List<BasicCorpEntity> basicUnitMaintainEntities = basicUnitMaintainService.filterList(filterRequest);
|
||||
unitMaintainEntities.addAll(basicUnitMaintainEntities);
|
||||
getThrCorpList(exportData, basicUnitMaintainEntities);
|
||||
}
|
||||
|
||||
exportData.setCorpList(unitMaintainEntities);
|
||||
return exportData;
|
||||
}
|
||||
//
|
||||
/**
|
||||
* 查询第三方往来单位信息
|
||||
*
|
||||
* @param exportData
|
||||
* @param basicUnitMaintainEntities
|
||||
*/
|
||||
private void getThrCorpList(BasicCorpExportLogResponse exportData, List<BasicCorpEntity> basicUnitMaintainEntities) {
|
||||
if (CollUtil.isNotEmpty(basicUnitMaintainEntities)) {
|
||||
List<ThrCorpsResponse> thrCorpEntities = new ArrayList<>();
|
||||
Field[] fields = ReflectUtil.getFields(BasicCorpEntity.class);
|
||||
basicUnitMaintainEntities.forEach(basicUnitMaintainEntity -> {
|
||||
for (Field field : fields) {
|
||||
if (field.getName().contains("thirdId")) {
|
||||
String value = String.valueOf(ReflectUtil.getFieldValue(basicUnitMaintainEntity, field));
|
||||
if (StrUtil.isNotBlank(value)) {
|
||||
FilterThrCorpRequest thrCorpRequest = new FilterThrCorpRequest();
|
||||
thrCorpRequest.setThirdSysFk("thirdId");
|
||||
thrCorpRequest.setUnitId(value);
|
||||
List<ThrCorpsResponse> result = thrCorpDao.filterThrCorps(thrCorpRequest);
|
||||
if (CollUtil.isNotEmpty(result)) {
|
||||
thrCorpEntities.addAll(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
if (CollUtil.isNotEmpty(thrCorpEntities)) {
|
||||
exportData.setThrCorpEntities(thrCorpEntities);
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * 导出json格式医疗器械信息
|
||||
// *
|
||||
// * @param genKey
|
||||
// * @param udiInfoExportRequest
|
||||
// */
|
||||
// @Async
|
||||
// public void exportUdiInfoJson(String genKey, UdiInfoExportRequest udiInfoExportRequest) {
|
||||
// UdiInfoExportLogEntity udiInfoExportLogEntity = udiInfoExportLogService.selectByGenKey(genKey);
|
||||
// UdiRelevanceExportJsonResponse exportData = paresDataJson(udiInfoExportRequest);
|
||||
// File file = new File(udiInfoExportLogEntity.getFilePath());
|
||||
// if (!file.exists()) {
|
||||
// try {
|
||||
// file.createNewFile();
|
||||
// } catch (Exception e) {
|
||||
// log.error("导出医疗器械信息异常", e);
|
||||
// }
|
||||
// }
|
||||
// FileWriter writer = new FileWriter(file);
|
||||
// writer.write(JSONUtil.toJsonStr(exportData));
|
||||
// udiInfoExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
|
||||
// udiInfoExportLogService.updateUdiInfoExportLog(udiInfoExportLogEntity);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public UdiRelevanceExportJsonResponse paresDataJson(UdiInfoExportRequest udiInfoExportRequest) {
|
||||
// UdiRelevanceExportJsonResponse exportData = new UdiRelevanceExportJsonResponse();
|
||||
// //选中导出
|
||||
// if (CollUtil.isNotEmpty(udiInfoExportRequest.getUuids())) {
|
||||
// List<String> uuids = udiInfoExportRequest.getUuids();
|
||||
// uuids.forEach(uuid -> {
|
||||
// FilterUdiInfoRequest filterUdiInfoRequest = new FilterUdiInfoRequest();
|
||||
// filterUdiInfoRequest.setUuid(uuid);
|
||||
// List<UdiRelevanceResponse> udiRelevanceResponses = udiRelevanceService.filterUdiRelevance(filterUdiInfoRequest);
|
||||
// if (CollUtil.isNotEmpty(udiRelevanceResponses)) {
|
||||
// parseUdiRelevanceResponses(exportData, udiRelevanceResponses);
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// //一键导出
|
||||
// FilterUdiInfoRequest filterUdiInfoRequest = new FilterUdiInfoRequest();
|
||||
// BeanUtil.copyProperties(udiInfoExportRequest, filterUdiInfoRequest);
|
||||
// filterUdiInfoRequest.setPage(null);
|
||||
// List<UdiRelevanceResponse> data = udiRelevanceService.filterUdiRelevance(filterUdiInfoRequest);
|
||||
// if (CollUtil.isNotEmpty(data)) {
|
||||
// parseUdiRelevanceResponses(exportData, data);
|
||||
// }
|
||||
// }
|
||||
// return exportData;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 解析医疗器械信息查询结果,封装完整数据
|
||||
// *
|
||||
// * @param exportData
|
||||
// * @param udiRelevanceResponses
|
||||
// */
|
||||
// private void parseUdiRelevanceResponses(UdiRelevanceExportJsonResponse exportData, List<UdiRelevanceResponse> udiRelevanceResponses) {
|
||||
// List<String> uuids = new ArrayList<>(udiRelevanceResponses.size());
|
||||
// udiRelevanceResponses.forEach(udi -> {
|
||||
// uuids.add(udi.getUuid());
|
||||
// });
|
||||
// List<UdiInfoEntity> udiInfoEntities = udiInfoDao.batchSelectByUuid(uuids);
|
||||
// List<UdiRelevanceEntity> udiRelevanceEntities = udiRelevanceDao.batchSelectByUuid(uuids);
|
||||
// if (CollUtil.isNotEmpty(udiRelevanceEntities)) {
|
||||
// List<ThrProductsEntity> thrProductsEntities = new ArrayList<>(udiRelevanceEntities.size());
|
||||
// Field[] fields = ReflectUtil.getFields(UdiRelevanceEntity.class);
|
||||
// udiRelevanceEntities.forEach(udiRelevanceEntity -> {
|
||||
// for (Field field : fields) {
|
||||
// if (field.getName().contains("thirdId")) {
|
||||
// Object fieldValue = ReflectUtil.getFieldValue(udiRelevanceEntity, field);
|
||||
// if (null != fieldValue) {
|
||||
// FilterThrProductsRequest filter = new FilterThrProductsRequest();
|
||||
// filter.setCode(String.valueOf(fieldValue));
|
||||
// filter.setThirdSysFk("thirdId");
|
||||
// List<ThrProductsEntity> result = thrProductsDao.filterThrProductsRequest(filter);
|
||||
// if (CollUtil.isNotEmpty(result)) {
|
||||
// thrProductsEntities.addAll(result);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// if (CollUtil.isNotEmpty(thrProductsEntities)) {
|
||||
// exportData.setThrProductsEntities(thrProductsEntities);
|
||||
// }
|
||||
// }
|
||||
// List<UdiInfoEntity> udiInfo = exportData.getUdiInfoEntities();
|
||||
// List<UdiRelevanceEntity> udiRelevance = exportData.getUdiRelevanceEntities();
|
||||
// udiInfo.addAll(udiInfoEntities);
|
||||
// udiRelevance.addAll(udiRelevanceEntities);
|
||||
// exportData.setUdiInfoEntities(udiInfo);
|
||||
// exportData.setUdiRelevanceEntities(udiRelevance);
|
||||
// }
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package com.glxp.api.dao.basic;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.glxp.api.entity.basic.BasicCorpEntity;
|
||||
|
||||
public interface BasicCorpDao extends BaseMapper<BasicCorpEntity> {
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.glxp.api.dao.basic;
|
||||
|
||||
|
||||
import com.glxp.api.entity.basic.BasicCorpEntity;
|
||||
import com.glxp.api.entity.basic.BasicCorpsExportLogEntity;
|
||||
import com.glxp.api.req.basic.FilterCorpExportLogRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BasicCorpExportLogDao {
|
||||
List<BasicCorpsExportLogEntity> filterCorpExportLog(FilterCorpExportLogRequest filterCorpExportLogRequest);
|
||||
|
||||
boolean insertCorpExportLog(BasicCorpsExportLogEntity corpExportLogEntity);
|
||||
|
||||
boolean updateCorpExportLog(BasicCorpsExportLogEntity corpExportLogEntity);
|
||||
|
||||
boolean deleteById(@Param("id") String id);
|
||||
|
||||
/**
|
||||
* 根据ID查询文件路径
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
String selectFilePathById(@Param("id") String id);
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.glxp.api.dao.basic;
|
||||
|
||||
|
||||
import com.glxp.api.entity.basic.BasicCorpsImportDetailEntity;
|
||||
import com.glxp.api.req.basic.FilterCorpImportLogRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BasicCorpImportDetailDao {
|
||||
|
||||
List<BasicCorpsImportDetailEntity> filterCorpImport(FilterCorpImportLogRequest filterCorpImportLogRequest);
|
||||
|
||||
boolean insertCorpImport(BasicCorpsImportDetailEntity corpImportDetailEntity);
|
||||
|
||||
boolean updateCorpImport(BasicCorpsImportDetailEntity corpImportDetailEntity);
|
||||
|
||||
boolean insertCorpImports(@Param("corps") List<BasicCorpsImportDetailEntity> corpImportDetailEntities);
|
||||
|
||||
boolean deleteById(@Param("id") String id);
|
||||
|
||||
boolean deleteByGenkey(@Param("genKey") String genKey);
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.glxp.api.dao.basic;
|
||||
|
||||
|
||||
import com.glxp.api.entity.basic.BasicCorpsImportLogEntity;
|
||||
import com.glxp.api.req.basic.FilterCorpImportLogRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BasicCorpImportLogDao {
|
||||
List<BasicCorpsImportLogEntity> filterImportLog(FilterCorpImportLogRequest filterCorpImportLogRequest);
|
||||
|
||||
boolean insertImportLog(BasicCorpsImportLogEntity corpImportLogEntity);
|
||||
|
||||
boolean updateImportLog(BasicCorpsImportLogEntity corpImportLogEntity);
|
||||
|
||||
boolean deleteById(@Param("id") String id);
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package com.glxp.api.dao.basic;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.glxp.api.entity.basic.BasicCorpsExportLogEntity;
|
||||
|
||||
public interface BasicCorpsExportLogDao extends BaseMapper<BasicCorpsExportLogEntity> {
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package com.glxp.api.dao.basic;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.glxp.api.entity.basic.BasicCorpsImportDetailEntity;
|
||||
|
||||
public interface BasicCorpsImportDetailDao extends BaseMapper<BasicCorpsImportDetailEntity> {
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package com.glxp.api.dao.basic;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.glxp.api.entity.basic.BasicCorpsImportLogEntity;
|
||||
|
||||
public interface BasicCorpsImportLogDao extends BaseMapper<BasicCorpsImportLogEntity> {
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.glxp.api.req.basic;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class BasicCorpsExportRequest {
|
||||
List<Integer> ids;
|
||||
private Integer id;
|
||||
private String key;
|
||||
private String unitId;
|
||||
private String name;
|
||||
private String thirdSys;
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.glxp.api.req.basic;
|
||||
|
||||
|
||||
import com.glxp.api.res.basic.BasicErpUnitsResponse;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class CombineUnitRequest {
|
||||
|
||||
List<String> keys;
|
||||
private String thirdSys;
|
||||
List<BasicErpUnitsResponse> custmandocResponses;
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.glxp.api.req.basic;
|
||||
|
||||
|
||||
import com.glxp.api.req.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FilterCorpExportLogRequest extends ListPageRequest {
|
||||
|
||||
|
||||
|
||||
private String genKey;
|
||||
private Integer status;
|
||||
private Integer type;
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.glxp.api.req.basic;
|
||||
|
||||
|
||||
import com.glxp.api.req.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class FilterCorpImportLogRequest extends ListPageRequest {
|
||||
|
||||
private Integer id;
|
||||
private String genKey;
|
||||
private Integer status;
|
||||
private String thirdSysFk;
|
||||
private String fromType;
|
||||
private String lastUpdateTime;
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.glxp.api.req.basic;
|
||||
|
||||
|
||||
import com.glxp.api.entity.basic.BasicCorpsImportDetailEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PostBasicCorpRequest {
|
||||
private String genKey;
|
||||
private List<BasicCorpsImportDetailEntity> datas;
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.glxp.api.res.basic;
|
||||
|
||||
|
||||
import com.glxp.api.entity.basic.BasicCorpEntity;
|
||||
import com.glxp.api.entity.thrsys.ThrCorpEntity;
|
||||
import com.glxp.api.res.thrsys.ThrCorpsResponse;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 往来单位信息数据导出
|
||||
*/
|
||||
@Data
|
||||
public class BasicCorpExportLogResponse {
|
||||
|
||||
/**
|
||||
* 基础往来单位信息
|
||||
*/
|
||||
private List<BasicCorpEntity> corpList;
|
||||
|
||||
/**
|
||||
* 第三方往来单位信息
|
||||
*/
|
||||
private List<ThrCorpsResponse> thrCorpEntities;
|
||||
|
||||
public BasicCorpExportLogResponse() {
|
||||
this.corpList = new ArrayList<>();
|
||||
this.thrCorpEntities = new ArrayList<>();
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.glxp.api.res.basic;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BasicErpUnitsResponse {
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String spell;
|
||||
private String addr;
|
||||
private String creditNo;
|
||||
private String contact;
|
||||
private String mobile;
|
||||
private Boolean checked;
|
||||
private String unitId; //必填 往来单位ID
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.glxp.api.service.basic;
|
||||
|
||||
|
||||
|
||||
import com.glxp.api.entity.basic.BasicCorpsExportLogEntity;
|
||||
import com.glxp.api.req.basic.FilterCorpExportLogRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BasicCorpExportLogService {
|
||||
|
||||
BasicCorpsExportLogEntity selectByGenKey(String genKey);
|
||||
|
||||
List<BasicCorpsExportLogEntity> filterCorpExportLog(FilterCorpExportLogRequest filterCorpExportLogRequest);
|
||||
|
||||
boolean insertCorpExportLog(BasicCorpsExportLogEntity corpExportLogEntity);
|
||||
|
||||
boolean updateCorpExportLog(BasicCorpsExportLogEntity corpExportLogEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.glxp.api.service.basic;
|
||||
|
||||
|
||||
import com.glxp.api.entity.basic.BasicCorpsImportDetailEntity;
|
||||
import com.glxp.api.req.basic.FilterCorpImportLogRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BasicCorpImportDetailService {
|
||||
|
||||
List<BasicCorpsImportDetailEntity> filterCorpImport(FilterCorpImportLogRequest filterCorpImportLogRequest);
|
||||
|
||||
boolean insertCorpImport(BasicCorpsImportDetailEntity corpImportDetailEntity);
|
||||
|
||||
boolean updateCorpImport(BasicCorpsImportDetailEntity corpImportDetailEntity);
|
||||
|
||||
boolean insertCorpImports(List<BasicCorpsImportDetailEntity> corpImportDetailEntities);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
boolean deleteByGenkey(String genKey);
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.glxp.api.service.basic;
|
||||
|
||||
|
||||
import com.glxp.api.entity.basic.BasicCorpsImportLogEntity;
|
||||
import com.glxp.api.req.basic.FilterCorpImportLogRequest;
|
||||
import com.glxp.api.res.basic.BasicCorpExportLogResponse;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BasicCorpImportLogService {
|
||||
|
||||
BasicCorpsImportLogEntity selectByGenKey(String genKey);
|
||||
|
||||
List<BasicCorpsImportLogEntity> filterImportLog(FilterCorpImportLogRequest filterCorpImportLogRequest);
|
||||
|
||||
boolean insertImportLog(BasicCorpsImportLogEntity corpImportLogEntity);
|
||||
|
||||
boolean updateImportLog(BasicCorpsImportLogEntity corpImportLogEntity);
|
||||
|
||||
boolean deleteById(@Param("id") String id);
|
||||
|
||||
void importCorps(String genKey);
|
||||
|
||||
|
||||
void importJsonData(BasicCorpExportLogResponse importData);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.glxp.api.service.basic.impl;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.basic.BasicCorpExportLogDao;
|
||||
import com.glxp.api.entity.basic.BasicCorpsExportLogEntity;
|
||||
import com.glxp.api.req.basic.FilterCorpExportLogRequest;
|
||||
import com.glxp.api.service.basic.BasicCorpExportLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BasicCorpExportLogServiceImpl implements BasicCorpExportLogService {
|
||||
|
||||
@Resource
|
||||
BasicCorpExportLogDao basicCorpExportLogDao;
|
||||
|
||||
@Override
|
||||
public BasicCorpsExportLogEntity selectByGenKey(String genKey) {
|
||||
FilterCorpExportLogRequest filterUdiEpLogRequest = new FilterCorpExportLogRequest();
|
||||
filterUdiEpLogRequest.setGenKey(genKey);
|
||||
List<BasicCorpsExportLogEntity> corpExportLogEntities = basicCorpExportLogDao.filterCorpExportLog(filterUdiEpLogRequest);
|
||||
if (corpExportLogEntities != null && corpExportLogEntities.size() > 0) {
|
||||
return corpExportLogEntities.get(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BasicCorpsExportLogEntity> filterCorpExportLog(FilterCorpExportLogRequest filterCorpExportLogRequest) {
|
||||
if (filterCorpExportLogRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (filterCorpExportLogRequest.getPage() != null) {
|
||||
int offset = (filterCorpExportLogRequest.getPage() - 1) * filterCorpExportLogRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, filterCorpExportLogRequest.getLimit());
|
||||
}
|
||||
List<BasicCorpsExportLogEntity> data = basicCorpExportLogDao.filterCorpExportLog(filterCorpExportLogRequest);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertCorpExportLog(BasicCorpsExportLogEntity basicCorpsExportLogEntity) {
|
||||
return basicCorpExportLogDao.insertCorpExportLog(basicCorpsExportLogEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateCorpExportLog(BasicCorpsExportLogEntity basicCorpsExportLogEntity) {
|
||||
return basicCorpExportLogDao.updateCorpExportLog(basicCorpsExportLogEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
//删除日志同步删除磁盘文件
|
||||
String filePath = basicCorpExportLogDao.selectFilePathById(id);
|
||||
if (StrUtil.isNotBlank(filePath)) {
|
||||
FileUtil.del(filePath);
|
||||
}
|
||||
return basicCorpExportLogDao.deleteById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.glxp.api.service.basic.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.basic.BasicCorpImportDetailDao;
|
||||
import com.glxp.api.entity.basic.BasicCorpsImportDetailEntity;
|
||||
import com.glxp.api.req.basic.FilterCorpImportLogRequest;
|
||||
import com.glxp.api.service.basic.BasicCorpImportDetailService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BasicCorpImportDetailServiceImpl implements BasicCorpImportDetailService {
|
||||
@Resource
|
||||
BasicCorpImportDetailDao basicCorpImportDetailDao;
|
||||
|
||||
@Override
|
||||
public List<BasicCorpsImportDetailEntity> filterCorpImport(FilterCorpImportLogRequest filterCorpImportLogRequest) {
|
||||
if (filterCorpImportLogRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (filterCorpImportLogRequest.getPage() != null) {
|
||||
int offset = (filterCorpImportLogRequest.getPage() - 1) * filterCorpImportLogRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, filterCorpImportLogRequest.getLimit());
|
||||
}
|
||||
List<BasicCorpsImportDetailEntity> data = basicCorpImportDetailDao.filterCorpImport(filterCorpImportLogRequest);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertCorpImport(BasicCorpsImportDetailEntity basicCorpsImportDetailEntity) {
|
||||
return basicCorpImportDetailDao.insertCorpImport(basicCorpsImportDetailEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateCorpImport(BasicCorpsImportDetailEntity basicCorpsImportDetailEntity) {
|
||||
return basicCorpImportDetailDao.updateCorpImport(basicCorpsImportDetailEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertCorpImports(List<BasicCorpsImportDetailEntity> basicCorpsImportDetailEntity) {
|
||||
return basicCorpImportDetailDao.insertCorpImports(basicCorpsImportDetailEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
return basicCorpImportDetailDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteByGenkey(String genKey) {
|
||||
return basicCorpImportDetailDao.deleteByGenkey(genKey);
|
||||
}
|
||||
}
|
@ -0,0 +1,164 @@
|
||||
package com.glxp.api.service.basic.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.constant.BasicProcessStatus;
|
||||
import com.glxp.api.dao.basic.BasicCorpImportLogDao;
|
||||
import com.glxp.api.dao.basic.BasicUnitMaintainDao;
|
||||
import com.glxp.api.dao.thrsys.ThrCorpDao;
|
||||
import com.glxp.api.entity.basic.BasicCorpEntity;
|
||||
import com.glxp.api.entity.basic.BasicCorpsImportDetailEntity;
|
||||
import com.glxp.api.entity.basic.BasicCorpsImportLogEntity;
|
||||
import com.glxp.api.entity.thrsys.ThrCorpEntity;
|
||||
import com.glxp.api.req.basic.BasicUnitMaintainFilterRequest;
|
||||
import com.glxp.api.req.basic.FilterCorpImportLogRequest;
|
||||
import com.glxp.api.res.basic.BasicCorpExportLogResponse;
|
||||
import com.glxp.api.res.thrsys.ThrCorpsResponse;
|
||||
import com.glxp.api.service.basic.BasicCorpImportDetailService;
|
||||
import com.glxp.api.service.basic.BasicCorpImportLogService;
|
||||
import com.glxp.api.service.basic.BasicUnitMaintainService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.session.ExecutorType;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.apache.ibatis.session.TransactionIsolationLevel;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class BasicCorpImportLogServiceImpl implements BasicCorpImportLogService {
|
||||
|
||||
@Resource
|
||||
BasicCorpImportLogDao basicCorpImportLogDao;
|
||||
|
||||
@Resource
|
||||
BasicCorpImportDetailService basicCorpImportDetailService;
|
||||
|
||||
@Resource
|
||||
BasicUnitMaintainService basicUnitMaintainService;
|
||||
|
||||
@Resource
|
||||
SqlSessionFactory sqlSessionFactory;
|
||||
|
||||
@Override
|
||||
public BasicCorpsImportLogEntity selectByGenKey(String genKey) {
|
||||
FilterCorpImportLogRequest filterCorpImportLogRequest = new FilterCorpImportLogRequest();
|
||||
filterCorpImportLogRequest.setGenKey(genKey);
|
||||
List<BasicCorpsImportLogEntity> data = basicCorpImportLogDao.filterImportLog(filterCorpImportLogRequest);
|
||||
if (data != null && data.size() > 0) {
|
||||
return data.get(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BasicCorpsImportLogEntity> filterImportLog(FilterCorpImportLogRequest filterCorpImportLogRequest) {
|
||||
if (filterCorpImportLogRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (filterCorpImportLogRequest.getPage() != null) {
|
||||
int offset = (filterCorpImportLogRequest.getPage() - 1) * filterCorpImportLogRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, filterCorpImportLogRequest.getLimit());
|
||||
}
|
||||
List<BasicCorpsImportLogEntity> data = basicCorpImportLogDao.filterImportLog(filterCorpImportLogRequest);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertImportLog(BasicCorpsImportLogEntity basicCorpsImportLogEntity) {
|
||||
return basicCorpImportLogDao.insertImportLog(basicCorpsImportLogEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateImportLog(BasicCorpsImportLogEntity corpImportLogEntity) {
|
||||
return basicCorpImportLogDao.updateImportLog(corpImportLogEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
return basicCorpImportLogDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Async
|
||||
@Override
|
||||
public void importCorps(String genKey) {
|
||||
|
||||
BasicCorpsImportLogEntity corpImportLogEntity =selectByGenKey(genKey);
|
||||
if (corpImportLogEntity != null && corpImportLogEntity.getStatus() == BasicProcessStatus.UDIINFO_IMPORT_UNPROCESS) {
|
||||
FilterCorpImportLogRequest filterUdiIpLogRequest = new FilterCorpImportLogRequest();
|
||||
filterUdiIpLogRequest.setGenKey(genKey);
|
||||
List<BasicCorpsImportDetailEntity> corpImportDetailEntities
|
||||
= basicCorpImportDetailService.filterCorpImport(filterUdiIpLogRequest);
|
||||
if (corpImportDetailEntities != null) {
|
||||
for (BasicCorpsImportDetailEntity corpImportDetailEntity : corpImportDetailEntities) {
|
||||
BasicCorpEntity basicCorpEntity = new BasicCorpEntity();
|
||||
BeanUtils.copyProperties(corpImportDetailEntity, basicCorpEntity);
|
||||
BasicUnitMaintainFilterRequest basicUnitMaintainFilterRequest = new BasicUnitMaintainFilterRequest();
|
||||
BeanUtils.copyProperties(corpImportDetailEntity, basicUnitMaintainFilterRequest);
|
||||
List<BasicCorpEntity> basicUnitMaintainEntities = basicUnitMaintainService.filterList(basicUnitMaintainFilterRequest);
|
||||
if (basicUnitMaintainEntities != null && basicUnitMaintainEntities.size() > 0) {
|
||||
basicUnitMaintainService.insertBasicUnitMaintain(basicCorpEntity);
|
||||
corpImportDetailEntity.setImportStatus(BasicProcessStatus.UDIINFO_IMPORT_CODE_SUCESS);
|
||||
} else {
|
||||
corpImportDetailEntity.setImportStatus(BasicProcessStatus.UDIINFO_IMPORT_CODE_FAIL);
|
||||
corpImportDetailEntity.setRemark("重复导入!");
|
||||
}
|
||||
basicCorpImportDetailService.updateCorpImport(corpImportDetailEntity);
|
||||
|
||||
}
|
||||
}
|
||||
corpImportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
|
||||
updateImportLog(corpImportLogEntity);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入上传文件中的往来单位信息
|
||||
*
|
||||
* @param
|
||||
*/
|
||||
@Async
|
||||
public void importJsonData(BasicCorpExportLogResponse importData) {
|
||||
if (null != importData) {
|
||||
SqlSession batchSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED);
|
||||
if (CollUtil.isNotEmpty(importData.getCorpList())) {
|
||||
try {
|
||||
List<BasicCorpEntity> corpList = importData.getCorpList();
|
||||
BasicUnitMaintainDao mapper = batchSession.getMapper(BasicUnitMaintainDao.class);
|
||||
for (BasicCorpEntity basicUnitMaintainEntity : corpList) {
|
||||
mapper.importBasicUnitMaintain(basicUnitMaintainEntity);
|
||||
}
|
||||
batchSession.commit();
|
||||
log.info("导入往来单位数据成功,导入数量为:{} 条", corpList.size());
|
||||
} catch (Exception e) {
|
||||
log.error("导入往来单位信息异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
if (CollUtil.isNotEmpty(importData.getThrCorpEntities())) {
|
||||
try {
|
||||
List<ThrCorpsResponse> thrCorpEntities = importData.getThrCorpEntities();
|
||||
ThrCorpDao mapper = batchSession.getMapper(ThrCorpDao.class);
|
||||
thrCorpEntities.forEach(thrCorpEntity -> {
|
||||
ThrCorpEntity thrCorpEntity1=new ThrCorpEntity();
|
||||
BeanUtils.copyProperties(thrCorpEntity1, thrCorpEntity);
|
||||
mapper.importThrCorp(thrCorpEntity1);
|
||||
});
|
||||
batchSession.commit();
|
||||
log.info("导入第三方往来单位数据成功,导入数量为:{}", thrCorpEntities.size());
|
||||
} catch (Exception e) {
|
||||
log.error("导入第三方往来单位数据失败", e);
|
||||
}
|
||||
}
|
||||
batchSession.close();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.glxp.api.dao.basic.BasicCorpDao">
|
||||
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicCorpEntity">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table basic_corp-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="erpId" jdbcType="VARCHAR" property="erpId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="spell" jdbcType="VARCHAR" property="spell" />
|
||||
<result column="addr" jdbcType="VARCHAR" property="addr" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="contact" jdbcType="VARCHAR" property="contact" />
|
||||
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
||||
<result column="creditNo" jdbcType="VARCHAR" property="creditNo" />
|
||||
<result column="thirdId" jdbcType="VARCHAR" property="thirdId" />
|
||||
<result column="thirdId1" jdbcType="VARCHAR" property="thirdId1" />
|
||||
<result column="thirdId2" jdbcType="VARCHAR" property="thirdId2" />
|
||||
<result column="thirdId3" jdbcType="VARCHAR" property="thirdId3" />
|
||||
<result column="thirdId4" jdbcType="VARCHAR" property="thirdId4" />
|
||||
<result column="thirdName" jdbcType="VARCHAR" property="thirdName" />
|
||||
<result column="thirdName1" jdbcType="VARCHAR" property="thirdName1" />
|
||||
<result column="thirdName2" jdbcType="VARCHAR" property="thirdName2" />
|
||||
<result column="thirdName3" jdbcType="VARCHAR" property="thirdName3" />
|
||||
<result column="thirdName4" jdbcType="VARCHAR" property="thirdName4" />
|
||||
<result column="corpType" jdbcType="TINYINT" property="corpType" />
|
||||
<result column="outType" jdbcType="TINYINT" property="outType" />
|
||||
<result column="createUser" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="updateUser" jdbcType="VARCHAR" property="updateUser" />
|
||||
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, erpId, `name`, spell, addr, `status`, `type`, contact, mobile, creditNo, thirdId,
|
||||
thirdId1, thirdId2, thirdId3, thirdId4, thirdName, thirdName1, thirdName2, thirdName3,
|
||||
thirdName4, corpType, outType, `createUser`, createTime, updateUser, updateTime,
|
||||
remark
|
||||
</sql>
|
||||
</mapper>
|
@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
|
||||
<mapper namespace="com.glxp.api.dao.basic.BasicCorpExportLogDao">
|
||||
|
||||
<select id="filterCorpExportLog" parameterType="com.glxp.api.req.basic.FilterCorpExportLogRequest"
|
||||
resultType="com.glxp.api.entity.basic.BasicCorpsExportLogEntity">
|
||||
SELECT * FROM basic_corps_export_log
|
||||
<where>
|
||||
<if test="genKey != '' and genKey != null">
|
||||
AND genKey = #{genKey}
|
||||
</if>
|
||||
<if test="status != '' and status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="type != '' and type != null">
|
||||
AND `type` = #{type}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY updateTime DESC
|
||||
</select>
|
||||
<select id="selectFilePathById" resultType="java.lang.String">
|
||||
select filePath from basic_corps_export_log where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertCorpExportLog" keyProperty="id"
|
||||
parameterType="com.glxp.api.entity.basic.BasicCorpsExportLogEntity">
|
||||
insert INTO basic_corps_export_log
|
||||
(genKey,updateTime,dlCount,status,filePath,remark,`type`)
|
||||
values
|
||||
(
|
||||
#{genKey},
|
||||
#{updateTime},
|
||||
#{dlCount},#{status},#{filePath},#{remark},#{type}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<delete id="deleteById" parameterType="Map">
|
||||
DELETE FROM basic_corps_export_log WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<update id="updateCorpExportLog" parameterType="com.glxp.api.entity.basic.BasicCorpsExportLogEntity">
|
||||
UPDATE basic_corps_export_log
|
||||
<set>
|
||||
<if test="updateTime != null">updateTime=#{updateTime},</if>
|
||||
<if test="dlCount != null">dlCount=#{dlCount},</if>
|
||||
<if test="status != null">status=#{status},</if>
|
||||
<if test="filePath != null">filePath=#{filePath},</if>
|
||||
<if test="remark != null">remark=#{remark},</if>
|
||||
</set>
|
||||
WHERE genKey = #{genKey}
|
||||
</update>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
|
||||
<mapper namespace="com.glxp.api.dao.basic.BasicCorpImportDetailDao">
|
||||
|
||||
<select id="filterCorpImport" parameterType="com.glxp.api.req.basic.FilterCorpImportLogRequest"
|
||||
resultType="com.glxp.api.entity.basic.BasicCorpsImportDetailEntity">
|
||||
SELECT * FROM basic_corps_import_detail
|
||||
<where>
|
||||
<if test="genKey != '' and genKey != null">
|
||||
AND genKeyFk = #{genKey}
|
||||
</if>
|
||||
<if test="id != '' and id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="status != '' and status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertCorpImport" keyProperty="id"
|
||||
parameterType="com.glxp.api.entity.basic.BasicCorpsImportDetailEntity">
|
||||
insert INTO basic_corps_import_detail
|
||||
(
|
||||
thirdId,erpId,name,spell,
|
||||
addr,status,type,creditNo,contact,mobile,thirdId1,thirdId2,thirdId3,thirdId4,
|
||||
thirdName,thirdName1,thirdName2,thirdName3,thirdName4,
|
||||
importStatus,updateTime,remark,genKeyFk)
|
||||
values
|
||||
(
|
||||
#{thirdId},
|
||||
#{erpId},
|
||||
#{name},
|
||||
#{spell},
|
||||
#{addr},
|
||||
#{status},
|
||||
#{type},
|
||||
#{creditNo},
|
||||
#{contact},
|
||||
#{mobile},#{thirdId1},#{thirdId2},#{thirdId3},#{thirdId4},
|
||||
#{thirdName},#{thirdName1},#{thirdName2},#{thirdName3},#{thirdName4},
|
||||
#{importStatus},
|
||||
#{updateTime},#{remark}, #{genKeyFk}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertCorpImports" keyProperty="id" parameterType="java.util.List">
|
||||
insert INTO basic_corps_import_detail
|
||||
(
|
||||
thirdId,erpId,name,spell,
|
||||
addr,status,type,creditNo,contact,mobile,thirdId1,thirdId2,thirdId3,thirdId4,
|
||||
thirdName,thirdName1,thirdName2,thirdName3,thirdName4,
|
||||
importStatus,updateTime,remark,genKeyFk)
|
||||
values
|
||||
<foreach collection="corps" item="item" index="index"
|
||||
separator=",">
|
||||
(
|
||||
#{item.thirdId},
|
||||
#{item.erpId},
|
||||
#{item.name},
|
||||
#{item.spell},
|
||||
#{item.addr},
|
||||
#{item.status},
|
||||
#{item.type},
|
||||
#{item.creditNo},
|
||||
#{item.contact},
|
||||
#{item.mobile},#{item.thirdId1},#{item.thirdId2},#{item.thirdId3},#{item.thirdId4},
|
||||
#{item.thirdName},#{item.thirdName1},#{item.thirdName2},#{item.thirdName3},#{item.thirdName4},
|
||||
#{item.importStatus},
|
||||
#{item.updateTime},#{item.remark}, #{item.genKeyFk}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<delete id="deleteById" parameterType="Map">
|
||||
DELETE FROM basic_corps_import_detail WHERE id = #{id}
|
||||
</delete>
|
||||
<delete id="deleteByGenkey" parameterType="Map">
|
||||
DELETE FROM basic_corps_import_detail WHERE genKeyFk = #{genKey}
|
||||
</delete>
|
||||
|
||||
<update id="updateCorpImport" parameterType="com.glxp.api.entity.basic.BasicCorpsImportDetailEntity">
|
||||
UPDATE basic_corps_import_detail
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="thirdId != null">thirdId=#{thirdId},</if>
|
||||
<if test="erpId != null">erpId=#{erpId},</if>
|
||||
<if test="name != null">name=#{name},</if>
|
||||
<if test="spell != null">spell=#{spell},</if>
|
||||
<if test="addr != null">addr=#{addr},</if>
|
||||
<if test="status != null">status=#{status},</if>
|
||||
<if test="type != null">type=#{type},</if>
|
||||
<if test="creditNo != null">creditNo=#{creditNo},</if>
|
||||
<if test="contact != null">contact=#{contact},</if>
|
||||
<if test="mobile != null">mobile=#{mobile},</if>
|
||||
<if test="thirdId1 != null">thirdId1=#{thirdId1},</if>
|
||||
<if test="thirdId2 != null">thirdId2=#{thirdId2},</if>
|
||||
<if test="thirdId3 != null">thirdId3=#{thirdId3},</if>
|
||||
<if test="thirdId4 != null">thirdId4=#{thirdId4},</if>
|
||||
<if test="thirdName != null">thirdName=#{thirdName},</if>
|
||||
<if test="thirdName1 != null">thirdName1=#{thirdName1},</if>
|
||||
<if test="thirdName2 != null">thirdName2=#{thirdName2},</if>
|
||||
<if test="thirdName3 != null">thirdName3=#{thirdName3},</if>
|
||||
<if test="thirdName4 != null">thirdName4=#{thirdName4},</if>
|
||||
<if test="importStatus != null">importStatus=#{importStatus},</if>
|
||||
<if test="updateTime != null">updateTime=#{updateTime},</if>
|
||||
<if test="remark != null">remark=#{remark},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
|
||||
<mapper namespace="com.glxp.api.dao.basic.BasicCorpImportLogDao">
|
||||
|
||||
<select id="filterImportLog" parameterType="com.glxp.api.req.basic.FilterCorpImportLogRequest"
|
||||
resultType="com.glxp.api.entity.basic.BasicCorpsImportLogEntity">
|
||||
SELECT * FROM basic_corps_import_log
|
||||
<where>
|
||||
<if test="genKey != '' and genKey != null">
|
||||
AND genKey = #{genKey}
|
||||
</if>
|
||||
<if test="id != '' and id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="status != '' and status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY updateTime DESC
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertImportLog" keyProperty="id" parameterType="com.glxp.api.entity.basic.BasicCorpsImportLogEntity">
|
||||
insert INTO basic_corps_import_log
|
||||
(genKey,fromType,updateTime,remark,status)
|
||||
values
|
||||
(
|
||||
#{genKey},
|
||||
#{fromType},
|
||||
#{updateTime},
|
||||
#{remark},#{status}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<delete id="deleteById" parameterType="Map">
|
||||
DELETE FROM basic_corps_import_log WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<update id="updateImportLog" parameterType="com.glxp.api.entity.basic.BasicCorpsImportLogEntity">
|
||||
UPDATE basic_corps_import_log
|
||||
<set>
|
||||
<if test="genKey != null">genKey=#{genKey},</if>
|
||||
<if test="fromType != null">fromType=#{fromType},</if>
|
||||
<if test="updateTime != null">updateTime=#{updateTime},</if>
|
||||
<if test="status != null">status=#{status},</if>
|
||||
<if test="remark != null">remark=#{remark},</if>
|
||||
</set>
|
||||
WHERE genKey = #{genKey}
|
||||
</update>
|
||||
|
||||
</mapper>
|
@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.glxp.api.dao.basic.BasicCorpsExportLogDao">
|
||||
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicCorpsExportLogEntity">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table basic_corps_export_log-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="genKey" jdbcType="VARCHAR" property="genKey" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
<result column="dlCount" jdbcType="INTEGER" property="dlCount" />
|
||||
<result column="filePath" jdbcType="VARCHAR" property="filePath" />
|
||||
<result column="type" jdbcType="INTEGER" property="type" />
|
||||
<result column="createUser" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="updateUser" jdbcType="VARCHAR" property="updateUser" />
|
||||
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, genKey, `status`, dlCount, filePath, `type`, `createUser`, createTime, updateUser,
|
||||
updateTime, remark
|
||||
</sql>
|
||||
</mapper>
|
@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.glxp.api.dao.basic.BasicCorpsImportDetailDao">
|
||||
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicCorpsImportDetailEntity">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table basic_corps_import_detail-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="thirdId" jdbcType="VARCHAR" property="thirdId" />
|
||||
<result column="erpId" jdbcType="VARCHAR" property="erpId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="spell" jdbcType="VARCHAR" property="spell" />
|
||||
<result column="addr" jdbcType="VARCHAR" property="addr" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="contact" jdbcType="VARCHAR" property="contact" />
|
||||
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
||||
<result column="creditNo" jdbcType="VARCHAR" property="creditNo" />
|
||||
<result column="thirdId1" jdbcType="VARCHAR" property="thirdId1" />
|
||||
<result column="thirdId2" jdbcType="VARCHAR" property="thirdId2" />
|
||||
<result column="thirdId3" jdbcType="VARCHAR" property="thirdId3" />
|
||||
<result column="thirdId4" jdbcType="VARCHAR" property="thirdId4" />
|
||||
<result column="thirdName1" jdbcType="VARCHAR" property="thirdName1" />
|
||||
<result column="thirdName2" jdbcType="VARCHAR" property="thirdName2" />
|
||||
<result column="thirdName3" jdbcType="VARCHAR" property="thirdName3" />
|
||||
<result column="thirdName4" jdbcType="VARCHAR" property="thirdName4" />
|
||||
<result column="thirdName" jdbcType="VARCHAR" property="thirdName" />
|
||||
<result column="genKeyFk" jdbcType="VARCHAR" property="genKeyFk" />
|
||||
<result column="importStatus" jdbcType="INTEGER" property="importStatus" />
|
||||
<result column="createUser" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="updateUser" jdbcType="VARCHAR" property="updateUser" />
|
||||
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, thirdId, erpId, `name`, spell, addr, `status`, `type`, contact, mobile, creditNo,
|
||||
thirdId1, thirdId2, thirdId3, thirdId4, thirdName1, thirdName2, thirdName3, thirdName4,
|
||||
thirdName, genKeyFk, importStatus, `createUser`, createTime, updateUser, updateTime,
|
||||
remark
|
||||
</sql>
|
||||
</mapper>
|
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.glxp.api.dao.basic.BasicCorpsImportLogDao">
|
||||
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicCorpsImportLogEntity">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table basic_corps_import_log-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="genKey" jdbcType="VARCHAR" property="genKey" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="fromType" jdbcType="VARCHAR" property="fromType" />
|
||||
<result column="createUser" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="updateUser" jdbcType="VARCHAR" property="updateUser" />
|
||||
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, genKey, `status`, fromType, `createUser`, createTime, updateUser, updateTime,
|
||||
remark
|
||||
</sql>
|
||||
</mapper>
|
Loading…
Reference in New Issue