修改第三方产品信息 结果全部导出问题以及 编辑第三方部门信息仓库会联动问题

pro
wangwei 2 years ago
parent 85324b42db
commit 42cd45112b

@ -100,16 +100,7 @@ public class ThrDeptController {
}
String id = Long.toString(thrDeptEntity.getId());
ThrDeptEntity thrDeptEntity1 = thrDeptService.selectById(id);
//查询该部门下的仓库
filterThrSubInvWarehouseRequest.setParentId(thrDeptEntity1.getCode());
List<ThrInvWarehouseEntity> thrDept = thrInvWarehouseService.filterThrInvWarehouse(filterThrSubInvWarehouseRequest);
for (ThrInvWarehouseEntity thrInvWarehouseEntity : thrDept) {
thrInvWarehouseEntity.setParentId(thrDeptEntity.getCode());
thrInvWarehouseEntity.setThirdSysFk(thrDeptEntity.getThirdSysFk());
//修改仓库
thrInvWarehouseService.updateThrInvWarehouse(thrInvWarehouseEntity);
}
//判断部门是否存在
filterThrDeptRequest.setCode(thrDeptEntity.getCode());
filterThrDeptRequest.setName(thrDeptEntity.getName());
@ -122,6 +113,16 @@ public class ThrDeptController {
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
//查询该部门下的仓库
filterThrSubInvWarehouseRequest.setParentId(thrDeptEntity1.getCode());
List<ThrInvWarehouseEntity> thrDept = thrInvWarehouseService.filterThrInvWarehouse(filterThrSubInvWarehouseRequest);
for (ThrInvWarehouseEntity thrInvWarehouseEntity : thrDept) {
thrInvWarehouseEntity.setParentId(thrDeptEntity.getCode());
thrInvWarehouseEntity.setThirdSysFk(thrDeptEntity.getThirdSysFk());
//修改仓库
thrInvWarehouseService.updateThrInvWarehouse(thrInvWarehouseEntity);
}
return ResultVOUtils.success();
} else {
return ResultVOUtils.error(ResultEnum.DATA_REPEAT);

@ -5,6 +5,7 @@ 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.thrsys.ThrProductsEntity;
import com.glxp.api.entity.thrsys.ThrProductsExportLogEntity;
import com.glxp.api.entity.thrsys.ThrSystemDetailEntity;
import com.glxp.api.http.ErpBasicClient;
@ -118,6 +119,11 @@ public class ThrProductsExportLogController {
@PostMapping("/udiwms/thrProducts/importLog/export")
public BaseResponse excelDownload(@RequestBody ThrProductsExportRequest thrProductsExportRequest) {
ThrProductsExportLogEntity thrProductsExportLogEntity = new ThrProductsExportLogEntity();
FilterThrProductsRequest filterThrProductsRequest = new FilterThrProductsRequest();
filterThrProductsRequest.setThirdSysFk(thrProductsExportRequest.getThirdSys());
filterThrProductsRequest.setThirdSys(thrProductsExportRequest.getThirdSys());
List<ThrProductsEntity> thrProductsEntities = thrProductsService.filterThrProducts1(filterThrProductsRequest);
thrProductsExportRequest.setThrProductsEntities(thrProductsEntities);
thrProductsExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_PROCESS);
String genKey = CustomUtil.getId();
String fileName = "D:\\udiwms\\exportFile\\" + "第三方产品信息" + genKey + ".UpperIn";

Loading…
Cancel
Save