1.修复bug

master
x_z 2 years ago
parent 263e5d0dac
commit 7e22e0190f

@ -41,7 +41,8 @@ public class BasicCorpExportLogController {
@Resource
private BasicCorpService basicUnitMaintainService;
@Resource
private BasicGenJsonService basicGenJsonService;;
private BasicGenJsonService basicGenJsonService;
;
@GetMapping("/udiwms/corps/exportLog/filter")
public BaseResponse filter(FilterCorpExportLogRequest filterCorpExportLogRequest,
@ -115,18 +116,18 @@ public class BasicCorpExportLogController {
public BaseResponse excelDownload(@RequestBody BasicCorpsExportRequest basicCorpsExportRequest) {
String fileName = "D:\\udiwms\\exportFile\\" + "往来单位信息导出" + System.currentTimeMillis() + ".udi";
BasicCorpsExportLogEntity corpExportLogEntity = new BasicCorpsExportLogEntity();
List<Integer> ids=basicCorpsExportRequest.getIds();
corpExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_PROCESS);
String genKey = CustomUtil.getId();
corpExportLogEntity.setGenKey(genKey);
corpExportLogEntity.setFilePath(fileName);
corpExportLogEntity.setUpdateTime(new Date());
corpExportLogEntity.setDlCount(0);
corpExportLogEntity.setRemark("本次导出数据"+ids.size()+"条");
corpExportLogEntity.setType(BasicProcessStatus.EXPORT_JSON);
basicCorpExportLogService.insertCorpExportLog(corpExportLogEntity);
//basicGenExcelService.exportCorp(genKey, corpsExportRequest);
basicGenJsonService.exportCorp(genKey, basicCorpsExportRequest);
return ResultVOUtils.success("后台正在导出生成udi文件请稍后刷新查看!");
}

@ -88,6 +88,7 @@ public class BasicGenJsonService {
FileWriter writer = new FileWriter(corpExportLogEntity.getFilePath());
writer.write(JSONUtil.toJsonStr(exportData));
corpExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
corpExportLogEntity.setRemark("本次导出数据 " + exportData.getCorpList().size() + "条");
corpExportLogService.updateCorpExportLog(corpExportLogEntity);
}

@ -11,7 +11,9 @@ import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BusinessType;
import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.entity.auth.*;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.auth.AuthRoleAdmin;
import com.glxp.api.entity.auth.CustomerInfoEntity;
import com.glxp.api.entity.basic.BasicCorpEntity;
import com.glxp.api.entity.purchase.CustomerContactEntity;
import com.glxp.api.entity.purchase.SupCertEntity;
@ -27,14 +29,12 @@ import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.service.auth.AuthAdminService;
import com.glxp.api.service.auth.AuthRoleAdminService;
import com.glxp.api.service.auth.CustomerInfoService;
import com.glxp.api.service.auth.ISysRoleService;
import com.glxp.api.service.basic.BasicCorpService;
import com.glxp.api.service.purchase.CustomerContactService;
import com.glxp.api.service.purchase.SupCertService;
import com.glxp.api.service.purchase.SupCertSetService;
import com.glxp.api.service.purchase.SupCompanyService;
import com.glxp.api.util.CustomUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -45,7 +45,6 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.ListIterator;
@ -275,7 +274,7 @@ public class SupCompanyController {
//修改用户角色
if (companyEntity.getRoleId() != null) {
CustomerInfoEntity customerInfoEntity = new CustomerInfoEntity();
CustomerInfoEntity customerInfoEntity = customerInfoService.findByCustomerId(companyEntity.getCustomerId());
customerInfoEntity.setCustomerId(Long.valueOf(companyEntity.getCustomerId()));
customerInfoEntity.setRoleId(companyEntity.getRoleId());
customerInfoEntity.setCompanyName(companyEntity.getCompanyName());

@ -25,4 +25,12 @@ public interface CustomerInfoService {
boolean isExitRoleId(String roleId);
CustomerDetailEntity selectDetail(String customerId);
/**
* ID
*
* @param customerId
* @return
*/
CustomerInfoEntity findByCustomerId(String customerId);
}

@ -91,4 +91,9 @@ public class CustomerInfoServiceImpl implements CustomerInfoService {
public CustomerDetailEntity selectDetail(String customerId) {
return customerInfoDao.selectDetail(customerId);
}
@Override
public CustomerInfoEntity findByCustomerId(String customerId) {
return customerInfoDao.selectById(customerId);
}
}

Loading…
Cancel
Save