手持终端出库库上传,解析,校验

master
anthonywj 4 years ago
parent 898e1955da
commit bd81c60c9e

@ -9,8 +9,9 @@ public class ConstantStatus {
public static final Integer ORDER_STATUS_SUCCESS = 4; //已校验
//ERP校验状态
public static final Integer ORDER_CHECK_SUCCESS = 1; //校验成功
public static final Integer ORDER_CHECK_FAIL = 0; //校验失败
public static final Integer ORDER_CHECK_SUCCESS = 2; //校验成功
public static final Integer ORDER_CHECK_FAIL = 1; //校验失败
public static final Integer ORDER_CHECK_UN = 0; //校验失败
//ERP订单上传状态
public static final Integer ORDER_EXPORT_UN = 0; //未导出

@ -8,6 +8,7 @@ import com.glxp.api.admin.req.info.SystemParamConfigSaveRequest;
import com.glxp.api.admin.res.PageSimpleResponse;
import com.glxp.api.admin.res.info.SystemParamConfigResponse;
import com.glxp.api.admin.service.info.SystemParamConfigService;
import com.glxp.api.admin.thread.IoModifyErpTask;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
@ -53,6 +54,7 @@ public class SystemParamConfigController {
return ResultVOUtils.success(pageSimpleResponse);
}
//key搜索
@GetMapping("/udiwms/sys/config/selectByKey")
public BaseResponse selectByKey(@Valid SystemParamConfigRequest systemParamConfigRequest,
BindingResult bindingResult) {
@ -64,6 +66,7 @@ public class SystemParamConfigController {
return ResultVOUtils.success(systemParamConfigEntity);
}
@AuthRuleAnnotation("system/param/config/save")
@PostMapping("/system/param/config/save")
public BaseResponse save(@RequestBody @Valid SystemParamConfigSaveRequest systemParamConfigSaveRequest,
@ -99,6 +102,9 @@ public class SystemParamConfigController {
}
systemParamConfigService.updateParentId(systemParamConfigSaveRequest1);
}
//toDo //各种设置所需执行操作
return ResultVOUtils.success("修改成功");
}

@ -202,7 +202,7 @@ public class OrderController {
}
mainOrderEntity.setErpFk(docidStr);
orderService.updateOrder(mainOrderEntity);
List<ErpOrderEntity> erpOrderEntities = new ErpOrderClient(ucloudUrl).getErpOrder(docids);
List<ErpOrderEntity> erpOrderEntities = new ErpOrderClient(ucloudUrl).getErpOrder(docids, mainOrderEntity.getAction());
if (erpOrderEntities != null && erpOrderEntities.size() > 0) {
List<ErpOrderEntity> returnOrders = new ContrastErpUtil().transErp(erpOrderEntities, udiRelevanceService, mainOrder);
myErpOrderService.insertErpOrders(returnOrders);

@ -82,8 +82,8 @@ public class OrderDetailController {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (filterErpOrderRequest.getDocid() == null || filterErpOrderRequest.getDocid().equals("")) {
filterErpOrderRequest.setDocid("null");
if (filterErpOrderRequest.getErpOrderId() == null || filterErpOrderRequest.getErpOrderId().equals("")) {
filterErpOrderRequest.setErpOrderId("null");
}
List<ErpOrderEntity> erpInfoEntityList = myErpOrderService.filterMyErpDetailOrder(filterErpOrderRequest);
PageInfo<ErpOrderEntity> pageInfo;

@ -86,7 +86,7 @@ public class ContrastErpUtil {
orderFilterRequest.setId(orderIdFk);
OrderEntity orderEntity = orderService.findOne(orderFilterRequest);
ErpOrderEntity vailExitMsg = vailErpExit(myErpOrderService, mErpOrderEntities, orderIdFk);
SystemParamConfigEntity systemParamConfigEntity = setupService.selectByParamKey("forbidSameErp");
SystemParamConfigEntity systemParamConfigEntity = setupService.selectByParamKey("erp_forbidSameErp");
if (vailExitMsg != null && systemParamConfigEntity!=null && systemParamConfigEntity.getParamValue().equals("1")) {
errMsg = "所选ERP单" + vailExitMsg.getErpOrderId() + "已被其他出入库单" + vailExitMsg.getOrderIdFk() + "绑定!";
}

@ -84,21 +84,21 @@ public class InoutUtils {
public String nullVail(WarehouseEntity warehousetemp, SystemParamConfigService configService) {
if (warehousetemp.getAction().equals(ConstantType.TYPE_PUT_RETURN)) {
SystemParamConfigEntity systemParamConfigEntity = configService.selectByParamKey("isReturnWareHouseIn");
SystemParamConfigEntity systemParamConfigEntity = configService.selectByParamKey("io_isReturnWareHouseIn");
if (systemParamConfigEntity==null || "0".equals(systemParamConfigEntity.getParamValue())) {
return null;
} else {
return warehousetemp.getCode() + "不允许未销售出库可以退货入库";
}
} else if (warehousetemp.getAction().equals(ConstantType.TYPE_OUT_RETURN)) {
SystemParamConfigEntity systemParamConfigEntity = configService.selectByParamKey("isReturnWareHouseOut");
SystemParamConfigEntity systemParamConfigEntity = configService.selectByParamKey("io_isReturnWareHouseOut");
if (systemParamConfigEntity==null || "0".equals(systemParamConfigEntity.getParamValue())) {
return null;
} else {
return warehousetemp.getCode() + "不允许零库存退货出库";
}
} else if (warehousetemp.getAction().equals(ConstantType.TYPE_OUT_SALE)) {
SystemParamConfigEntity systemParamConfigEntity = configService.selectByParamKey("isSalesWareHouseOut");
SystemParamConfigEntity systemParamConfigEntity = configService.selectByParamKey("io_isSalesWareHouseOut");
if (systemParamConfigEntity==null || "0".equals(systemParamConfigEntity.getParamValue())) {
return null;
} else {

@ -14,7 +14,7 @@ public interface CodesDao {
boolean insertWarehouse(WarehouseEntity warehouseEntity);
boolean insertWarehouses(@Param("warehouseEntities") List<WarehouseEntity> warehouseEntities);
boolean insertWarehouses(@Param("io_codesEntities") List<WarehouseEntity> warehouseEntities);
List<WarehouseEntity> findByNo(WarehouseQueryRequest warehouseQueryRequest);
@ -30,7 +30,7 @@ public interface CodesDao {
boolean updateOrderId(@Param("oldOrderId") String oldOrderId, @Param("newOrderId") String newOrderId);
boolean updateUnit(@Param("orderId") String orderId, @Param("fromCorpID") String fromCorpID, @Param("fromCorp") String fromCorp);
boolean updateUnit(@Param("orderId") String orderId, @Param("fromCorpId") String fromCorpId, @Param("fromCorp") String fromCorp);
List<String> findCodesById(@Param("orderId") String orderId);

@ -8,7 +8,7 @@ import java.util.List;
@Data
public class FilterErpOrderRequest extends ListPageRequest {
private String docid;
private String erpOrderId;
private String goodsname;
private String companyname;
private String orderId;

@ -14,11 +14,11 @@ public class OrderEntity {
private String mainAction;
private String fromCorp;
private Integer status;
private String exportStatus;
private Integer exportStatus;
private String fromType;
private Integer contrastStatus;
private String erpFk;
private String signStatus;
private Integer signStatus;
private String stockCheckFk;
private String remark;
}

@ -31,11 +31,11 @@ public class ErpOrderClient {
this.url = url;
}
public List<ErpOrderEntity> getErpOrder(List<String> billCodes) {
public List<ErpOrderEntity> getErpOrder(List<String> billCodes, String action) {
List<ErpOrderEntity> erpOrderEntities = new ArrayList<>();
if (billCodes != null && billCodes.size() > 0) {
for (int i = 0; i < billCodes.size(); i++) {
ErpOrderEntity erpOrderEntity = getErpOrder(billCodes.get(i));
ErpOrderEntity erpOrderEntity = getErpOrder(billCodes.get(i), action);
if (erpOrderEntity != null) {
erpOrderEntities.add(erpOrderEntity);
}
@ -50,6 +50,7 @@ public class ErpOrderClient {
paramMap.put("page", filterOrderRequest.getPage());
paramMap.put("limit", filterOrderRequest.getLimit());
paramMap.put("billAction", filterOrderRequest.getBillAction());
paramMap.put("billFlag", filterOrderRequest.getBillFlag());
if (filterOrderRequest.getStartDate() == null || filterOrderRequest.getEndDate() == null) {
Map date = DateUtil.getDayTRange();
if (filterOrderRequest.getBillNo() != null) {
@ -110,10 +111,11 @@ public class ErpOrderClient {
return null;
}
public ErpOrderEntity getErpOrder(String billCode) {
public ErpOrderEntity getErpOrder(String billCode, String action) {
FilterOrderRequest filterOrderRequest = new FilterOrderRequest();
filterOrderRequest.setPage(1);
filterOrderRequest.setLimit(1);
filterOrderRequest.setBillAction(action);
filterOrderRequest.setBillNo(billCode);
List<ErpOrderEntity> erpOrderEntities = getErpOrder(filterOrderRequest);
if (erpOrderEntities != null && erpOrderEntities.size() > 0) {

@ -16,4 +16,5 @@ public class SystemParamConfigRequest extends ListPageRequest {
private int paramStatus;
private int paramType;
private String paramExplain;
private String key;
}

@ -9,5 +9,6 @@ public class BussinessTypeFilterRequest extends ListPageRequest {
private String action;
private String name;
private String mainAction;
private Boolean enable;
}

@ -22,8 +22,10 @@ public class BussinessTypeServiceImpl implements BussinessTypeService {
if (bussinessTypeFilterRequest == null) {
return Collections.emptyList();
}
int offset = (bussinessTypeFilterRequest.getPage() - 1) * bussinessTypeFilterRequest.getLimit();
PageHelper.offsetPage(offset, bussinessTypeFilterRequest.getLimit());
if(bussinessTypeFilterRequest.getPage()!=null){
int offset = (bussinessTypeFilterRequest.getPage() - 1) * bussinessTypeFilterRequest.getLimit();
PageHelper.offsetPage(offset, bussinessTypeFilterRequest.getLimit());
}
List<BussinessTypeEntity> data = bussinessTypeDao.filterList(bussinessTypeFilterRequest);
return data;
}

@ -33,5 +33,5 @@ public interface CodesService {
List<WarehouseEntity> searchCode(String code);
boolean updateUnit(String orderId, String fromCorpID, String fromCorp);
boolean updateUnit(String orderId, String fromCorpId, String fromCorp);
}

@ -106,7 +106,7 @@ public class CodesServiceImpl implements CodesService {
@Override
public boolean updateUnit(String orderId, String fromCorpID, String fromCorp) {
return warehouseDao.updateUnit(orderId, fromCorpID, fromCorp);
public boolean updateUnit(String orderId, String fromCorpId, String fromCorp) {
return warehouseDao.updateUnit(orderId, fromCorpId, fromCorp);
}
}

@ -22,7 +22,7 @@ import javax.annotation.Resource;
public class BasicUpdateErpDataTask implements SchedulingConfigurer {
final Logger logger = LoggerFactory.getLogger(IoModifyErpTask.class);
String cron;
@Resource
private BasicUpdateproductService updateproductService;
@Resource
@ -37,7 +37,7 @@ public class BasicUpdateErpDataTask implements SchedulingConfigurer {
ScheduledRequest scheduledRequest = new ScheduledRequest();
scheduledRequest.setCronName("updateErpData");
ScheduledEntity scheduledEntity = scheduledDao.findScheduled(scheduledRequest);
String cron = scheduledEntity.getCron();
cron = scheduledEntity.getCron();
if (cron.isEmpty()) {
logger.error("cron is null");
}
@ -48,7 +48,7 @@ public class BasicUpdateErpDataTask implements SchedulingConfigurer {
private void process() {
logger.info("定时更新下载ERP产品信息");
SystemParamConfigEntity isUpdate = systemParamConfigService.selectByParamKey("updateErpData");
SystemParamConfigEntity isUpdate = systemParamConfigService.selectByParamKey("erp_updateErpData");
if (isUpdate != null && "1".equals(isUpdate.getParamValue())) {
SystemParamConfigEntity product = systemParamConfigService.selectByParamKey("erp_products_query");
SystemParamConfigEntity onHand = systemParamConfigService.selectByParamKey("erp_onhand_query");
@ -59,4 +59,9 @@ public class BasicUpdateErpDataTask implements SchedulingConfigurer {
}
}
public void setCron(String cron) {
this.cron = cron;
}
}

@ -78,9 +78,10 @@ public class IoTransInoutService {
orderSaveRequest.setFromCorp(warehouseEntity.getFromCorp());
orderSaveRequest.setFromType("手持终端");
orderSaveRequest.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
orderSaveRequest.setExportStatus("未上传");
orderSaveRequest.setExportStatus(ConstantStatus.ORDER_EXPORT_UN);
orderSaveRequest.setStockCheckFk(postOrder.getStockIdFk());
orderSaveRequest.setSignStatus("0");
orderSaveRequest.setContrastStatus(ConstantStatus.ORDER_CHECK_UN);
orderSaveRequest.setSignStatus(ConstantStatus.ORDER_SIGN_UN);
List<String> docidsList = postOrder.getErpOrders();
String docidStr = "";
if (docidsList != null) {
@ -186,7 +187,7 @@ public class IoTransInoutService {
orderService.updateOrder(orderEntity);
} else {
String erpOrderUrl = systemParamConfigEntityBUMErpQuery.getParamValue();
List<ErpOrderEntity> cloudErps = new ErpOrderClient(erpOrderUrl).getErpOrder(erpIds);
List<ErpOrderEntity> cloudErps = new ErpOrderClient(erpOrderUrl).getErpOrder(erpIds,orderEntity.getAction());
if (cloudErps != null && cloudErps.size() > 0) {
List<ErpOrderEntity> returnOrders = new ContrastErpUtil().transErp(cloudErps, udiRelevanceService, orderEntity.getId());
ErpOrderEntity temp = returnOrders.get(0);
@ -199,6 +200,7 @@ public class IoTransInoutService {
return;
}
}
myErpOrderService.deleteByOrderId(orderEntity.getId());
myErpOrderService.insertErpOrders(returnOrders);
new ContrastErpUtil(udiUrl).contrastErp(udiInfoService, udiRelevanceService, myErpOrderService, orderService, transData, systemParamConfigService);
} else {
@ -206,6 +208,7 @@ public class IoTransInoutService {
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_SUCCESS);
orderEntity.setRemark("获取ERP出入库单据失败");
orderService.updateOrder(orderEntity);
myErpOrderService.deleteByOrderId(orderEntity.getId());
new InoutUtils(udiUrl).generateConstrastDetail(udiInfoService, udiRelevanceService, myErpOrderService, transData);
}
}

@ -22,7 +22,7 @@ public class IoTransInoutTask implements SchedulingConfigurer {
@Resource
protected ScheduledDao scheduledDao;
@Resource
SetupService setupService;
private IoTransInoutService ioTransInoutService;
@Override
public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) {
@ -41,5 +41,7 @@ public class IoTransInoutTask implements SchedulingConfigurer {
private void process() {
logger.info("定时重码校验");
ioTransInoutService.transInout();
}
}

@ -16,6 +16,10 @@
<if test="mainAction != ''and mainAction != null">
AND action LIKE concat(#{mainAction},'%')
</if>
<if test="enable != ''and enable != null">
AND enable =#{enable}
</if>
</where>
</select>
@ -36,12 +40,12 @@
</insert>
<update id="updateBussinessType" parameterType="com.glxp.api.admin.entity.basic.BussinessTypeEntity">
UPDATE basic_bussiness_type SET
action = #{action},
name = #{name},
enable = #{enable},
remark = #{remark}
mainAction = #{mainAction}
UPDATE basic_bussiness_type SET
action = #{action},
name = #{name},
enable = #{enable},
remark = #{remark},
mainAction = #{mainAction}
WHERE id = #{id}
</update>

@ -8,7 +8,6 @@
select
basic_udirel.id,
basic_udirel.thirdId,basic_udirel.thirdName,basic_udirel.isUseDy,
basic_udirel.batchNo,basic_udirel.warehouseName,
basic_products.nameCode,basic_products.packRatio,basic_products.packLevel,
basic_products.bhxjsl,basic_products.bhzxxsbzsl,basic_products.zxxsbzbhsydysl,
basic_products.bhxjcpbm,basic_products.bzcj,
@ -47,7 +46,6 @@
select
basic_udirel.id,
basic_udirel.thirdId,basic_udirel.thirdName,basic_udirel.isUseDy,
basic_udirel.batchNo,basic_udirel.warehouseName,
basic_products.nameCode,basic_products.packRatio,basic_products.packLevel,basic_products.bhxjsl,basic_products.bhzxxsbzsl,basic_products.zxxsbzbhsydysl,basic_products.bhxjcpbm,basic_products.bzcj,basic_products.addType,basic_products.deviceRecordKey,basic_products.cpmctymc,basic_products.cplb,basic_products.flbm,basic_products.ggxh,basic_products.qxlb,basic_products.tyshxydm,basic_products.ylqxzcrbarmc,basic_products.zczbhhzbapzbh,basic_products.ylqxzcrbarywmc,basic_products.sydycpbs,basic_products.uuid,basic_products.sjcpbm,basic_products.versionNumber,basic_products.diType
FROM basic_products
right JOIN basic_udirel
@ -97,7 +95,7 @@
<insert id="insertUdiRelevance" keyProperty="id" parameterType="com.glxp.api.admin.entity.basic.UdiRelevanceEntity">
replace INTO basic_udirel
(
thirdId,thirdName,uuid,isUseDy,updateTime,batchNo,warehouseName
thirdId,thirdName,uuid,isUseDy,updateTime
)
values
(
@ -105,9 +103,8 @@
#{thirdName},
#{uuid},
#{isUseDy},
#{updateTime},
#{batchNo},
#{warehouseName}
#{updateTime}
)
</insert>
@ -133,8 +130,6 @@
<if test="uuid != null">uuid=#{uuid},</if>
<if test="isUseDy != null">isUseDy=#{isUseDy},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="batchNo != null">batchNo=#{batchNo},</if>
<if test="warehouseName != null">warehouseName=#{warehouseName},</if>
</set>
WHERE id = #{id}
</update>

@ -12,6 +12,9 @@
<if test="paramName != null and '' != paramName">
AND `paramName` LIKE CONCAT(#{paramName},'%')
</if>
<if test="key != null and '' != key">
and `paramName` LIKE CONCAT('%',#{key},'%') or paramKey LIKE CONCAT('%',#{key},'%')
</if>
</where>
</select>

@ -21,9 +21,6 @@
<if test="code != '' and code!=null">
and code =#{code}
</if>
<if test="udi != '' and udi!=null">
and udi =#{udi}
</if>
<if test="batchNo != '' and batchNo!=null">
and batchNo =#{batchNo}
</if>
@ -33,7 +30,7 @@
<insert id="insertWarehouse" keyProperty="id" parameterType="com.glxp.api.admin.req.inout.WarehouseSaveRequest">
INSERT INTO io_codes(action,mainAction,code,corpOrderId,actor,actDate,wrongCode,upperCorpOrderId,fromCorpId,fromCorp,type)
INSERT INTO io_codes(action,mainAction,code,corpOrderId,actor,actDate,upperCorpOrderId,fromCorpId,fromCorp)
values(
#{action},
#{mainAction},
@ -41,10 +38,8 @@
#{corpOrderId},
#{actor},
#{actDate},
#{wrongCode},
#{upperCorpOrderId},
#{fromCorpId},
#{fromCorp},#{orderId},#{type})
#{fromCorp},#{orderId})
</insert>
<insert id="insertWarehouses" parameterType="java.util.List">
@ -55,9 +50,8 @@
corpOrderId,
actor,
actDate,
wrongCode,
upperCorpOrderId,
fromCorpId,fromCorp,orderId,batchNo,produceDate,expireDate,serialNo,udi,count,type)
fromCorpId,fromCorp,orderId,batchNo,produceDate,expireDate,
serialNo,count,packageLevel,warehouseCode)
VALUES
<foreach collection="io_codesEntities" item="item" index="index"
separator=",">
@ -68,8 +62,6 @@
#{item.corpOrderId},
#{item.actor},
#{item.actDate},
#{item.wrongCode},
#{item.upperCorpOrderId},
#{item.fromCorpId},
#{
item.fromCorp
@ -77,9 +69,8 @@
,#{item.produceDate}
,#{item.expireDate}
,#{item.serialNo}
,#{item.udi}
,#{item.count}
,#{item.type})
,#{item.packageLevel} ,#{item.warehouseCode})
</foreach>
</insert>
@ -109,7 +100,7 @@
<update id="updateUnit" parameterType="Map">
UPDATE io_codes SET fromCorpID = #{fromCorpID}, fromCorp = #{fromCorp}
UPDATE io_codes SET fromCorpId = #{fromCorpId}, fromCorp = #{fromCorp}
WHERE orderId = #{orderId}
</update>
</mapper>

@ -7,7 +7,7 @@
<insert id="insertCodesTemp" parameterType="java.util.List">
INSERT INTO io_codes_temp
(action, mainAction,code, corpOrderId, actor,actDate,
fromCorpID, fromCorp, orderId,batchNo,produceDate,expireDate,serialNo,udi,count)
fromCorpId, fromCorp, orderId,batchNo,produceDate,expireDate,serialNo,count)
VALUES
<foreach collection="codes" item="item" index="index"
separator=",">
@ -18,24 +18,33 @@
#{item.corpOrderId},
#{item.actor},
#{item.actDate},
#{item.fromCorpID},
#{item.fromCorpId},
#{item.fromCorp},
#{item.orderId}
,#{item.batchNo}
,#{item.produceDate}
,#{item.expireDate}
,#{item.serialNo}
,#{item.udi}
,#{item.count}
)
</foreach>
</insert>
<select id="findByOrderId" parameterType="com.glxp.api.admin.req.inout.WarehouseQueryRequest"
resultType="com.glxp.api.admin.entity.inout.WarehouseEntity">
SELECT *
FROM io_codes_temp
where `orderId` = #{orderId} AND code LIKE concat('%',#{code},'%')
</select>
SELECT *
FROM io_codes_temp
<where>
<if test="orderId != '' and orderId!=null">
and orderId =#{orderId}
</if>
<if test="code != '' and code!=null">
and code LIKE concat('%',#{code},'%')
</if>
<if test="batchNo != '' and batchNo!=null">
and batchNo =#{batchNo}
</if>
</where>
</select>
<delete id="deleteCodesTemp" parameterType="java.util.List">
DELETE FROM io_codes_temp WHERE id IN

@ -7,11 +7,11 @@
resultType="com.glxp.api.admin.entity.inout.ErpOrderEntity">
select * from io_order_detail
<where>
<if test="docid != '' and docid!=null">
and docid = #{docid}
<if test="erpOrderId != '' and erpOrderId!=null">
and erpOrderId = #{erpOrderId}
</if>
<if test="goodsname != '' and goodsname!=null">
and GOODSNAME = #{goodsname}
and goodsname = #{goodsname}
</if>
<if test="orderId != '' and orderId!=null">
and orderIdFk = #{orderId}
@ -32,14 +32,14 @@
resultType="com.glxp.api.admin.entity.inout.ErpOrderEntity">
select * from io_order_detail
<where>
<if test="docid != '' and docid!=null">
and docid = #{docid}
<if test="erpOrderId != '' and erpOrderId!=null">
and erpOrderId = #{erpOrderId}
</if>
<if test="goodsname != '' and goodsname!=null">
and GOODSNAME = #{goodsname}
and goodsname = #{goodsname}
</if>
</where>
group by orderIdFk,docid
group by orderIdFk,erpOrderId
</select>
@ -47,11 +47,11 @@
resultType="com.glxp.api.admin.entity.inout.ErpOrderEntity">
select * from io_order_detail
<where>
<if test="docid != '' and docid!=null">
and docid = #{docid}
<if test="erpOrderId != '' and erpOrderId!=null">
and erpOrderId = #{erpOrderId}
</if>
<if test="goodsname != '' and goodsname!=null">
and GOODSNAME = #{goodsname}
and goodsname = #{goodsname}
</if>
<if test="orderIdFk != '' and orderIdFk!=null">
and orderIdFk = #{orderIdFk}
@ -63,7 +63,7 @@
<select id="findAllByDocids" parameterType="java.util.List"
resultType="com.glxp.api.admin.entity.inout.ErpOrderEntity">
select * from io_order_detail where docid in
select * from io_order_detail where erpOrderId in
<foreach item="item" index="index" collection="docids" open="(" separator="," close=")">
#{item}
</foreach>
@ -71,30 +71,30 @@
</select>
<select id="selectAllIds" parameterType="java.util.List"
resultType="java.lang.String">
select docid from io_order_detail where
docid in (
select erpOrderId from io_order_detail where
erpOrderId in (
<foreach collection="docids" item="item" index="index"
separator=",">
#{item}
</foreach>
)
GROUP BY docid
GROUP BY erpOrderId
</select>
<select id="filterAllDocid" parameterType="com.glxp.api.admin.entity.inout.FilterErpOrderRequest"
resultType="java.lang.String">
select docid from io_order_detail
select erpOrderId from io_order_detail
<where>
<if test="orderId != '' and orderId!=null">
and orderIdFk = #{orderId}
</if>
</where>
group by docid
group by erpOrderId
</select>
<!-- and dtlgoodsqty=count-->
<select id="filterAllDocidE" parameterType="com.glxp.api.admin.entity.inout.FilterErpOrderRequest"
resultType="com.glxp.api.admin.entity.inout.ErpOrderEntity">
select docid,orderIdFk from io_order_detail
select erpOrderId,orderIdFk from io_order_detail
<where>
<if test="orderId != '' and orderId!=null">
@ -102,7 +102,7 @@
</if>
</where>
group by docid
group by erpOrderId
</select>
<insert id="insertErpOrder" keyProperty="id" parameterType="com.glxp.api.admin.entity.inout.ErpOrderEntity">
@ -168,7 +168,7 @@
WHERE id = #{id}
</update>
<delete id="deleteById" parameterType="Map">
DELETE FROM io_order_detail WHERE docid = #{id}
DELETE FROM io_order_detail WHERE erpOrderId = #{id}
</delete>
<delete id="deleteByPrimiyId" parameterType="Map">

Loading…
Cancel
Save