bug修改

master
anthonywj 2 years ago
parent 1eb3c65bba
commit b7c2690d56

@ -19,7 +19,7 @@ public enum BasicExportTypeEnum {
/** /**
* DI * DI
*/ */
COUNTRY_DI_DATA("country_di_data", "国家库DI数据"), // COUNTRY_DI_DATA("country_di_data", "国家库DI数据"),
/** /**
* *

@ -29,7 +29,7 @@ public class BasicProcessStatus {
public static final String NEW_ALL_BUS = "8"; public static final String NEW_ALL_BUS = "8";
public static final String NEW_ALL_ORDER = "出入库扫码单据"; public static final String NEW_ALL_ORDER = "出入库扫码单据";
public static final String NEW_ALL_BUS_ORDER = "业务单据"; public static final String NEW_ALL_BUS_ORDER = "业务单据";
public static final String NEW_ALL_DI = "10"; public static final String NEW_ALL_UDIS = "国家库数据";
public static final String NEW_ALL_THR_DATA = "12"; //所有第三方基础数据 public static final String NEW_ALL_THR_DATA = "12"; //所有第三方基础数据
public static final String NEW_ALL_THR_PRODUCTS = "13"; //所有第三方产品数据 public static final String NEW_ALL_THR_PRODUCTS = "13"; //所有第三方产品数据

@ -352,7 +352,6 @@ public class SpsSyncDownloadController {
case SYS_SET_DATA: case SYS_SET_DATA:
saveUploadSysSettingData(JSONUtil.toBean(obj, SpsSyncSysSettingResponse.class)); saveUploadSysSettingData(JSONUtil.toBean(obj, SpsSyncSysSettingResponse.class));
break; break;
case COUNTRY_DI_DATA:
} }
String taskId = obj.getStr("taskId"); String taskId = obj.getStr("taskId");
BasicDownloadStatusEntity downloadStatus = BasicDownloadStatusEntity.builder() BasicDownloadStatusEntity downloadStatus = BasicDownloadStatusEntity.builder()
@ -422,7 +421,8 @@ public class SpsSyncDownloadController {
systemPDFModuleDao.insertOrUpdateBatch(bean.getSystemPDFModuleEntities()); systemPDFModuleDao.insertOrUpdateBatch(bean.getSystemPDFModuleEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getSystemPDFTemplateEntities())) { if (CollectionUtil.isNotEmpty(bean.getSystemPDFTemplateEntities())) {
systemPDFTemplateDao.insertOrUpdateBatch(bean.getSystemPDFTemplateEntities()); for (SystemPDFTemplateEntity systemPDFTemplateEntity : bean.getSystemPDFTemplateEntities())
systemPDFTemplateDao.insertOrUpdate(systemPDFTemplateEntity);
} }
if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceCodeEntities())) { if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceCodeEntities())) {
sysPdfTemplateRelevanceCodeDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceCodeEntities()); sysPdfTemplateRelevanceCodeDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceCodeEntities());

@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
@Mapper @Mapper
public interface SystemPDFTemplateDao extends BaseMapperPlus<SystemPDFTemplateDao,SystemPDFTemplateEntity,SystemPDFTemplateEntity> { public interface SystemPDFTemplateDao extends BaseMapperPlus<SystemPDFTemplateDao, SystemPDFTemplateEntity, SystemPDFTemplateEntity> {
List<SystemPDFTemplateEntity> queryPage(FilterPdfTemplateRequest filterPdfTemplateRequest); List<SystemPDFTemplateEntity> queryPage(FilterPdfTemplateRequest filterPdfTemplateRequest);
@ -17,13 +17,11 @@ public interface SystemPDFTemplateDao extends BaseMapperPlus<SystemPDFTemplateDa
SystemPDFTemplateEntity findSystemPDFTemplate(FilterPdfTemplateRequest filterPdfTemplateRequest); SystemPDFTemplateEntity findSystemPDFTemplate(FilterPdfTemplateRequest filterPdfTemplateRequest);
SystemPDFTemplateEntity selectById(String id);
boolean updateById(SysPdfTemplateSaveRequest sysPdfTemplateSaveRequest); boolean updateEntity(SysPdfTemplateSaveRequest sysPdfTemplateSaveRequest);
boolean insertEntity(SystemPDFTemplateEntity systemPDFTemplateEntity); boolean insertEntity(SystemPDFTemplateEntity systemPDFTemplateEntity);
boolean deleteById(Integer id); boolean deleteById(Integer id);
boolean insertOrUpdate(SystemPDFTemplateEntity systemPDFTemplateEntity);
} }

@ -1,29 +1,44 @@
package com.glxp.api.entity.system; package com.glxp.api.entity.system;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
@Data @Data
@TableName("sys_pdf_template")
public class SystemPDFTemplateEntity { public class SystemPDFTemplateEntity {
@TableId(value = "id", type = IdType.AUTO)
private Integer id; private Integer id;
@TableField(value = "name")
private String name; private String name;
@TableField(value = "type")
private int type; private int type;
@TableField(value = "module")
private int module; private int module;
@TableField(value = "param")
private String param; private String param;
@TableField(value = "path")
private String path; private String path;
@TableField(value = "rowCount")
private int rowCount; private int rowCount;
@TableField(value = "qrcodeCount")
private int qrcodeCount; private int qrcodeCount;
@TableField(value = "remark")
private String remark; private String remark;
@TableField(value = "`create_time`")
private Date create_time; private Date create_time;
@TableField(value = "`update_time`") @TableField(value = "`update_time`")
private Date update_time; private Date update_time;
@TableField(value = "jrxmlPath")
private String jrxmlPath; private String jrxmlPath;
@TableField(exist = false)
private Integer bussinessType; private Integer bussinessType;
@TableField(exist = false)
private String bussinessStatus; private String bussinessStatus;
@TableField(exist = false)
@TableField(value = "updateTime")
private Date updateTime; private Date updateTime;
} }

@ -8,7 +8,7 @@ import java.util.List;
public class BaseSyncResponse { public class BaseSyncResponse {
private String taskId; private String taskId;
private List<String> files; private List<String> syncFiles;
private String updateTime; private String updateTime;
} }

@ -47,6 +47,8 @@ import java.io.IOException;
import java.util.*; import java.util.*;
import java.util.function.Function; import java.util.function.Function;
import static com.glxp.api.constant.BasicProcessStatus.NEW_ALL_UDIS;
@Slf4j @Slf4j
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
@ -111,7 +113,7 @@ public class SpsSyncDownloadService {
public void syncDiProductsTask() { public void syncDiProductsTask() {
BasicExportStatusEntity exportStatus = basicExportService.getOne(Wrappers.lambdaQuery(BasicExportStatusEntity.class) BasicExportStatusEntity exportStatus = basicExportService.getOne(Wrappers.lambdaQuery(BasicExportStatusEntity.class)
.eq(BasicExportStatusEntity::getType, BasicExportTypeEnum.COUNTRY_DI_DATA.getRemark()) .eq(BasicExportStatusEntity::getType, NEW_ALL_UDIS)
.orderByDesc(BasicExportStatusEntity::getStartTime) .orderByDesc(BasicExportStatusEntity::getStartTime)
.last("limit 1") .last("limit 1")
); );
@ -126,7 +128,7 @@ public class SpsSyncDownloadService {
BasicExportStatusEntity basicExportStatusEntity = new BasicExportStatusEntity(); BasicExportStatusEntity basicExportStatusEntity = new BasicExportStatusEntity();
basicExportStatusEntity.setId(CustomUtil.getId()); basicExportStatusEntity.setId(CustomUtil.getId());
basicExportStatusEntity.setIdDatas(ConstantStatus.SYNC_DI_PRODUCTS); basicExportStatusEntity.setIdDatas(ConstantStatus.SYNC_DI_PRODUCTS);
basicExportStatusEntity.setType(BasicExportTypeEnum.COUNTRY_DI_DATA.getRemark()); basicExportStatusEntity.setType(NEW_ALL_UDIS);
basicExportStatusEntity.setUpdateTime(new Date()); basicExportStatusEntity.setUpdateTime(new Date());
basicExportStatusEntity.setStartTime(new Date()); basicExportStatusEntity.setStartTime(new Date());
basicExportStatusEntity.setStatus(BasicExportStatusEnum.WAIT_TRIGGERED.getCode()); basicExportStatusEntity.setStatus(BasicExportStatusEnum.WAIT_TRIGGERED.getCode());
@ -310,6 +312,7 @@ public class SpsSyncDownloadService {
BasicExportTypeEnum exportType = BasicExportTypeEnum.BASIC_DATA; BasicExportTypeEnum exportType = BasicExportTypeEnum.BASIC_DATA;
//文件数据 //文件数据
Map<String, List> jsonMap = new WeakHashMap<>(4); Map<String, List> jsonMap = new WeakHashMap<>(4);
List<String> syncFiles = new ArrayList<>();
Map<BasicExportStatusTimeEnum, Map<String, Object>> totalTimeMap = new WeakHashMap<>(10); Map<BasicExportStatusTimeEnum, Map<String, Object>> totalTimeMap = new WeakHashMap<>(10);
try { try {
//确认有开启物资字典由外向内同步 //确认有开启物资字典由外向内同步
@ -375,6 +378,14 @@ public class SpsSyncDownloadService {
); );
if (CollectionUtil.isNotEmpty(supCertList)) { if (CollectionUtil.isNotEmpty(supCertList)) {
jsonMap.put(SupCertEntity.class.getSimpleName(), supCertList); jsonMap.put(SupCertEntity.class.getSimpleName(), supCertList);
for (SupCertEntity supCertEntity : supCertList) {
if (StrUtil.isNotEmpty(supCertEntity.getFilePath())) {
syncFiles.add(supCertEntity.getFilePath());
}
}
if (CollUtil.isNotEmpty(syncFiles)) {
jsonMap.put("syncFiles", syncFiles);
}
} }
List<SupCertSetEntity> supCertSetList = supCertSetService.list(Wrappers.lambdaQuery(SupCertSetEntity.class) List<SupCertSetEntity> supCertSetList = supCertSetService.list(Wrappers.lambdaQuery(SupCertSetEntity.class)
.le((boolean) map.get("isNew"), SupCertSetEntity::getUpdateTime, now) .le((boolean) map.get("isNew"), SupCertSetEntity::getUpdateTime, now)
@ -825,7 +836,7 @@ public class SpsSyncDownloadService {
} }
} }
syncOrderResponse.setFiles(syncFiles); syncOrderResponse.setSyncFiles(syncFiles);
syncOrderResponse.setCodeEntities(codeEntities); syncOrderResponse.setCodeEntities(codeEntities);
syncOrderResponse.setOrderDetailBizEntities(orderDetailBizEntities); syncOrderResponse.setOrderDetailBizEntities(orderDetailBizEntities);
syncOrderResponse.setOrderDetailCodeEntities(orderDetailCodeEntities); syncOrderResponse.setOrderDetailCodeEntities(orderDetailCodeEntities);

@ -50,7 +50,7 @@ public class SystemPDFTemplateServiceImpl extends ServiceImpl<SystemPDFTemplateD
@Override @Override
public boolean updateById(SysPdfTemplateSaveRequest sysPdfTemplateSaveRequest) { public boolean updateById(SysPdfTemplateSaveRequest sysPdfTemplateSaveRequest) {
return systemPDFTemplateDao.updateById(sysPdfTemplateSaveRequest); return systemPDFTemplateDao.updateEntity(sysPdfTemplateSaveRequest);
} }
@Override @Override

@ -37,14 +37,7 @@
WHERE id = #{id} WHERE id = #{id}
</select> </select>
<select id="selectById" parameterType="java.lang.String" <update id="updateEntity" parameterType="com.glxp.api.req.system.SysPdfTemplateSaveRequest">
resultType="com.glxp.api.entity.system.SystemPDFTemplateEntity">
select *
FROM sys_pdf_template
WHERE id = #{id}
</select>
<update id="updateById" parameterType="com.glxp.api.entity.system.SystemPDFTemplateEntity">
UPDATE sys_pdf_template UPDATE sys_pdf_template
<set> <set>
<if test="name != null"> <if test="name != null">
@ -117,65 +110,4 @@
from sys_pdf_template from sys_pdf_template
where id = #{id} where id = #{id}
</delete> </delete>
</mapper>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.system.SystemPDFTemplateEntity" useGeneratedKeys="true">
insert into sys_pdf_template
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
`name`,
`type`,
`module`,
param,
`path`,
`rowCount`,
qrcodeCount,
remark,
create_time,
update_time,
jrxmlPath,
bussinessType,
bussinessStatus,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{name,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER},
#{module,jdbcType=INTEGER},
#{param,jdbcType=VARCHAR},
#{path,jdbcType=VARCHAR},
#{rowCount,jdbcType=INTEGER},
#{qrcodeCount,jdbcType=INTEGER},
#{remark,jdbcType=VARCHAR},
#{create_time,jdbcType=TIMESTAMP},
#{update_time,jdbcType=TIMESTAMP},
#{jrxmlPath,jdbcType=VARCHAR},
#{bussinessType,jdbcType=VARCHAR},
#{bussinessStatus,jdbcType=VARCHAR},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
`name` = #{name,jdbcType=VARCHAR},
`type` = #{type,jdbcType=INTEGER},
`module` = #{module,jdbcType=INTEGER},
param = #{param,jdbcType=VARCHAR},
`path` = #{path,jdbcType=VARCHAR},
`rowCount` = #{rowCount,jdbcType=INTEGER},
qrcodeCount = #{qrcodeCount,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{create_time,jdbcType=TIMESTAMP},
update_time = #{update_time,jdbcType=TIMESTAMP},
jrxmlPath = #{jrxmlPath,jdbcType=VARCHAR},
bussinessType = #{bussinessType,jdbcType=VARCHAR},
bussinessStatus = #{bussinessStatus,jdbcType=VARCHAR},
</trim>
</insert>
</mapper>

Loading…
Cancel
Save