第三方基础数据拉取查询问题

dev_unify
qiuyt 7 months ago
parent ed2cab2506
commit 46e96c44e1

@ -138,6 +138,7 @@ public class BasicSkPrescribeController extends BaseController {
collectOrderRequest.setEndTime(sickerPrescribeSaveRequest.getEndTime());
collectOrderRequest.setBusType(sickerPrescribeSaveRequest.getBusType());
collectOrderRequest.setBillNo(sickerPrescribeSaveRequest.getBillNo());
collectOrderRequest.setKeyWords(sickerPrescribeSaveRequest.getKeyWords());
return collectOriginService.downloadOrderV2(collectOrderRequest);
}

@ -81,10 +81,10 @@ public class IoCollectOriginController extends BaseController {
getSickPrescribeRequest.setWorkPlaceCode(collectOrderRequest.getWorkPlaceCode());
getSickPrescribeRequest.setFromType(collectOrderRequest.getFromType());
if (StrUtil.isNotEmpty(collectOrderRequest.getStartTime())){
getSickPrescribeRequest.setStartTime(collectOrderRequest.getStartTime() + "00:00:00");
getSickPrescribeRequest.setStartTime(collectOrderRequest.getStartTime() + " 00:00:00");
}
if (StrUtil.isNotEmpty(collectOrderRequest.getEndTime())){
getSickPrescribeRequest.setEndTime(collectOrderRequest.getEndTime()+ "23:59:59");
getSickPrescribeRequest.setEndTime(collectOrderRequest.getEndTime()+ " 23:59:59");
}
getSickPrescribeRequest.setKey(collectOrderRequest.getKeyWords());
getSickPrescribeRequest.setPage(collectOrderRequest.getPage());

@ -51,6 +51,7 @@ public class ThrProductsEntity {
/**
*
*/
@TableField("manufactory")
private String manufactory;
@TableField("thirdSysFk")

@ -24,6 +24,7 @@ import com.glxp.api.service.thrsys.ThrSystemService;
import com.glxp.api.util.OkHttpCli;
import lombok.extern.slf4j.Slf4j;
import okhttp3.*;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@ -54,7 +55,8 @@ public class ErpBasicClient {
public BaseResponse<PageSimpleResponse<ThrCorpsResponse>> getErpCrop(ThrUnitMaintainFilterRequest thrUnitMaintainFilterRequest) {
UdiwmsUnitRequest udiwmsUnitRequest = new UdiwmsUnitRequest();
BeanUtils.copyProperties(thrUnitMaintainFilterRequest, udiwmsUnitRequest);
udiwmsUnitRequest.setUnitId(thrUnitMaintainFilterRequest.getErpId());
String unitId = StringUtils.isNotEmpty(thrUnitMaintainFilterRequest.getErpId()) ? thrUnitMaintainFilterRequest.getErpId() : thrUnitMaintainFilterRequest.getUnitId();
udiwmsUnitRequest.setUnitId(unitId);
ThrSystemEntity thrSystemEntity = basicThirdSysService.selectByThirdId(thrUnitMaintainFilterRequest.getThirdSysFk());
try {
String url = thrSystemEntity.getThridUrl() + "/udiwms/erp/getUnits";

@ -6,7 +6,7 @@ import lombok.Data;
@Data
public class UdiwmsUnitRequest extends ListPageRequest {
String key;
private String key;
private String unitId;
private String name;
}

@ -19,7 +19,7 @@ public class SickerPrescribeSaveRequest {
private String endTime;
private String startTime;
private String keyWords;
@NotNull(message = "处方列表不可以为空!")
private List<IoCollectOrder> list;
}

@ -35,7 +35,10 @@ public class ThrDeptServiceImpl extends ServiceImpl<ThrDeptDao, ThrDeptEntity> i
private ErpBasicClient erpBasicClient;
@Resource
private ThrInvWarehouseDao thrInvWarehouseDao;
@Resource
private ThrDeptServiceImpl thrDeptService;
@Resource
private ThrInvWarehouseServiceImpl thrInvWarehouseService;
@Override
public ThrDeptEntity findDefault(Boolean advaceType, Boolean isDefault) {
@ -161,9 +164,39 @@ public class ThrDeptServiceImpl extends ServiceImpl<ThrDeptDao, ThrDeptEntity> i
}
thrDeptDao.delete(new QueryWrapper<>());
thrInvWarehouseDao.delete(new QueryWrapper<>());
thrInvWarehouseService.saveBatch(warehouseList);
this.saveBatch(list);
// if(list!= null && list.size() >0){
// for (ThrDeptEntity thrDeptEntity : list) {
// QueryWrapper queryWrapper = new QueryWrapper<ThrDeptEntity>().eq("code",thrDeptEntity.getCode());
// ThrDeptEntity thrDeptEntityNew = thrDeptDao.selectOne(queryWrapper);
// if(thrDeptEntityNew!=null){
// thrDeptDao.update(thrDeptEntity,queryWrapper);
// }else {
// thrDeptDao.insert(thrDeptEntity);
//
// }
// }
// }
// if(warehouseList!= null && warehouseList.size() >0){
// for (ThrInvWarehouseEntity invWarehouseEntity : warehouseList) {
// QueryWrapper queryWrapper = new QueryWrapper<ThrDeptEntity>().eq("code",invWarehouseEntity.getCode());
// ThrInvWarehouseEntity thrInvWarehouseEntityNew = thrInvWarehouseDao.selectOne(queryWrapper);
// if(thrInvWarehouseEntityNew!=null){
// thrInvWarehouseDao.update(invWarehouseEntity,queryWrapper);
// }else {
// thrInvWarehouseDao.insert(invWarehouseEntity);
//
// }
// }
// }
//插入数据
thrDeptDao.insertThrDeptList(list);
thrInvWarehouseDao.insertThrInvWarehouses(warehouseList);
// thrDeptDao.insertOrUpdateBatch(list);
// thrInvWarehouseDao.insertOrUpdateBatch(warehouseList);
// thrInvWarehouseDao.insertThrInvWarehouses(warehouseList);
if (list.size() >= limit) {
page++;
} else {

Loading…
Cancel
Save