代码更新完善
							parent
							
								
									b7b48fdeb7
								
							
						
					
					
						commit
						49ea846446
					
				@ -0,0 +1,58 @@
 | 
				
			|||||||
 | 
					package com.glxp.api.controller.basic;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.alibaba.fastjson.JSONObject;
 | 
				
			||||||
 | 
					import com.alibaba.fastjson.TypeReference;
 | 
				
			||||||
 | 
					import com.glxp.api.annotation.Log;
 | 
				
			||||||
 | 
					import com.glxp.api.common.res.BaseResponse;
 | 
				
			||||||
 | 
					import com.glxp.api.constant.BasicProcessStatus;
 | 
				
			||||||
 | 
					import com.glxp.api.constant.BusinessType;
 | 
				
			||||||
 | 
					import com.glxp.api.entity.basic.BasicCorpEntity;
 | 
				
			||||||
 | 
					import com.glxp.api.entity.basic.BasicCorpsExportLogEntity;
 | 
				
			||||||
 | 
					import com.glxp.api.entity.basic.BasicProductsExportLogEntity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.glxp.api.entity.system.SyncDataSetEntity;
 | 
				
			||||||
 | 
					import com.glxp.api.http.HttpOkClient;
 | 
				
			||||||
 | 
					import com.glxp.api.res.basic.UdiRelevanceExportJsonResponse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.glxp.api.service.basic.BasicProductsExportLogService;
 | 
				
			||||||
 | 
					import com.glxp.api.service.sync.SyncDataSetService;
 | 
				
			||||||
 | 
					import org.springframework.scheduling.annotation.Async;
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import javax.annotation.Resource;
 | 
				
			||||||
 | 
					import java.io.File;
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Service
 | 
				
			||||||
 | 
					public class BasicGenExcelService {
 | 
				
			||||||
 | 
					    @Resource
 | 
				
			||||||
 | 
					    BasicProductsExportLogService basicProductsExportLogService;
 | 
				
			||||||
 | 
					    @Resource
 | 
				
			||||||
 | 
					    HttpOkClient httpOkClient;
 | 
				
			||||||
 | 
					    @Resource
 | 
				
			||||||
 | 
					    SyncDataSetService syncDataSetService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Async
 | 
				
			||||||
 | 
					    @Log(title = "单据管理", businessType = BusinessType.UPDATE)
 | 
				
			||||||
 | 
					    public void uploadProductsSmpJson(String genKey, UdiRelevanceExportJsonResponse exportData) {
 | 
				
			||||||
 | 
					        BasicProductsExportLogEntity basicProductsExportLogEntity = basicProductsExportLogService.selectByGenKey(genKey);
 | 
				
			||||||
 | 
					//        String response = HttpClient.uCloudPost(spsSyncUrl + "/udiwms/basic/products/upload", exportData);
 | 
				
			||||||
 | 
					        String response = httpOkClient.uCloudPost(getIpUrl() + "/spssync/basic/udiinfo/upload", exportData);
 | 
				
			||||||
 | 
					        BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        if (baseResponse.getCode() == 20000) {
 | 
				
			||||||
 | 
					            basicProductsExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            basicProductsExportLogEntity.setRemark(baseResponse.getMessage());
 | 
				
			||||||
 | 
					            basicProductsExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        basicProductsExportLogService.updateUdiInfoExportLog(basicProductsExportLogEntity);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getIpUrl() {
 | 
				
			||||||
 | 
					        SyncDataSetEntity syncDataSetEntity = syncDataSetService.findSet();
 | 
				
			||||||
 | 
					        return syncDataSetEntity.getSyncIp();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,18 @@
 | 
				
			|||||||
 | 
					package com.glxp.api.dao.basic;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.glxp.api.entity.basic.BasicProductsExportLogEntity;
 | 
				
			||||||
 | 
					import com.glxp.api.req.basic.FilterUdiEpLogRequest;
 | 
				
			||||||
 | 
					import org.apache.ibatis.annotations.Mapper;
 | 
				
			||||||
 | 
					import org.apache.ibatis.annotations.Param;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Mapper
 | 
				
			||||||
 | 
					public interface BasicProductsExportLogDao {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    List<BasicProductsExportLogEntity> filterUdiInfoExportLog(FilterUdiEpLogRequest filterInCodeLogRequest);
 | 
				
			||||||
 | 
					    boolean insertUdiInfoExportLog(BasicProductsExportLogEntity udiInfoImportEntity);
 | 
				
			||||||
 | 
					    boolean updateUdiInfoExportLog(BasicProductsExportLogEntity udiInfoImportEntity);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,22 @@
 | 
				
			|||||||
 | 
					package com.glxp.api.dao.basic;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.glxp.api.entity.basic.UdiProductEntity;
 | 
				
			||||||
 | 
					import com.glxp.api.req.basic.FilterUdiRelRequest;
 | 
				
			||||||
 | 
					import com.glxp.api.req.basic.UdiInfoRequest;
 | 
				
			||||||
 | 
					import com.glxp.api.res.basic.UdiRelevanceResponse;
 | 
				
			||||||
 | 
					import org.apache.ibatis.annotations.Mapper;
 | 
				
			||||||
 | 
					import org.apache.ibatis.annotations.Param;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Mapper
 | 
				
			||||||
 | 
					public interface UdiProductDao {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 根据UUID批量查询数据
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    List<UdiProductEntity> batchSelectByUuid(@Param("uuids") List<String> uuids);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,26 @@
 | 
				
			|||||||
 | 
					package com.glxp.api.dao.thrsys;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.glxp.api.dao.BaseMapperPlus;
 | 
				
			||||||
 | 
					import com.glxp.api.entity.thrsys.FilterThrProductsRequest;
 | 
				
			||||||
 | 
					import com.glxp.api.entity.thrsys.ThrProductsEntity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.apache.ibatis.annotations.Param;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * <p>
 | 
				
			||||||
 | 
					 * Mapper 接口
 | 
				
			||||||
 | 
					 * </p>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author ${author}
 | 
				
			||||||
 | 
					 * @since 2023-01-10
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public interface ThrProductsDao extends BaseMapperPlus<ThrProductsDao, ThrProductsEntity, ThrProductsEntity> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    List<ThrProductsEntity> filterThrProducts(FilterThrProductsRequest filterThrProductsRequest);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,39 @@
 | 
				
			|||||||
 | 
					package com.glxp.api.entity.thrsys;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.glxp.api.util.page.ListPageRequest;
 | 
				
			||||||
 | 
					import lombok.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Data
 | 
				
			||||||
 | 
					public class FilterThrProductsRequest extends ListPageRequest {
 | 
				
			||||||
 | 
					    private List<ThrProductsEntity> thrProductsEntities;
 | 
				
			||||||
 | 
					    private String code;
 | 
				
			||||||
 | 
					    private String name;
 | 
				
			||||||
 | 
					    private String spec;        //规格型号
 | 
				
			||||||
 | 
					    private String registerNo;  //注册证号
 | 
				
			||||||
 | 
					    private String manufactory; //生产厂家
 | 
				
			||||||
 | 
					    private String thirdSys;
 | 
				
			||||||
 | 
					    private String thirdSysFk;
 | 
				
			||||||
 | 
					    private String unionCode;
 | 
				
			||||||
 | 
					    private String sptm;
 | 
				
			||||||
 | 
					    private String ybbm;
 | 
				
			||||||
 | 
					    private String supName;
 | 
				
			||||||
 | 
					    private String lastUpdateTime;
 | 
				
			||||||
 | 
					    private String companyName;
 | 
				
			||||||
 | 
					    private Boolean isDownThrSys;
 | 
				
			||||||
 | 
					    private Integer status;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private List<String> codes;
 | 
				
			||||||
 | 
					    private Integer checkStatus;
 | 
				
			||||||
 | 
					    private String customerId;
 | 
				
			||||||
 | 
					    private String supId;
 | 
				
			||||||
 | 
					    private Long id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private String uuid;
 | 
				
			||||||
 | 
					    private Integer diType;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,58 @@
 | 
				
			|||||||
 | 
					package com.glxp.api.http;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import cn.hutool.core.util.StrUtil;
 | 
				
			||||||
 | 
					import cn.hutool.json.JSONUtil;
 | 
				
			||||||
 | 
					import com.glxp.api.entity.thrsys.ThrSystemEntity;
 | 
				
			||||||
 | 
					import com.glxp.api.util.OkHttpCli;
 | 
				
			||||||
 | 
					import lombok.extern.slf4j.Slf4j;
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import javax.annotation.Resource;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Slf4j
 | 
				
			||||||
 | 
					@Service
 | 
				
			||||||
 | 
					public class HttpOkClient {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Resource
 | 
				
			||||||
 | 
					    OkHttpCli okHttpCli;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String uCloudPost(String url, Object object) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String json = JSONUtil.toJsonStr(object);
 | 
				
			||||||
 | 
					        log.info(url + "\n" + json);
 | 
				
			||||||
 | 
					        String response = okHttpCli.doPostJson(url, json, "Content-Type", "application/json");
 | 
				
			||||||
 | 
					        return response;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String uCloudPost(String url, Object object, ThrSystemEntity thrSystemEntity) {
 | 
				
			||||||
 | 
					        String json = JSONUtil.toJsonStr(object);
 | 
				
			||||||
 | 
					        log.info(url + "\n" + json);
 | 
				
			||||||
 | 
					        List<String> header = new ArrayList<>();
 | 
				
			||||||
 | 
					        header.add("Content-Type");
 | 
				
			||||||
 | 
					        header.add("application/json");
 | 
				
			||||||
 | 
					        if (null != thrSystemEntity) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (StrUtil.isNotEmpty(thrSystemEntity.getApikey())) {
 | 
				
			||||||
 | 
					                header.add("api_key");
 | 
				
			||||||
 | 
					                header.add(thrSystemEntity.getApikey());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (StrUtil.isNotEmpty(thrSystemEntity.getSecretkey())) {
 | 
				
			||||||
 | 
					                header.add("secret_key");
 | 
				
			||||||
 | 
					                header.add(thrSystemEntity.getSecretkey());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String[] strArray = new String[header.size()];
 | 
				
			||||||
 | 
					        header.toArray(strArray);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return okHttpCli.doPostJson(url, json, strArray);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,40 @@
 | 
				
			|||||||
 | 
					package com.glxp.api.req.thrsys;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.glxp.api.entity.thrsys.ThrProductsEntity;
 | 
				
			||||||
 | 
					import com.glxp.api.util.page.ListPageRequest;
 | 
				
			||||||
 | 
					import lombok.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Data
 | 
				
			||||||
 | 
					public class FilterThrProductsRequest extends ListPageRequest {
 | 
				
			||||||
 | 
					    private List<ThrProductsEntity> thrProductsEntities;
 | 
				
			||||||
 | 
					    private String code;
 | 
				
			||||||
 | 
					    private String name;
 | 
				
			||||||
 | 
					    private String spec;        //规格型号
 | 
				
			||||||
 | 
					    private String registerNo;  //注册证号
 | 
				
			||||||
 | 
					    private String manufactory; //生产厂家
 | 
				
			||||||
 | 
					    private String thirdSys;
 | 
				
			||||||
 | 
					    private String thirdSysFk;
 | 
				
			||||||
 | 
					    private String unionCode;
 | 
				
			||||||
 | 
					    private String sptm;
 | 
				
			||||||
 | 
					    private String ybbm;
 | 
				
			||||||
 | 
					    private String supName;
 | 
				
			||||||
 | 
					    private String lastUpdateTime;
 | 
				
			||||||
 | 
					    private String companyName;
 | 
				
			||||||
 | 
					    private Boolean isDownThrSys;
 | 
				
			||||||
 | 
					    private Integer status;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private List<String> codes;
 | 
				
			||||||
 | 
					    private Integer checkStatus;
 | 
				
			||||||
 | 
					    private String customerId;
 | 
				
			||||||
 | 
					    private String supId;
 | 
				
			||||||
 | 
					    private Long id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private String uuid;
 | 
				
			||||||
 | 
					    private Integer diType;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,35 @@
 | 
				
			|||||||
 | 
					package com.glxp.api.res.basic;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.glxp.api.entity.basic.UdiProductEntity;
 | 
				
			||||||
 | 
					import com.glxp.api.entity.basic.UdiRelevanceEntity;
 | 
				
			||||||
 | 
					import com.glxp.api.entity.basic.UdiRlSupEntity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.glxp.api.entity.thrsys.ThrProductsEntity;
 | 
				
			||||||
 | 
					import lombok.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * 医疗器械信息导出实体类
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					@Data
 | 
				
			||||||
 | 
					public class UdiRelevanceExportJsonResponse {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    List<UdiProductEntity> udiProductEntities;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    List<UdiRelevanceEntity> udiRelevanceEntities;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //第三方产品信息
 | 
				
			||||||
 | 
					    List<ThrProductsEntity> thrProductsEntities;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public UdiRelevanceExportJsonResponse() {
 | 
				
			||||||
 | 
					        this.udiProductEntities = new ArrayList<>();
 | 
				
			||||||
 | 
					        this.udiRelevanceEntities = new ArrayList<>();
 | 
				
			||||||
 | 
					        this.udiRlSupEntityList = new ArrayList<>();
 | 
				
			||||||
 | 
					        this.thrProductsEntities = new ArrayList<>();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private List<UdiRlSupEntity> udiRlSupEntityList;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,17 @@
 | 
				
			|||||||
 | 
					package com.glxp.api.service.basic;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.glxp.api.entity.basic.BasicProductsExportLogEntity;
 | 
				
			||||||
 | 
					import com.glxp.api.req.basic.FilterUdiEpLogRequest;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public interface BasicProductsExportLogService {
 | 
				
			||||||
 | 
					    BasicProductsExportLogEntity selectByGenKey(String genKey);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    boolean insertUdiInfoExportLog(BasicProductsExportLogEntity udiInfoImportEntity);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    boolean updateUdiInfoExportLog(BasicProductsExportLogEntity udiInfoImportEntity);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,44 @@
 | 
				
			|||||||
 | 
					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.BasicProductsExportLogDao;
 | 
				
			||||||
 | 
					import com.glxp.api.entity.basic.BasicProductsExportLogEntity;
 | 
				
			||||||
 | 
					import com.glxp.api.req.basic.FilterUdiEpLogRequest;
 | 
				
			||||||
 | 
					import com.glxp.api.service.basic.BasicProductsExportLogService;
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					import org.springframework.transaction.annotation.Transactional;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import javax.annotation.Resource;
 | 
				
			||||||
 | 
					import java.util.Collections;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Service
 | 
				
			||||||
 | 
					@Transactional(rollbackFor = Exception.class)
 | 
				
			||||||
 | 
					public class BasicProductsExportLogServiceImpl implements BasicProductsExportLogService {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Resource
 | 
				
			||||||
 | 
					    BasicProductsExportLogDao udiInfoExportLogDao;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public BasicProductsExportLogEntity selectByGenKey(String genKey) {
 | 
				
			||||||
 | 
					        FilterUdiEpLogRequest filterUdiEpLogRequest = new FilterUdiEpLogRequest();
 | 
				
			||||||
 | 
					        filterUdiEpLogRequest.setGenKey(genKey);
 | 
				
			||||||
 | 
					        List<BasicProductsExportLogEntity> data = udiInfoExportLogDao.filterUdiInfoExportLog(filterUdiEpLogRequest);
 | 
				
			||||||
 | 
					        if (data != null)
 | 
				
			||||||
 | 
					            return data.get(0);
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            return null;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public boolean updateUdiInfoExportLog(BasicProductsExportLogEntity udiInfoImportEntity) {
 | 
				
			||||||
 | 
					        return udiInfoExportLogDao.updateUdiInfoExportLog(udiInfoImportEntity);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public boolean insertUdiInfoExportLog(BasicProductsExportLogEntity udiInfoImportEntity) {
 | 
				
			||||||
 | 
					        return udiInfoExportLogDao.insertUdiInfoExportLog(udiInfoImportEntity);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					package com.glxp.api.service.sync;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.glxp.api.entity.system.SyncDataSetEntity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public interface SyncDataSetService {
 | 
				
			||||||
 | 
					    SyncDataSetEntity findSet();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,27 @@
 | 
				
			|||||||
 | 
					package com.glxp.api.service.sync.impl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.glxp.api.dao.system.SyncDataSetDao;
 | 
				
			||||||
 | 
					import com.glxp.api.entity.system.SyncDataSetEntity;
 | 
				
			||||||
 | 
					import com.glxp.api.service.sync.SyncDataSetService;
 | 
				
			||||||
 | 
					import org.springframework.beans.BeanUtils;
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					import org.springframework.transaction.annotation.Transactional;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import javax.annotation.Resource;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Service
 | 
				
			||||||
 | 
					@Transactional(rollbackFor = Exception.class)
 | 
				
			||||||
 | 
					public class SyncDataSetServiceImpl implements SyncDataSetService {
 | 
				
			||||||
 | 
					    @Resource
 | 
				
			||||||
 | 
					    SyncDataSetDao syncDataSetDao;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public SyncDataSetEntity findSet() {
 | 
				
			||||||
 | 
					        SyncDataSetEntity syncDataSetEntity = syncDataSetDao.selectSet();
 | 
				
			||||||
 | 
					        return syncDataSetEntity;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,46 @@
 | 
				
			|||||||
 | 
					<?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.BasicProductsExportLogDao">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <update id="updateUdiInfoExportLog" parameterType="com.glxp.api.entity.basic.BasicProductsExportLogEntity">
 | 
				
			||||||
 | 
					        UPDATE basic_products_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>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <insert id="insertUdiInfoExportLog" keyProperty="id"
 | 
				
			||||||
 | 
					            parameterType="com.glxp.api.entity.basic.BasicProductsExportLogEntity">
 | 
				
			||||||
 | 
					        insert INTO basic_products_export_log
 | 
				
			||||||
 | 
					        (genKey,updateTime,dlCount,status,filePath,remark,`type`)
 | 
				
			||||||
 | 
					        values
 | 
				
			||||||
 | 
					            (
 | 
				
			||||||
 | 
					            #{genKey},
 | 
				
			||||||
 | 
					            #{updateTime},
 | 
				
			||||||
 | 
					            #{dlCount},#{status},#{filePath},#{remark},#{type}
 | 
				
			||||||
 | 
					            )
 | 
				
			||||||
 | 
					    </insert>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <select id="filterUdiInfoExportLog" parameterType="com.glxp.api.req.basic.FilterUdiEpLogRequest"
 | 
				
			||||||
 | 
					            resultType="com.glxp.api.entity.basic.BasicProductsExportLogEntity">
 | 
				
			||||||
 | 
					        SELECT * FROM basic_products_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>
 | 
				
			||||||
 | 
					</mapper>
 | 
				
			||||||
@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					<?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.UdiProductDao">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <select id="batchSelectByUuid" resultType="com.glxp.api.entity.basic.UdiProductEntity">
 | 
				
			||||||
 | 
					        select *
 | 
				
			||||||
 | 
					        from basic_products where uuid in
 | 
				
			||||||
 | 
					        <foreach collection="uuids" item="item" separator="," index="index" open="(" close=")">
 | 
				
			||||||
 | 
					            #{item}
 | 
				
			||||||
 | 
					        </foreach>
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</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.thrsys.ThrProductsDao">
 | 
				
			||||||
 | 
					    <select id="filterThrProducts" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
 | 
				
			||||||
 | 
					            resultType="com.glxp.api.entity.thrsys.ThrProductsEntity">
 | 
				
			||||||
 | 
					        SELECT *
 | 
				
			||||||
 | 
					        FROM thr_products
 | 
				
			||||||
 | 
					        <where>
 | 
				
			||||||
 | 
					            <if test="name != '' and name != null">
 | 
				
			||||||
 | 
					                AND name LIKE concat('%', #{name}, '%')
 | 
				
			||||||
 | 
					            </if>
 | 
				
			||||||
 | 
					            <if test="code != '' and code != null">
 | 
				
			||||||
 | 
					                AND code = #{code}
 | 
				
			||||||
 | 
					            </if>
 | 
				
			||||||
 | 
					            <if test="sptm != '' and sptm != null">
 | 
				
			||||||
 | 
					                AND sptm LIKE concat('%', #{sptm}, '%')
 | 
				
			||||||
 | 
					            </if>
 | 
				
			||||||
 | 
					            <if test="ybbm != '' and ybbm != null">
 | 
				
			||||||
 | 
					                AND ybbm LIKE concat('%', #{ybbm}, '%')
 | 
				
			||||||
 | 
					            </if>
 | 
				
			||||||
 | 
					            <if test="registerNo != '' and registerNo != null">
 | 
				
			||||||
 | 
					                AND registerNo LIKE concat('%', #{registerNo}, '%')
 | 
				
			||||||
 | 
					            </if>
 | 
				
			||||||
 | 
					            <if test="manufactory != '' and manufactory != null">
 | 
				
			||||||
 | 
					                AND manufactory LIKE concat('%', #{manufactory}, '%')
 | 
				
			||||||
 | 
					            </if>
 | 
				
			||||||
 | 
					            <if test="spec != '' and spec != null">
 | 
				
			||||||
 | 
					                AND spec LIKE concat('%', #{spec}, '%')
 | 
				
			||||||
 | 
					            </if>
 | 
				
			||||||
 | 
					            <if test="unionCode != '' and unionCode != null">
 | 
				
			||||||
 | 
					                or code LIKE concat('%', #{unionCode}, '%')
 | 
				
			||||||
 | 
					                or sptm LIKE concat('%', #{unionCode}, '%')
 | 
				
			||||||
 | 
					                or ybbm LIKE
 | 
				
			||||||
 | 
					                   concat('%', #{unionCode}, '%')
 | 
				
			||||||
 | 
					            </if>
 | 
				
			||||||
 | 
					            <if test="thirdSysFk != '' and thirdSysFk != null">
 | 
				
			||||||
 | 
					                AND thirdSysFk = #{thirdSysFk}
 | 
				
			||||||
 | 
					            </if>
 | 
				
			||||||
 | 
					            <if test="thirdSys != '' and thirdSys != null">
 | 
				
			||||||
 | 
					                AND thirdSysFk = #{thirdSys}
 | 
				
			||||||
 | 
					            </if>
 | 
				
			||||||
 | 
					            <if test="supName != '' and supName != null">
 | 
				
			||||||
 | 
					                AND supName LIKE concat('%', #{supName}, '%')
 | 
				
			||||||
 | 
					            </if>
 | 
				
			||||||
 | 
					            <if test="lastUpdateTime != null and lastUpdateTime != ''">
 | 
				
			||||||
 | 
					                <![CDATA[
 | 
				
			||||||
 | 
					                and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
 | 
				
			||||||
 | 
					                ]]>
 | 
				
			||||||
 | 
					            </if>
 | 
				
			||||||
 | 
					        </where>
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</mapper>
 | 
				
			||||||
					Loading…
					
					
				
		Reference in New Issue