同步相关问题修改。用户选入物资字典相关修改

master
anthonywj 2 years ago
parent 5d248ac9e9
commit 2d3bd6fe09

@ -54,7 +54,8 @@ public class AuthorizeAspect {
HttpServletRequest request = attributes.getRequest(); HttpServletRequest request = attributes.getRequest();
String id = request.getHeader("ADMIN_ID"); String id = request.getHeader("ADMIN_ID");
if (StrUtil.isBlank(id)) { String token = request.getHeader("ADMIN_TOKEN");
if (StrUtil.isBlank(id) || StrUtil.isBlank(token)) {
String apiKey = request.getHeader("api_key"); String apiKey = request.getHeader("api_key");
String secretKey = request.getHeader("secret_key"); String secretKey = request.getHeader("secret_key");
AuthLicense authLicense = authLicenseDao.get(apiKey); AuthLicense authLicense = authLicenseDao.get(apiKey);
@ -72,7 +73,7 @@ public class AuthorizeAspect {
throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL); throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL);
} }
String token = request.getHeader("ADMIN_TOKEN");
if (token == null) { if (token == null) {
throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL); throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL);
} }

@ -50,6 +50,12 @@ public enum BasicExportTypeEnum {
* *
*/ */
IO_ORDER("io_order", "单据信息"), IO_ORDER("io_order", "单据信息"),
/**
*
*/
ORDER_INVOICE("io_order_invoice", "扫码单据发票信息"),
; ;
@EnumValue @EnumValue
private String key; private String key;

@ -1,6 +1,7 @@
package com.glxp.api.controller.basic; package com.glxp.api.controller.basic;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.AuthRuleAnnotation;
@ -212,8 +213,8 @@ public class UdiRlSupController extends BaseController {
@Log(title = "单据管理", businessType = BusinessType.INSERT) @Log(title = "单据管理", businessType = BusinessType.INSERT)
public BaseResponse insertFilter(@RequestBody UdiInfoExportRequest udiInfoExportRequest) { public BaseResponse insertFilter(@RequestBody UdiInfoExportRequest udiInfoExportRequest) {
CompanyEntity companyEntity = companyService.findCompany(udiInfoExportRequest.getCustomerId() + ""); CompanyEntity companyEntity = companyService.findCompany(udiInfoExportRequest.getCustomerId() + "");
if(companyEntity != null){ if (companyEntity != null) {
if("110".equals(companyEntity.getUnitIdFk())) { if ("110".equals(companyEntity.getUnitIdFk())) {
udiInfoExportRequest.setUnitFk(null); udiInfoExportRequest.setUnitFk(null);
} else { } else {
udiInfoExportRequest.setUnitFk(companyEntity.getUnitIdFk()); udiInfoExportRequest.setUnitFk(companyEntity.getUnitIdFk());
@ -244,6 +245,7 @@ public class UdiRlSupController extends BaseController {
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity); udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
UdiProductEntity udiProductEntity = new UdiProductEntity(); UdiProductEntity udiProductEntity = new UdiProductEntity();
BeanUtils.copyProperties(udiInfoExportRequest.getSupplementRequest(), udiProductEntity); BeanUtils.copyProperties(udiInfoExportRequest.getSupplementRequest(), udiProductEntity);
udiProductEntity.setId(IdUtil.getSnowflakeNextId());
udiProductService.insertUdiInfo(udiProductEntity); udiProductService.insertUdiInfo(udiProductEntity);
return ResultVOUtils.success("选入成功!"); return ResultVOUtils.success("选入成功!");
} }

@ -445,4 +445,19 @@ public class IoOrderReviewController extends BaseController {
} }
@AuthRuleAnnotation("")
@PostMapping("/udiwms/order/getSimpleOrder")
public BaseResponse getSimpleOrder(@RequestBody ReviewSpmsRequest reviewSpmsRequest) {
getUser();
if (StrUtil.isEmpty(reviewSpmsRequest.getBillNo())) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
IoOrderEntity orderEntity = orderService.findByBillNo(reviewSpmsRequest.getBillNo());
return ResultVOUtils.success(orderEntity);
}
} }

@ -264,10 +264,10 @@ public class SpsSyncExportStatusController {
CompletableFuture future = CompletableFuture.runAsync(() -> { CompletableFuture future = CompletableFuture.runAsync(() -> {
switch (req.getExportType()) { switch (req.getExportType()) {
case IO_ORDER: case IO_ORDER:
spsSyncDownloadService.syncOrderTask(); spsSyncDownloadService.syncOrderTask(req.getSyncTime());
break; break;
case COUNTRY_DI_DATA: case COUNTRY_DI_DATA:
spsSyncDownloadService.syncDiProductsTask(); spsSyncDownloadService.syncDiProductsTask(req.getSyncTime());
break; break;
default: default:
spsSyncDownloadService.syncData(syncDataSetEntity, req.getExportType(), req.getSyncTime()); spsSyncDownloadService.syncData(syncDataSetEntity, req.getExportType(), req.getSyncTime());

@ -54,8 +54,7 @@ public class SyncDataSetController {
@AuthRuleAnnotation("system/param/syncData/save") @AuthRuleAnnotation("system/param/syncData/save")
@PostMapping("/system/param/syncData/save") @PostMapping("/system/param/syncData/save")
public BaseResponse save(@RequestBody @Valid SyncDataSetResponse syncDataSetResponse public BaseResponse save(@RequestBody @Valid SyncDataSetResponse syncDataSetResponse) {
) {
SyncDataSetEntity syncDataSetEntity = new SyncDataSetEntity(); SyncDataSetEntity syncDataSetEntity = new SyncDataSetEntity();
BeanUtils.copyProperties(syncDataSetResponse, syncDataSetEntity); BeanUtils.copyProperties(syncDataSetResponse, syncDataSetEntity);
syncDataSetEntity.setUpdateTime(new Date()); syncDataSetEntity.setUpdateTime(new Date());

@ -83,7 +83,7 @@ public class UdiProductEntity {
private Date updateTime; private Date updateTime;
private Integer relSupId; private Long relSupId;
public Boolean getAllowNoBatch() { public Boolean getAllowNoBatch() {

@ -18,7 +18,7 @@ public class UdiRlSupEntity {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Long id;
/** /**
* ID * ID

@ -5,7 +5,7 @@ import lombok.Data;
@Data @Data
public class CompanyProductRelevanceResponse { public class CompanyProductRelevanceResponse {
private int id; private Long id;
private Integer rlId; private Integer rlId;
private String thirdId; private String thirdId;
private String thirdName; private String thirdName;

@ -5,7 +5,7 @@ import lombok.Data;
@Data @Data
public class UdiRlSupResponse { public class UdiRlSupResponse {
private int id; private Long id;
private Integer rlId; private Integer rlId;
private String thirdId; private String thirdId;
private String thirdName; private String thirdName;

@ -1,6 +1,7 @@
package com.glxp.api.service.basic.impl; package com.glxp.api.service.basic.impl;
import cn.hutool.core.util.IdUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
@ -39,6 +40,8 @@ public class CompanyProductRelevanceServiceImpl extends ServiceImpl<CompanyProdu
@Override @Override
public boolean insertCompanyProductRelevance(CompanyProductRelevanceEntity companyProductRelevanceEntity) { public boolean insertCompanyProductRelevance(CompanyProductRelevanceEntity companyProductRelevanceEntity) {
if (companyProductRelevanceEntity.getId() == null)
companyProductRelevanceEntity.setId(IdUtil.getSnowflakeNextId());
return companyProductRelevanceDao.insertCompanyProductRelevance(companyProductRelevanceEntity); return companyProductRelevanceDao.insertCompanyProductRelevance(companyProductRelevanceEntity);
} }

@ -1,6 +1,7 @@
package com.glxp.api.service.basic.impl; package com.glxp.api.service.basic.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.basic.UdiProductDao; import com.glxp.api.dao.basic.UdiProductDao;
@ -98,6 +99,9 @@ public class UdiProductServiceImpl implements UdiProductService {
@Override @Override
public boolean insertUdiInfo(UdiProductEntity udiProductEntity) { public boolean insertUdiInfo(UdiProductEntity udiProductEntity) {
udiProductEntity.setUpdateTime(new Date()); udiProductEntity.setUpdateTime(new Date());
if (udiProductEntity.getId() == null) {
udiProductEntity.setId(IdUtil.getSnowflakeNextId());
}
return udiProductDao.insertUdiInfo(udiProductEntity); return udiProductDao.insertUdiInfo(udiProductEntity);
} }

@ -3,6 +3,7 @@ package com.glxp.api.service.inout;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.UUID; import cn.hutool.core.lang.UUID;
import cn.hutool.core.thread.ThreadUtil; import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.Constant; import com.glxp.api.constant.Constant;
@ -194,6 +195,7 @@ public class IoCheckInoutService {
IoCodeLostEntity codeLostEntity = codeLostService.findByCode(codeEntity.getCode()); IoCodeLostEntity codeLostEntity = codeLostService.findByCode(codeEntity.getCode());
if (codeLostEntity == null) { if (codeLostEntity == null) {
codeLostEntity = new IoCodeLostEntity(); codeLostEntity = new IoCodeLostEntity();
codeLostEntity.setId(IdUtil.getSnowflakeNextId());
codeLostEntity.setNameCode(udiEntity.getUdi()); codeLostEntity.setNameCode(udiEntity.getUdi());
codeLostEntity.setCode(codeEntity.getCode()); codeLostEntity.setCode(codeEntity.getCode());
} }

@ -85,7 +85,7 @@ public class SpsSyncDownloadService {
// 创建单据同步任务 // 创建单据同步任务
public void syncOrderTask() { public void syncOrderTask(Date lastUpdateTime) {
log.info("创建单据同步任务"); log.info("创建单据同步任务");
//自动创建要求被下载已完成单据任务. //自动创建要求被下载已完成单据任务.
@ -98,7 +98,11 @@ public class SpsSyncDownloadService {
//首次任务or上次任务结束 //首次任务or上次任务结束
if (basicExportStatusEntity1 == null || BasicExportStatusEnum.COMPLETED.getCode().equals(basicExportStatusEntity1.getStatus())) { if (basicExportStatusEntity1 == null || BasicExportStatusEnum.COMPLETED.getCode().equals(basicExportStatusEntity1.getStatus())) {
BaseResponse<SpsSyncOrderResponse> baseResponse = findOrder(getRequest(ConstantStatus.SYNC_DOWNLOAD_SCAN_ORDER));
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(); SpsSyncOrderResponse syncOrderResponse = baseResponse.getData();
// 2.查看是否有需要更新的数据 // 2.查看是否有需要更新的数据
if (CollUtil.isNotEmpty(syncOrderResponse.getOrderEntities())) { if (CollUtil.isNotEmpty(syncOrderResponse.getOrderEntities())) {
@ -117,7 +121,7 @@ public class SpsSyncDownloadService {
} }
// 创建国家库同步任务 // 创建国家库同步任务
public void syncDiProductsTask() { public void syncDiProductsTask(Date lastUpdateTime) {
BasicExportStatusEntity exportStatus = basicExportService.getOne(Wrappers.lambdaQuery(BasicExportStatusEntity.class) BasicExportStatusEntity exportStatus = basicExportService.getOne(Wrappers.lambdaQuery(BasicExportStatusEntity.class)
.eq(BasicExportStatusEntity::getType, NEW_ALL_UDIS) .eq(BasicExportStatusEntity::getType, NEW_ALL_UDIS)
@ -127,8 +131,10 @@ public class SpsSyncDownloadService {
//首次任务or上次任务结束 //首次任务or上次任务结束
if (exportStatus == null || BasicExportStatusEnum.COMPLETED.getCode().equals(exportStatus.getStatus())) { if (exportStatus == null || BasicExportStatusEnum.COMPLETED.getCode().equals(exportStatus.getStatus())) {
SpsSyncDataRequest spsSyncDataRequest = getRequest(ConstantStatus.SYNC_DI_PRODUCTS);
BaseResponse<SpSyncUdiResponse> baseResponse = syncUdi(getRequest(ConstantStatus.SYNC_DI_PRODUCTS)); if (lastUpdateTime != null)
spsSyncDataRequest.setLastUpdateTime(DateUtil.formatDateTime(lastUpdateTime));
BaseResponse<SpSyncUdiResponse> baseResponse = syncUdi(spsSyncDataRequest);
SpSyncUdiResponse spSyncUdiResponse = baseResponse.getData(); SpSyncUdiResponse spSyncUdiResponse = baseResponse.getData();
if (CollUtil.isNotEmpty(spSyncUdiResponse.getProductInfoEntityList()) if (CollUtil.isNotEmpty(spSyncUdiResponse.getProductInfoEntityList())
|| CollUtil.isNotEmpty(spSyncUdiResponse.getUdiCompanyEntities())) { || CollUtil.isNotEmpty(spSyncUdiResponse.getUdiCompanyEntities())) {

@ -65,7 +65,7 @@ public class AsyncHeartTask implements SchedulingConfigurer {
redisUtil.set("SPS_SYNC_GEN_DATA", lastTime); redisUtil.set("SPS_SYNC_GEN_DATA", lastTime);
} }
if (curTime - lastTime > timeInterval) { if (curTime - lastTime > timeInterval) {
spsSyncDownloadService.syncDiProductsTask(); spsSyncDownloadService.syncDiProductsTask(null);
// todo 生成任务都写在这 // todo 生成任务都写在这
Arrays.stream(BasicExportTypeEnum.values()).forEach(i -> { Arrays.stream(BasicExportTypeEnum.values()).forEach(i -> {
spsSyncDownloadService.syncData(syncDataSetEntity, i, null); spsSyncDownloadService.syncData(syncDataSetEntity, i, null);
@ -78,8 +78,8 @@ public class AsyncHeartTask implements SchedulingConfigurer {
//定时同步单据最近更新数据至任务表,等待下载 //定时同步单据最近更新数据至任务表,等待下载
if (syncDataSetEntity.getOrderSyncTime() != null) { if (syncDataSetEntity.getOrderToInSyncTime() != null) {
long timeInterval = syncDataSetEntity.getOrderSyncTime() * 6 * 1000; long timeInterval = syncDataSetEntity.getOrderToInSyncTime() * 6 * 1000;
long curTime = System.currentTimeMillis(); long curTime = System.currentTimeMillis();
Long lastTime = (Long) redisUtil.get("SPS_ORDER_SYNC_GEN_DATA"); Long lastTime = (Long) redisUtil.get("SPS_ORDER_SYNC_GEN_DATA");
if (lastTime == null) { if (lastTime == null) {
@ -87,7 +87,7 @@ public class AsyncHeartTask implements SchedulingConfigurer {
redisUtil.set("SPS_ORDER_SYNC_GEN_DATA", lastTime); redisUtil.set("SPS_ORDER_SYNC_GEN_DATA", lastTime);
} }
if (curTime - lastTime > timeInterval) { if (curTime - lastTime > timeInterval) {
spsSyncDownloadService.syncOrderTask(); spsSyncDownloadService.syncOrderTask(null);
redisUtil.set("SPS_ORDER_SYNC_GEN_DATA", curTime); redisUtil.set("SPS_ORDER_SYNC_GEN_DATA", curTime);
} }
} }

@ -60,7 +60,7 @@ public class DateUtil extends DateUtils {
* yyyy-MM-dd HH:mm:ss * yyyy-MM-dd HH:mm:ss
*/ */
public static String formatDateTime(Date date) { public static String formatDateTime(Date date) {
Date currentTime = new Date(); Date currentTime = date;
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateString = formatter.format(currentTime); String dateString = formatter.format(currentTime);
return dateString; return dateString;

@ -1,6 +1,7 @@
package com.glxp.api.util.udi; package com.glxp.api.util.udi;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.glxp.api.constant.ConstantStatus; import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.entity.basic.UdiProductEntity; import com.glxp.api.entity.basic.UdiProductEntity;
@ -27,6 +28,9 @@ public class UdiInfoUtil {
public static List<UdiProductEntity> initUdiInfoEntitys(List<UdiProductEntity> udiProductEntities) { public static List<UdiProductEntity> initUdiInfoEntitys(List<UdiProductEntity> udiProductEntities) {
if (CollUtil.isNotEmpty(udiProductEntities)) { if (CollUtil.isNotEmpty(udiProductEntities)) {
for (UdiProductEntity udiProductEntity : udiProductEntities) { for (UdiProductEntity udiProductEntity : udiProductEntities) {
if (udiProductEntity.getId() == null) {
udiProductEntity.setId(IdUtil.getSnowflakeNextId());
}
udiProductEntity.setUpdateTime(new Date()); udiProductEntity.setUpdateTime(new Date());
udiProductEntity.setProductType(ConstantStatus.PRODUCT_TYPE_UDI); udiProductEntity.setProductType(ConstantStatus.PRODUCT_TYPE_UDI);
if (StrUtil.isNotEmpty(udiProductEntity.getScbssfbhph()) && "否".equals(udiProductEntity.getScbssfbhph())) { if (StrUtil.isNotEmpty(udiProductEntity.getScbssfbhph()) && "否".equals(udiProductEntity.getScbssfbhph())) {

@ -2,13 +2,13 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!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.CompanyProductRelevanceDao"> <mapper namespace="com.glxp.api.dao.basic.CompanyProductRelevanceDao">
<insert id="insertCompanyProductRelevance" <insert id="insertCompanyProductRelevance" useGeneratedKeys="true"
parameterType="com.glxp.api.entity.basic.CompanyProductRelevanceEntity"> parameterType="com.glxp.api.entity.basic.CompanyProductRelevanceEntity">
replace replace
INTO company_product_relevance(customerId, productId, enterpriseId, registrationId, INTO company_product_relevance(id, customerId, productId, enterpriseId, registrationId,
createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk, createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk,
price) price)
values (#{customerId}, values (#{id}, #{customerId},
#{productId}, #{productId},
#{enterpriseId}, #{enterpriseId},
#{registrationId}, #{registrationId},

@ -165,7 +165,7 @@
<insert id="insertUdiInfo" keyProperty="id" parameterType="com.glxp.api.entity.basic.UdiProductEntity"> <insert id="insertUdiInfo" keyProperty="id" parameterType="com.glxp.api.entity.basic.UdiProductEntity">
replace replace
INTO basic_products INTO basic_products
(uuid, originUuid, nameCode, deviceRecordKey, packRatio, packLevel, packUnit, bhxjsl, bhzxxsbzsl, (id, uuid, originUuid, nameCode, deviceRecordKey, packRatio, packLevel, packUnit, bhxjsl, bhzxxsbzsl,
zxxsbzbhsydysl, bhxjcpbm, bzcj, cpmctymc, cplb, flbm, ggxh, qxlb, tyshxydm, zxxsbzbhsydysl, bhxjcpbm, bzcj, cpmctymc, cplb, flbm, ggxh, qxlb, tyshxydm,
ylqxzcrbarmc, zczbhhzbapzbh, ylqxzcrbarywmc, sydycpbs, sjcpbm, versionNumber, diType, ybbm, sptm, ylqxzcrbarmc, zczbhhzbapzbh, ylqxzcrbarywmc, sydycpbs, sjcpbm, versionNumber, diType, ybbm, sptm,
manufactory, measname, productType, scbssfbhph, scbssfbhxlh, scbssfbhscrq, scbssfbhsxrq, cpms, manufactory, measname, productType, scbssfbhph, scbssfbhxlh, scbssfbhscrq, scbssfbhsxrq, cpms,
@ -173,7 +173,7 @@
allowNoProduct, allowNoSerial, spmc, cplx, hchzsb, cpdls, price, basicPrductRemak1, basicPrductRemak2, allowNoProduct, allowNoSerial, spmc, cplx, hchzsb, cpdls, price, basicPrductRemak1, basicPrductRemak2,
basicPrductRemak3, basicPrductRemak4, basicPrductRemak5, basicPrductRemak6, basicPrductRemak7, basicPrductRemak3, basicPrductRemak4, basicPrductRemak5, basicPrductRemak6, basicPrductRemak7,
basicPrductRemak8, updateTime) basicPrductRemak8, updateTime)
values (#{uuid}, values (#{id}, #{uuid},
#{originUuid}, #{originUuid},
#{nameCode}, #{nameCode},
#{deviceRecordKey}, #{deviceRecordKey},

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.inout.IoOrderDetailBizDao"> <mapper namespace="com.glxp.api.dao.inout.IoOrderDetailBizDao">
<select id="filterList" resultType="com.glxp.api.res.inout.IoOrderDetailBizResponse"> <select id="filterList" resultType="com.glxp.api.res.inout.IoOrderDetailBizResponse">
select io_order_detail_biz.*, select io_order_detail_biz.*
from io_order_detail_biz from io_order_detail_biz
left join basic_udirel bu on bu.id = io_order_detail_biz.bindRlFk left join basic_udirel bu on bu.id = io_order_detail_biz.bindRlFk
left join basic_products bp on bu.uuid = bp.uuid left join basic_products bp on bu.uuid = bp.uuid
@ -25,7 +25,9 @@
<select id="getfilterList" resultType="com.glxp.api.res.inout.IoOrderDetailBizResponse"> <select id="getfilterList" resultType="com.glxp.api.res.inout.IoOrderDetailBizResponse">
select io_order_detail_biz.*, select io_order_detail_biz.*,
(select count(*) FROM io_order_invoice where io_order_invoice.orderIdFk=io_order_detail_biz.orderIdFk) as sucCount (select count(*)
FROM io_order_invoice
where io_order_invoice.orderIdFk = io_order_detail_biz.orderIdFk) as sucCount
from io_order_detail_biz from io_order_detail_biz
left join basic_udirel bu on bu.id = io_order_detail_biz.bindRlFk left join basic_udirel bu on bu.id = io_order_detail_biz.bindRlFk
left join basic_products bp on bu.uuid = bp.uuid left join basic_products bp on bu.uuid = bp.uuid
@ -47,7 +49,6 @@
</select> </select>
<select id="filterListInv" resultType="com.glxp.api.res.inout.IoOrderInvoiceResponse"> <select id="filterListInv" resultType="com.glxp.api.res.inout.IoOrderInvoiceResponse">
SELECT ic.*, SELECT ic.*,
(select cpmctymc from basic_products where basic_products.uuid = bu.uuid) cpmctymc, (select cpmctymc from basic_products where basic_products.uuid = bu.uuid) cpmctymc,
@ -73,7 +74,8 @@
</select> </select>
<select id="selectOrderDetailBiz" resultType="com.glxp.api.entity.inout.IoOrderDetailBizEntity"> <select id="selectOrderDetailBiz" resultType="com.glxp.api.entity.inout.IoOrderDetailBizEntity">
select * from io_order_detail_biz select *
from io_order_detail_biz
<where> <where>
<if test="orderId != null and orderId != ''"> <if test="orderId != null and orderId != ''">
AND orderIdFk = #{orderId} AND orderIdFk = #{orderId}

@ -22,7 +22,7 @@
, unCheckCert, checkedCert, companyCert, manufacturerCert, productCert, basicDept , unCheckCert, checkedCert, companyCert, manufacturerCert, productCert, basicDept
, systemConfig , systemConfig
, printConfig, scanChangeConfig, supCert, dbDiCompany, busChangeConfig , printConfig, scanChangeConfig, supCert, dbDiCompany, busChangeConfig
, udiCodeLost, udiCodeRel, orderInvoice) , udiCodeLost, udiCodeRel, orderInvoice, orderToInSyncTime, orderSyncDlTime)
values (#{id}, values (#{id},
#{typeBus}, #{typeBus},
#{typeScan}, #{typeScan},
@ -51,6 +51,6 @@
#{unCheckCert}, #{unCheckCert},
#{checkedCert}, #{companyCert}, #{manufacturerCert}, #{productCert}, #{basicDept}, #{checkedCert}, #{companyCert}, #{manufacturerCert}, #{productCert}, #{basicDept},
#{systemConfig}, #{printConfig}, #{scanChangeConfig}, #{supCert}, #{dbDiCompany}, #{busChangeConfig}, #{systemConfig}, #{printConfig}, #{scanChangeConfig}, #{supCert}, #{dbDiCompany}, #{busChangeConfig},
#{udiCodeLost}, #{udiCodeRel}, #{orderInvoice}) #{udiCodeLost}, #{udiCodeRel}, #{orderInvoice}, #{orderToInSyncTime}, #{orderSyncDlTime})
</insert> </insert>
</mapper> </mapper>

@ -10,7 +10,7 @@
<insert id="inserts" parameterType="com.glxp.api.entity.sync.SyncDataBustypeEntity"> <insert id="inserts" parameterType="com.glxp.api.entity.sync.SyncDataBustypeEntity">
insert INTO sync_data_bustypes replace INTO sync_data_bustypes
(id, `action`, `name`, outChange, orderStatus, direct) (id, `action`, `name`, outChange, orderStatus, direct)
values values

Loading…
Cancel
Save