代码备份

purchase
anthonyywj2 3 years ago
parent 909194a54b
commit f291d47863

@ -235,8 +235,10 @@ public class ThrProductsController {
thrProductsImportLogService.insertImportLog(thrProductsImportLogEntity);
if (filterThrProductsRequest.getThrProductsEntities() != null && filterThrProductsRequest.getThrProductsEntities().size() > 0) {//选中导出
//选中下载
thrProductsDlService.importSelectProducrs(genKey, filterThrProductsRequest.getThrProductsEntities(), filterThrProductsRequest.getThirdSysFk());
} else { //结果导出
} else {
//全部下载
thrProductsDlService.importProducrs(genKey,filterThrProductsRequest );
}

@ -18,6 +18,7 @@ public interface ThrProductsDao {
List<ThrProductsEntity> selectThrProducts(FilterThrProductsRequest filterThrProductsRequest);
ThrProductsEntity selectByCode(@Param("code") String code, @Param("thirdSysFk") String thirdSysFk);
boolean insertOrUpdateSelective(ThrProductsEntity thrProductsEntity);

@ -18,7 +18,7 @@ public class SyncDataSetEntity {
private boolean basicThirdBusOrder; //第三方业务单据
private boolean orderScanFinish; //已完成单据
private boolean dbDiProducts; //DI产品信息
private boolean downstreamEnable; //游是否联通
private boolean downstreamEnable; //游是否联通
private Integer syncTime; //数据上传间隔时间
private Integer syncDownloadTime; //数据下载间隔时间

@ -3,6 +3,7 @@ package com.glxp.api.admin.service.thrsys;
import com.glxp.api.admin.entity.thrsys.ThrInvProductsEntity;
import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
import com.glxp.api.admin.req.thrsys.FilterThrProductsRequest;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -26,4 +27,8 @@ public interface ThrProductsService {
boolean deleteById(String id);
boolean deleteAll();
ThrProductsEntity selectByCode(String code, String thirdSysFk);
List<ThrProductsEntity> batchSelectByIds(List<String> codes, String thirdFk);
}

@ -92,4 +92,19 @@ public class ThrProductsServiceImpl implements ThrProductsService {
public boolean deleteAll() {
return thrProductsDao.deleteAll();
}
@Override
public ThrProductsEntity selectByCode(String code, String thirdSysFk) {
return thrProductsDao.selectByCode(code, thirdSysFk);
}
@Override
public List<ThrProductsEntity> batchSelectByIds(List<String> codes, String thirdFk) {
FilterThrProductsRequest filterThrProductsRequest = new FilterThrProductsRequest();
filterThrProductsRequest.setThirdSysFk(thirdFk);
filterThrProductsRequest.setCodes(codes);
List<ThrProductsEntity> thrProductsEntities = thrProductsDao.batchSelectByIds(filterThrProductsRequest);
return thrProductsEntities;
}
}

@ -1,9 +1,9 @@
# \u672C\u5730\u73AF\u5883
server.port=9991
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.jdbc-url=jdbc:mysql://127.0.0.1:3306/udiwms?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.jdbc-url=jdbc:mysql://192.168.0.66:3360/udiwms?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.username=root
spring.datasource.password=123456
spring.datasource.password=root
#spring.datasource.password=89083fb2fc145533
server.servlet.context-path=
#logging.level.com.glxp.api.admin.dao=debug

@ -1,4 +1,4 @@
spring.profiles.active=pro
spring.profiles.active=test1
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

@ -157,7 +157,7 @@
AND inv_warehouse_user.`code` = #{code}
</if>
<if test="userId != ''and userId != null">
AND inv_warehouse_user.`userId` = #{userId}
AND inv_bustype_user.`userId` = #{userId}
</if>
</where>
group by basic_bussiness_type.action

@ -146,6 +146,7 @@
INNER JOIN inv_warehouse_sub on inv_warehouse_sub.`code` = inv_warehouse_bussiness_type.code
INNER JOIN inv_warehouse on inv_warehouse_sub.parentId = inv_warehouse.`code`
INNER JOIN inv_warehouse_user on inv_warehouse_sub.`code` =inv_warehouse_user.`code`
INNER JOIN inv_bustype_user on inv_warehouse_bussiness_type.action = inv_bustype_user.scAction
<where>
<if test="name != ''and name != null">
AND basic_bussiness_type.name LIKE concat('%',#{name},'%')
@ -172,9 +173,8 @@
<if test="locSubInvCode != ''and locSubInvCode != null">
AND inv_warehouse_sub.`code` =#{locSubInvCode}
</if>
<if test="userId != null">
AND inv_warehouse_user.userId = #{userId}
<if test="userId != ''and userId != null">
AND inv_bustype_user.`userId` = #{userId}
</if>

@ -181,12 +181,15 @@
</if>
<if test="invWarehouseCode != '' and invWarehouseCode!=null">
and invWarehouseCode = #{invWarehouseCode}
and
stock_order.billType in
(select basic_bussiness_type.localAction from inv_bustype_user INNER JOIN basic_bussiness_type on
inv_bustype_user.scAction = basic_bussiness_type.action
WHERE userId =#{userId} and invWarehouseCode =#{invWarehouseCode}
GROUP BY inv_bustype_user.id)
<if test="userId != '' and userId!=null">
and
stock_order.billType in
(select basic_bussiness_type.localAction from inv_bustype_user INNER JOIN basic_bussiness_type on
inv_bustype_user.scAction = basic_bussiness_type.action
WHERE userId =#{userId} and invWarehouseCode =#{invWarehouseCode}
GROUP BY inv_bustype_user.id)
</if>
</if>
<if test="createUser!=null">
and createUser = #{createUser}
@ -317,7 +320,8 @@
select io_codes.code udiCode,basic_udirel.id productId,basic_products.cpmctymc productName,basic_products.ggxh
spec,io_codes.batchNo,io_codes.produceDate productDate,io_codes.expireDate ,io_codes.serialNo,io_codes.count,
basic_products.ylqxzcrbarmc,basic_udirel.manufactory,basic_udirel.measname,basic_products.zczbhhzbapzbh,
inv_warehouse.name locInv, inv_warehouse_sub.name subInv, basic_products.spmc, basic_products.cpms
inv_warehouse.name locInv, inv_warehouse_sub.name subInv, basic_products.spmc,
basic_products.cpms,io_codes.nameCode,io_codes.relId
from io_codes
INNER JOIN basic_udirel on io_codes.relId = basic_udirel.id
INNER JOIN basic_products on basic_products.uuid = basic_udirel.uuid
@ -333,20 +337,17 @@
</select>
<select id="selectSupplementOrderList" resultType="com.glxp.api.admin.entity.business.StockOrderEntity">
SELECT
billNo, orderIdFk, `status`
FROM
stock_order
WHERE
( supplementNo IS NULL OR supplementNo = '' )
SELECT billNo,
orderIdFk,
`status`
FROM stock_order
WHERE (supplementNo IS NULL OR supplementNo = '')
AND billType IN (
SELECT
localAction
FROM
basic_bussiness_type
WHERE
supplementOrderType IS NOT NULL
OR supplementOrderType != '')
SELECT localAction
FROM basic_bussiness_type
WHERE supplementOrderType IS NOT NULL
OR supplementOrderType
!= '')
</select>
<select id="findById" resultType="com.glxp.api.admin.entity.business.StockOrderEntity">
@ -369,17 +370,17 @@
select id
from stock_order
where billNo in (
select erpFk
from io_order
where erpFk in
(select billNo
from stock_order
where stock_order.billType in (select code from basic_third_sys_bus_api))
and exportStatus = 0
)
select erpFk
from io_order
where erpFk in
(select billNo
from stock_order
where stock_order.billType in (select code from basic_third_sys_bus_api))
and exportStatus = 0
)
</select>
<select id="selectIdByOrderIdFk" resultType="java.lang.Integer">
<select id="selectIdByOrderIdFk" resultType="java.lang.Integer">
select id
from stock_order
where orderIdFk = #{orderIdFk}
@ -389,7 +390,8 @@
select t1.* from stock_order t1 left join io_order t2 on t1.billNo = t2.erpFk
<where>
<if test="request.billNo != null and request.billNo != ''">
AND (t2.erpFk like concat('%', #{request.billNo}, '%') or t2.thirdBillNo like concat('%',#{request.billNo},'%'))
AND (t2.erpFk like concat('%', #{request.billNo}, '%') or t2.thirdBillNo like
concat('%',#{request.billNo},'%'))
</if>
<if test="request.submitStatus != null">
AND t2.exportStatus = #{request.submitStatus}
@ -419,6 +421,8 @@
order by t1.billdate desc
</select>
<select id="findBillTypeById" resultType="java.lang.String">
select billType from stock_order where id = #{id}
select billType
from stock_order
where id = #{id}
</select>
</mapper>

@ -278,12 +278,14 @@
</if>
<if test="invWarehouseCode != '' and invWarehouseCode!=null">
and invWarehouseCode =#{invWarehouseCode}
and
io_order.action in
(select basic_bussiness_type.action from inv_bustype_user INNER JOIN basic_bussiness_type on
inv_bustype_user.scAction = basic_bussiness_type.action
WHERE userId =#{userId} and invWarehouseCode =#{invWarehouseCode}
GROUP BY inv_bustype_user.id)
<if test="userId != '' and userId!=null">
and
io_order.action in
(select basic_bussiness_type.action from inv_bustype_user INNER JOIN basic_bussiness_type on
inv_bustype_user.scAction = basic_bussiness_type.action
WHERE userId =#{userId} and invWarehouseCode =#{invWarehouseCode}
GROUP BY inv_bustype_user.id)
</if>
</if>

@ -82,10 +82,10 @@
<if test="supId == null">
AND supId is NULL
</if>
<if test="batchNo != '' and batchNo != null">
<if test="batchNo != '' and batchNo != null and batchNo!='empty'">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
<if test="batchNo == 'empty'">
AND batchNo is NULL
</if>
<if test="invStorageCode != '' and invStorageCode != null">

@ -92,10 +92,10 @@
<if test="supId == null">
AND supId is NULL
</if>
<if test="batchNo != '' and batchNo != null">
<if test="batchNo != '' and batchNo != null and batchNo!='empty'">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
<if test="batchNo == 'empty'">
AND batchNo is NULL
</if>
<if test="invWarehouseCode != '' and invWarehouseCode != null">

@ -80,10 +80,10 @@
<if test="supId == null">
AND supId is NULL
</if>
<if test="batchNo != '' and batchNo != null">
<if test="batchNo != '' and batchNo != null and batchNo!='empty'">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
<if test="batchNo == 'empty'">
AND batchNo is NULL
</if>
<if test="invWarehouseCode != '' and invWarehouseCode != null">

@ -79,7 +79,12 @@
</foreach>
and thirdSysFk = #{thirdSysFk}
</select>
<select id="selectByCode" parameterType="Map" resultType="com.glxp.api.admin.entity.thrsys.ThrProductsEntity">
select *
FROM thr_products
WHERE code = #{code}
and thirdSysFk = #{thirdSysFk}
</select>
<!-- ORDER BY updateTime DESC-->
<select id="selectById" parameterType="Map" resultType="com.glxp.api.admin.entity.thrsys.ThrProductsEntity">

Loading…
Cancel
Save