Compare commits

...

10 Commits
test ... dev

@ -49,7 +49,7 @@ public class HdSchemaExecutor implements ApplicationRunner {
String sql = IoUtil.readUtf8(inputStream);
try {
//判断版本表是否存在
int count = hdCommonDao.selectTableExist("hd_version");
int count = hdCommonDao.selectTableExist("sys_db_version");
if (count == 0) {
hdCommonDao.updateSql(sql);
}
@ -85,4 +85,4 @@ public class HdSchemaExecutor implements ApplicationRunner {
// schema.add(new SchemaData("v2.2", "schema_v2.2.sql"));
// schema.add(new SchemaData("v2.3", "schema_v2.3.sql"));
}
}
}

@ -150,9 +150,9 @@ public class UdiContrastController {
@Log(title = "耗材字典", businessType = BusinessType.UPDATE)
public BaseResponse changeVersion(@RequestBody UdiCombineRequest udiCombineRequest) {
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectById(udiCombineRequest.getRelId());
if (udiContrastService.isExit(udiCombineRequest.getKeys().get(0), udiRelevanceEntity.getMainId(), null)) {
return ResultVOUtils.error(500, "已存在相同的对照关系,无法切换版本");
}
// if (udiContrastService.isExit(udiCombineRequest.getKeys().get(0), udiRelevanceEntity.getMainId(), null)) {
// return ResultVOUtils.error(500, "已存在相同的对照关系,无法切换版本");
// }
List<UdiProductEntity> udiInfoEntities = udiDlHttpClient.getUdiByUuid(udiCombineRequest.getKeys().get(0));
udiProductService.deleteByUuid(udiRelevanceEntity.getUuid());

@ -1,5 +1,6 @@
package com.glxp.api.controller.basic;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
@ -233,7 +234,7 @@ public class UdiRelevanceController extends BaseController {
for (UdiProductEntity udiProductEntity : udiInfoEntities) {
UdiRelevanceResponse udiRelevanceResponse = new UdiRelevanceResponse();
BeanUtils.copyProperties(udiProductEntity, udiRelevanceResponse);
BeanUtils.copyProperties(udiRelevanceEntity, udiRelevanceResponse);
BeanUtil.copyProperties(udiRelevanceEntity, udiRelevanceResponse);
udiRelevanceResponses.add(udiRelevanceResponse);
}
}

@ -803,12 +803,12 @@ public class IoOrderController extends BaseController {
//这个不等于空表示要查询发票对应的单据
if (filterOrderRequest.getInvoiceEncode() != null) {
//查询发票详情
QueryWrapper<IoOrderInvoiceEntity> ew=new QueryWrapper<IoOrderInvoiceEntity>();
ew.eq("invoiceEncode",filterOrderRequest.getInvoiceEncode());
QueryWrapper<IoOrderInvoiceEntity> ew = new QueryWrapper<IoOrderInvoiceEntity>();
ew.eq("invoiceEncode", filterOrderRequest.getInvoiceEncode());
List<IoOrderInvoiceEntity> ioOrderInvoiceEntity = orderInvoiceService.list(ew);
List<String> orderIds = ioOrderInvoiceEntity.stream().map(IoOrderInvoiceEntity::getOrderIdFk).collect(Collectors.toList());
filterOrderRequest.setOrderIds(orderIds);
if(CollectionUtils.isEmpty(orderIds)){
if (CollectionUtils.isEmpty(orderIds)) {
PageInfo<IoOrderResponse> pageInfo = new PageInfo<>();
return ResultVOUtils.page(pageInfo);
}

@ -436,7 +436,7 @@ public class SupCertController {
supData.put("status", obj.getStatus() == 0 ? "有效" : "失效");
supData.put("auditStatus", getAuditStatus(obj.getAuditStatus()));
supData.put("remark", obj.getRemark() == null ? ' ' : obj.getRemark());
supData.put("filePath", filePath + "register/image2/" + url);
supData.put("filePath", filePath + "register/file/image2/" + url);
list.add(supData);
i++;
}
@ -552,7 +552,7 @@ public class SupCertController {
supData.put("status", obj.getStatus() == 0 ? "有效" : "失效");
supData.put("auditStatus", getAuditStatus(obj.getAuditStatus()));
supData.put("remark2", obj.getRemark() == null ? ' ' : obj.getRemark());
supData.put("filePath", filePath + "register/image2/" + url);
supData.put("filePath", filePath + "register/file/image2/" + url);
list.add(supData);
i++;
}
@ -618,7 +618,7 @@ public class SupCertController {
supData.put("status", obj.getStatus() == 0 ? "有效" : "失效");
supData.put("auditStatus", getAuditStatus(obj.getAuditStatus()));
supData.put("remark2", obj.getRemark() == null ? ' ' : obj.getRemark());
supData.put("filePath", filePath + "register/image2/" + url);
supData.put("filePath", filePath + "register/file/image2/" + url);
list.add(supData);
i++;
}

@ -231,7 +231,16 @@ public class SpsSyncExportStatusController {
@PostMapping("/spssync/basic/schedule/updateLastTime")
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
public BaseResponse updateLastTime(@RequestBody BasicExportStatusTimeEntity basicExportStatusTimeEntity) {
basicExportStatusTimeEntity.setLastUpdateTime(DateUtil.formatDateTime(new Date()));
if (basicExportStatusTimeEntity.getKey().equals("AutoDownloadOrder")) {
BasicExportStatusEntity basicExportStatusEntity = basicExportService.findLast("AutoUploadOrder");
if (basicExportStatusEntity != null) {
basicExportStatusTimeEntity.setLastUpdateTime(DateUtil.formatDateTime(basicExportStatusEntity.getStartTime()));
} else {
basicExportStatusTimeEntity.setLastUpdateTime(DateUtil.formatDateTime(new Date()));
}
} else
basicExportStatusTimeEntity.setLastUpdateTime(DateUtil.formatDateTime(new Date()));
boolean b = basicExportTimeService.insertExportStatus(basicExportStatusTimeEntity);
if (b)
return ResultVOUtils.success("更新成功!");

@ -139,7 +139,7 @@ public class ThrProductsAddDiController {
}
ThrProductsAddDiEntity thrProductsAddDiEntity = thrProductsAddDiService.selecByUuid(uuids.get(0));
if (thrProductsAddDiEntity != null) {
return ResultVOUtils.error(500, "重复提交!");
return ResultVOUtils.error(500, "产品已存在,请勿重复提交!");
}
thrProductsAddDiService.addThrAddDiProducts(addThrDiProductsRequest);
return ResultVOUtils.success("提交成功!");

@ -23,4 +23,6 @@ public interface BasicExportDao extends BaseMapper<BasicExportStatusEntity> {
boolean updateExportStatus(BasicExportStatusEntity warehouseEntity);
void deleteByDate(@Param("date") String date);
BasicExportStatusEntity findLast(@Param("idDatas") String idDatas);
}

@ -167,7 +167,7 @@ public class UdiRelevanceEntity {
@TableField(value = "isDateBy")
private Integer isDateBy;
@TableField(value = "needCert")
private Boolean needCert; //是否需要资质材料
private boolean needCert; //是否需要资质材料
@TableField(value = "certIdFk")
private String certIdFk;

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ -122,4 +123,5 @@ public class InvProductDetailEntity {
@TableField(value = "action")
private String action;
}

@ -78,4 +78,5 @@ public class FilterUdiRelRequest extends ListPageRequest {
private String syqsfxyjxmj;
private String mjfs;
private String categoryName;
private String deviceRecordKey;
}

@ -119,10 +119,12 @@ public class BasicBackUpdateProductService {
udiRelevanceEntity1.setMainId(udiRelevanceEntity1.getThirdId4());
}
udiRelevanceEntity1.setThirdId(invmandocResponse.getCode());
String time = DateUtil.getDateTime();
udiRelevanceEntity1.setUpdateTime(new Date());
udiRelevanceEntity.setModifyTime(new Date());
udiRelevanceEntity.setIsDisable(false);
if (udiProductEntity.getDiType() == ConstantStatus.DI_TYPE_SYDY) {
udiRelevanceEntity1.setIsUseDy(true);
}
udiRelevanceEntity1.setId(gennerOrderUtils.getRelId());
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity1);
}

@ -92,6 +92,10 @@ public class BasicUpdateProductService {
} else if (mainSys.equals("thirdId4")) {
udiRelevanceEntity1.setMainId(udiRelevanceEntity1.getThirdId4());
}
if (udiProductEntity.getDiType() == ConstantStatus.DI_TYPE_SYDY) {
udiRelevanceEntity1.setIsUseDy(true);
}
udiRelevanceEntity1.setId(gennerOrderUtils.getRelId());
udiRelevanceEntity1.setIsDisable(false);
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity1);
@ -119,6 +123,9 @@ public class BasicUpdateProductService {
udiRelevanceEntity.setModifyTime(new Date());
udiRelevanceEntity.setUuid(udiProductEntity.getUuid());
udiRelevanceEntity.setIsDisable(false);
if (udiProductEntity.getDiType() == ConstantStatus.DI_TYPE_SYDY) {
udiRelevanceEntity.setIsUseDy(true);
}
List<UdiRelevanceEntity> udiRelevanceEntities = udiRelevanceService.selectByUuid(udiProductEntity.getUuid());
if (udiRelevanceEntities != null && udiRelevanceEntities.size() > 0) {
boolean isAdd = false;

@ -46,14 +46,22 @@ public class UdiContrastService {
public boolean isExit(String originUuid, String mainId, String thirdSys) {
if (StrUtil.isNotEmpty(originUuid) && StrUtil.isNotEmpty(mainId) && StrUtil.isBlank(thirdSys)) {
List<UdiRelevanceResponse> udiRelevanceEntities = findByUnion(originUuid, mainId);
String deviceRecordKey = null;
if (StrUtil.isNotEmpty(originUuid)) {
UdiProductEntity udiProductEntity = udiProductService.findOneByOriginUuid(originUuid);
if (udiProductEntity != null)
deviceRecordKey = udiProductEntity.getDeviceRecordKey();
}
if (StrUtil.isNotEmpty(deviceRecordKey) && StrUtil.isNotEmpty(mainId) && StrUtil.isBlank(thirdSys)) {
List<UdiRelevanceResponse> udiRelevanceEntities = findDrkByUnion(deviceRecordKey, mainId);
if (CollUtil.isNotEmpty(udiRelevanceEntities)) {
return true;
} else
return false;
} else if (StrUtil.isNotEmpty(originUuid) && StrUtil.isEmpty(mainId)) {
List<UdiRelevanceResponse> udiRelevanceEntities = findByOriginUuid(originUuid);
} else if (StrUtil.isNotEmpty(deviceRecordKey) && StrUtil.isEmpty(mainId)) {
List<UdiRelevanceResponse> udiRelevanceEntities = findByDeviceRecordKey(deviceRecordKey);
if (CollUtil.isNotEmpty(udiRelevanceEntities)) {
for (UdiRelevanceResponse udiRelevanceEntity : udiRelevanceEntities) {
if (StrUtil.isEmpty(udiRelevanceEntity.getMainId()) && StrUtil.isNotEmpty(udiRelevanceEntity.getOriginUuid())) {
@ -72,8 +80,8 @@ public class UdiContrastService {
}
}
return false;
} else if (StrUtil.isNotBlank(originUuid) && StrUtil.isNotBlank(mainId) && StrUtil.isNotBlank(thirdSys)) {
List<UdiRelevanceResponse> udiRelevanceEntities = findByUnion2(originUuid, mainId, thirdSys);
} else if (StrUtil.isNotBlank(deviceRecordKey) && StrUtil.isNotBlank(mainId) && StrUtil.isNotBlank(thirdSys)) {
List<UdiRelevanceResponse> udiRelevanceEntities = findByUnion2(deviceRecordKey, mainId, thirdSys);
if (CollUtil.isNotEmpty(udiRelevanceEntities)) {
return true;
} else
@ -82,23 +90,36 @@ public class UdiContrastService {
return false;
}
private List<UdiRelevanceResponse> findByUnion2(String originUuid, String mainId, String thirdSys) {
private List<UdiRelevanceResponse> findByUnion2(String deviceRecordKey, String mainId, String thirdSys) {
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
filterUdiRelRequest.setMainId(mainId);
filterUdiRelRequest.setOriginUuid(originUuid);
filterUdiRelRequest.setDeviceRecordKey(deviceRecordKey);
filterUdiRelRequest.setThirdSys(thirdSys);
List<UdiRelevanceResponse> udiRelevanceEntities = udiRelevanceDao.contrastJoinSelect(filterUdiRelRequest);
return udiRelevanceEntities;
}
public List<UdiRelevanceResponse> findByUnion(String originUuid, String mainId) {
UdiProductEntity udiProductEntity = udiProductService.findOneByOriginUuid(originUuid);
if (udiProductEntity == null) {
return null;
}
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
filterUdiRelRequest.setMainId(mainId);
filterUdiRelRequest.setOriginUuid(originUuid);
filterUdiRelRequest.setDeviceRecordKey(udiProductEntity.getDeviceRecordKey());
List<UdiRelevanceResponse> udiRelevanceEntities = udiRelevanceDao.contrastJoinSelect(filterUdiRelRequest);
return udiRelevanceEntities;
}
public List<UdiRelevanceResponse> findDrkByUnion(String deviceRecordKey, String mainId) {
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
filterUdiRelRequest.setMainId(mainId);
filterUdiRelRequest.setDeviceRecordKey(deviceRecordKey);
List<UdiRelevanceResponse> udiRelevanceEntities = udiRelevanceDao.contrastJoinSelect(filterUdiRelRequest);
return udiRelevanceEntities;
}
public List<UdiRelevanceResponse> findByUuid(String uuid) {
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
filterUdiRelRequest.setUuid(uuid);
@ -122,6 +143,14 @@ public class UdiContrastService {
return udiRelevanceEntities;
}
public List<UdiRelevanceResponse> findByDeviceRecordKey(String deviceRecordKey) {
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
filterUdiRelRequest.setDeviceRecordKey(deviceRecordKey);
List<UdiRelevanceResponse> udiRelevanceEntities = udiRelevanceDao.contrastJoinSelect(filterUdiRelRequest);
return udiRelevanceEntities;
}
public List<UdiRelevanceResponse> findByMainId(String mainId) {
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
filterUdiRelRequest.setMainId(mainId);
@ -147,6 +176,11 @@ public class UdiContrastService {
udiRelevanceEntity.setSupName(udiCombineRequest.getSupName());
udiRelevanceEntity.setId(gennerOrderUtils.getRelId());
udiRelevanceEntity.setIsDisable(false);
if (udiInfoEntities.get(0).getDiType() == ConstantStatus.DI_TYPE_SYDY) {
udiRelevanceEntity.setIsUseDy(true);
}
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
insertUdiInfos(udiInfoEntities);
}
@ -189,11 +223,11 @@ public class UdiContrastService {
public Long createOnlyUuid(UdiCombineRequest udiCombineRequest, String key) {
List<UdiProductEntity> udiInfoEntities = udiDlHttpClient.getOrUpdateByUuid(key);
if(udiInfoEntities==null || udiInfoEntities.size()==0){
if (udiInfoEntities == null || udiInfoEntities.size() == 0) {
//为了处理审核时的线上问题
int a=9999;
return Long.valueOf(a);
}else{
int a = 9999;
return Long.valueOf(a);
} else {
UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity();
udiRelevanceEntity.setUpdateTime(new Date());
udiRelevanceEntity.setModifyTime(new Date());
@ -201,6 +235,9 @@ public class UdiContrastService {
if (StrUtil.isNotBlank(udiCombineRequest.getSupName())) {
udiRelevanceEntity.setSupName(udiCombineRequest.getSupName());
}
if (udiInfoEntities.get(0).getDiType() == ConstantStatus.DI_TYPE_SYDY) {
udiRelevanceEntity.setIsUseDy(true);
}
Long relId = gennerOrderUtils.getRelId();
udiRelevanceEntity.setId(relId);
udiRelevanceEntity.setIsDisable(false);

@ -31,6 +31,9 @@ public interface UdiProductService {
List<UdiProductEntity> findByOriginUuid(String originUuid);
UdiProductEntity findOneByOriginUuid(String originUuid);
boolean insertUdiInfo(UdiProductEntity udiProductEntity);
boolean insertUdiInfos(List<UdiProductEntity> udiInfoEntities);

@ -101,6 +101,14 @@ public class UdiProductServiceImpl implements UdiProductService {
return udiProductDao.findByOriginUuid(originUuid);
}
@Override
public UdiProductEntity findOneByOriginUuid(String originUuid) {
List<UdiProductEntity> udiProductEntities = findByOriginUuid(originUuid);
if (CollUtil.isNotEmpty(udiProductEntities))
return udiProductEntities.get(0);
return null;
}
@Override
public boolean insertUdiInfo(UdiProductEntity udiProductEntity) {
udiProductEntity.setUpdateTime(new Date());

@ -671,7 +671,7 @@ public class IoOrderServiceImpl implements IoOrderService {
break;
case Constant.ORDER_STATUS_INCODE:
filterOrderRequest.setStatuses(Arrays.asList(1, 3));
// filterOrderRequest.setStatuses(Arrays.asList(1, 3));
filterOrderRequest.setDealStatuses(Arrays.asList(1, 2, 3, 4));
break;
case Constant.ORDER_STATUS_WAIT_AUDITED:

@ -22,4 +22,12 @@ public interface BasicExportService extends IService<BasicExportStatusEntity> {
boolean deleteByTime();
boolean updateExportStatus(BasicExportStatusEntity warehouseEntity);
/**
*
*
* @param idDatas
* @return
*/
BasicExportStatusEntity findLast(String idDatas);
}

@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.*;
import com.glxp.api.constant.Constant;
import com.glxp.api.dao.basic.BasicProductsDao;
import com.glxp.api.entity.basic.*;
import com.glxp.api.entity.inout.*;
@ -29,12 +30,10 @@ import com.glxp.api.service.inout.*;
import com.glxp.api.service.inout.impl.IoOrderInvoiceService;
import com.glxp.api.service.purchase.*;
import com.glxp.api.service.thrsys.IThrBusTypeOriginService;
import com.glxp.api.util.CustomUtil;
import com.glxp.api.util.DateUtil;
import com.glxp.api.util.JsonUtils;
import com.glxp.api.util.RedisUtil;
import com.glxp.api.util.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
@ -93,22 +92,25 @@ public class SpsSyncDownloadService {
log.info("创建单据同步任务");
//自动创建要求被下载已完成单据任务.
// 1.判断是否同步任务已存在
Date curTime = new Date();
BasicExportStatusEntity basicExportStatusEntity1 = basicExportService.getOne(Wrappers.lambdaQuery(BasicExportStatusEntity.class)
.eq(BasicExportStatusEntity::getType, NEW_ALL_ORDER)
.orderByDesc(BasicExportStatusEntity::getStartTime)
.last("limit 1")
);
log.info("no1:" + basicExportStatusEntity1.getStatus() + "---" + BasicExportStatusEnum.COMPLETED.getCode());
//首次任务or上次任务结束
if (basicExportStatusEntity1 == null || BasicExportStatusEnum.COMPLETED.getCode().equals(basicExportStatusEntity1.getStatus())) {
if (basicExportStatusEntity1 == null || IntUtil.value(BasicExportStatusEnum.COMPLETED.getCode()) == IntUtil.value(basicExportStatusEntity1.getStatus())) {
log.info("no2:" + basicExportStatusEntity1.getStatus() + "---" + BasicExportStatusEnum.COMPLETED.getCode());
SpsSyncDataRequest spsSyncDataRequest = getRequest(ConstantStatus.SYNC_DOWNLOAD_SCAN_ORDER);
if (lastUpdateTime != null)
spsSyncDataRequest.setLastUpdateTime(DateUtil.formatDateTime(lastUpdateTime));
BaseResponse<SpsSyncOrderResponse> baseResponse = findOrder(spsSyncDataRequest);
SpsSyncOrderResponse syncOrderResponse = baseResponse.getData();
log.info("no4:" + syncOrderResponse);
// 2.查看是否有需要更新的数据
if (CollUtil.isNotEmpty(syncOrderResponse.getOrderEntities())) {
log.info("no5:" + syncOrderResponse.getOrderEntities().size());
// 3.插入到任务表,等待获取
BasicExportStatusEntity orderStatusEntity = new BasicExportStatusEntity();
orderStatusEntity.setId(CustomUtil.getId());
@ -116,7 +118,7 @@ public class SpsSyncDownloadService {
orderStatusEntity.setType(NEW_ALL_ORDER);
orderStatusEntity.setUpdateTime(new Date());
orderStatusEntity.setStatus(BasicExportStatusEnum.WAIT_SYNC.getCode());
orderStatusEntity.setStartTime(new Date());
orderStatusEntity.setStartTime(curTime);
orderStatusEntity.setScheduleType(BasicProcessStatus.SCHEDULE_NORMAL);
if (lastUpdateTime != null) {
@ -127,6 +129,7 @@ public class SpsSyncDownloadService {
orderStatusEntity.setRemark(baseResponse.getData().getSyncRemark());
} catch (IOException e) {
e.printStackTrace();
log.error("no6:" + ExceptionUtils.getStackTrace(e));
}
}
basicExportService.insertExportStatus(orderStatusEntity);
@ -931,6 +934,7 @@ public class SpsSyncDownloadService {
syncOrderResponse.setOrderDetailCodeEntities(orderDetailCodeEntities);
syncOrderResponse.setOrderDetailResultEntities(orderDetailResultEntities);
syncOrderResponse.setOrderInvoiceEntities(orderInvoiceEntities);
log.info("no3:" + logs);
return ResultVOUtils.success(syncOrderResponse);
}

@ -16,7 +16,7 @@ import java.util.List;
@Service
@Transactional(rollbackFor = Exception.class)
public class BasicExportServiceImpl extends ServiceImpl<BasicExportDao,BasicExportStatusEntity> implements BasicExportService {
public class BasicExportServiceImpl extends ServiceImpl<BasicExportDao, BasicExportStatusEntity> implements BasicExportService {
@Resource
BasicExportDao basicExportDao;
@ -64,4 +64,9 @@ public class BasicExportServiceImpl extends ServiceImpl<BasicExportDao,BasicExpo
public boolean updateExportStatus(BasicExportStatusEntity basicExportStatusEntity) {
return basicExportDao.updateExportStatus(basicExportStatusEntity);
}
@Override
public BasicExportStatusEntity findLast(String idDatas) {
return basicExportDao.findLast(idDatas);
}
}

@ -3,7 +3,7 @@ server:
spring:
datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_spms_pt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_spms_ph?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
hikari:

@ -138,6 +138,7 @@
from auth_warehouse_bustype
inner join basic_bussiness_type on auth_warehouse_bustype.action = basic_bussiness_type.action
where code = #{code}
group by auth_warehouse_bustype.action
</select>

@ -131,11 +131,10 @@
</select>
<select id="selectPackLevel" parameterType="java.lang.String"
resultType="java.lang.String">
select
basic_products.packLevel
select basic_products.packLevel
FROM basic_udirel
inner JOIN basic_products
ON basic_products.uuid = basic_udirel.uuid
inner JOIN basic_products
ON basic_products.uuid = basic_udirel.uuid
<where>
<if test="nameCode != '' and nameCode != null">
AND basic_products.nameCode = #{nameCode}
@ -714,6 +713,12 @@
<if test="originUuid != '' and originUuid != null">
AND basic_products.originUuid = #{originUuid}
</if>
<if test="deviceRecordKey != '' and deviceRecordKey != null">
AND basic_products.deviceRecordKey = #{deviceRecordKey}
</if>
<if test="nameCode != '' and nameCode != null">
AND basic_products.nameCode = #{nameCode}
</if>
<if test="id != '' and id != null">
AND basic_udirel.id = #{id}
</if>

@ -407,5 +407,6 @@
INNER JOIN sup_manufacturer on sup_product.manufacturerIdFk = sup_manufacturer.manufacturerId
WHERE sup_manufacturer.companyName = #{manufactory}
and sup_product.recordProductName = #{cpmctymc}
limit 1
</select>
</mapper>

@ -32,16 +32,13 @@
</where>
<choose>
<when test="(orderBy!=null ) and (sort=='desc' or sort=='asc')">
order by ${orderBy} ${sort}
<when test="(orderBy != null) and (sort == 'desc' or sort == 'asc')">
order by ${orderBy} ${sort}
</when>
<otherwise>
ORDER BY updateTime DESC
</otherwise>
</choose>
</select>
@ -51,23 +48,23 @@
INTO basic_export_status(id, idDatas, status, `type`, updateTime, scheduleType, startTime, endTime,
remark, receiveStatus
<if test="cacheFilePath!=null and cacheFilePath!= ''">
,cacheFilePath
<if test="cacheFilePath != null and cacheFilePath != ''">
, cacheFilePath
</if>
)
values (#{id},
#{idDatas},
#{status},
#{type},
#{updateTime},
#{scheduleType},
#{startTime},
#{endTime},
#{remark},
#{receiveStatus}
<if test="cacheFilePath!=null and cacheFilePath!= ''">
,#{cacheFilePath}
values (#{id},
#{idDatas},
#{status},
#{type},
#{updateTime},
#{scheduleType},
#{startTime},
#{endTime},
#{remark},
#{receiveStatus}
<if test="cacheFilePath != null and cacheFilePath != ''">
, #{cacheFilePath}
</if>
)
</insert>
@ -120,6 +117,16 @@
</delete>
<delete id="deleteByDate">
delete from basic_export_status where date_format(#{date}, '%Y-%m-%d') >= date_format(startTime, '%Y-%m-%d')
delete
from basic_export_status
where date_format(#{date}, '%Y-%m-%d') >= date_format(startTime, '%Y-%m-%d')
</delete>
<select id="findLast"
resultType="com.glxp.api.entity.sync.BasicExportStatusEntity">
select *
from basic_export_status
where idDatas = #{idDatas}
order by updateTime desc
limit 1
</select>
</mapper>

Loading…
Cancel
Save