3/4 thrsys 优化1.0

dev_drug_dm
wangwei 4 months ago
parent 4f684daa94
commit f0330fce94

@ -1,6 +1,7 @@
package com.glxp.api.dao.thrsys;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.thrsys.BasicInsMaterialEntity;
import com.glxp.api.req.thrsys.ThrInsMaterialFeeRequest;
import org.apache.ibatis.annotations.Mapper;
@ -8,6 +9,6 @@ import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface BasicInsMaterialMapper extends BaseMapper<BasicInsMaterialEntity> {
public interface BasicInsMaterialMapper extends BaseMapperPlus<BasicInsMaterialMapper,BasicInsMaterialEntity,BasicInsMaterialEntity> {
List<BasicInsMaterialEntity> filterList(ThrInsMaterialFeeRequest thrInsMaterialFeeRequest);
}

@ -40,11 +40,4 @@ public interface ThrBusTypeOriginDao extends BaseMapperPlus<ThrBusTypeOriginDao,
*/
boolean insertBusOriginType(ThrBusTypeOriginEntity thrBusTypeOriginEntity);
/**
*
*
* @param originAction
* @return
*/
String selectNameByAction(@Param("originAction") String originAction);
}
}

@ -18,12 +18,9 @@ public interface ThrCorpDao extends BaseMapperPlus<ThrCorpDao, ThrCorpEntity, Th
List<ThrCorpsResponse> filterThrCorps(FilterThrCorpRequest filterThrCorpRequest);
boolean insertThrCorps(ThrCorpEntity thrCorpEntity);
boolean insertThrCorpss(@Param("thrCorpEntitys") List<ThrCorpEntity> thrCorpEntitys);
boolean updateThrCorps(ThrCorpEntity thrCorpEntity);
boolean deleteById(@Param("id") String id);
boolean deleteByUnitId(@Param("unitId") String unitId);
@ -36,6 +33,5 @@ public interface ThrCorpDao extends BaseMapperPlus<ThrCorpDao, ThrCorpEntity, Th
ThrSystemDetailEntity selectByKey(@Param("key") String key, @Param("thirdSys") String thirdSys);
boolean insertOrUpdateEntity(ThrCorpEntity thrCorpEntity);
}

@ -11,7 +11,6 @@ import java.util.List;
@Mapper
public interface ThrCorpExportLogDao {
List<ThrCorpExportLogEntity> filterThrCorpExportLog(FilterThrCorpExportLogRequest filterThrCorpExportLogRequest);
boolean insertThrCorpExportLog(ThrCorpExportLogEntity thrCorpExportLogEntity);

@ -12,9 +12,6 @@ import java.util.List;
public interface ThrCorpImportDetailDao {
List<ThrCorpImportDetailEntity> filterCorpDetailImport(FilterThrCorpImportLogRequest filterThrCorpImportLogRequest);
boolean insertCorpDetailImport(ThrCorpImportDetailEntity thrCorpImportDetailEntity);
boolean updateCorpDetailImport(ThrCorpImportDetailEntity thrCorpImportDetailEntity);
boolean insertCorpDetailImports(@Param("corps") List<ThrCorpImportDetailEntity> thrCorpImportDetailEntities);

@ -13,8 +13,6 @@ public interface ThrDeptDao extends BaseMapperPlus<ThrDeptDao, ThrDeptEntity, Th
List<ThrDeptEntity> filterThrInvWarehouse(FilterThrDeptRequest filterThrDeptRequest);
List<ThrDeptEntity> filterThrGroupInvWarehouse(FilterThrDeptRequest filterThrDeptRequest);
boolean insertThrInvWarehouse(ThrDeptEntity thrDeptEntity);
boolean insertInvWarehouses(@Param("thrInvWarehouseEntitys") List<ThrDeptEntity> thrDeptEntities);

@ -15,11 +15,8 @@ public interface ThrInvProductsDao {
ThrInvProductsEntity selectById(@Param("id") String id);
boolean insertThrInvProduct(ThrInvProductsEntity thrInvProductsEntity);
boolean insertThrInvProducts(@Param("thrInvProductsEntities") List<ThrInvProductsEntity> thrInvProductsEntities);
boolean updateThrInvProducts(ThrInvProductsEntity thrInvProductsEntity);
boolean deleteById(@Param("id") String id);

@ -12,10 +12,6 @@ import java.util.List;
public interface ThrInvProductsDetailDao {
List<ThrInvProductsImportDetailEntity> filterInvProductsDetailImport(FilterThrCorpImportLogRequest filterThrCorpImportLogRequest);
boolean insertInvProductsDetailImport(ThrInvProductsImportDetailEntity thrInvProductsImportDetailEntity);
boolean updateInvProductsDetailImport(ThrInvProductsImportDetailEntity thrInvProductsImportDetailEntity);
boolean insertInvProductsDetailImports(@Param("invProducts") List<ThrInvProductsImportDetailEntity> thrInvProductsImportDetailEntities);
boolean deleteById(@Param("id") String id);

@ -21,8 +21,6 @@ public interface ThrInvWarehouseDao extends BaseMapperPlus<ThrInvWarehouseDao,Th
boolean insertThrInvWarehouse(ThrInvWarehouseEntity thrInvWarehouseEntity);
boolean insertThrInvWarehouses(@Param("thrInvWarehouseEntitys") List<ThrInvWarehouseEntity> thrInvWarehouseEntitys);
boolean updateThrInvWarehouse(ThrInvWarehouseEntity thrInvWarehouseEntity);
boolean deleteById(@Param("id") String id);
@ -32,7 +30,5 @@ public interface ThrInvWarehouseDao extends BaseMapperPlus<ThrInvWarehouseDao,Th
*/
int countSubInvByParentInvId(String parentInvId);
List<ThrInvWarehouseResponse> filterThrInvWarehouseResponse(FilterThrSubInvWarehouseRequest filterThrSubInvWarehouseRequest);
boolean insertOrUpdateEntity(ThrInvWarehouseEntity thrInvWarehouseEntity);
}

@ -18,10 +18,6 @@ public interface ThrOrderDao extends BaseMapperPlus<ThrOrderDao, ThrOrderEntity,
boolean insertThrOrder(ThrOrderEntity thrCorpEntity);
boolean importThrOrder(ThrOrderEntity thrCorpEntity);
boolean insertThrOrders(@Param("thrOrderEntities") List<ThrOrderEntity> thrOrderEntities);
boolean deleteById(@Param("id") String id);
boolean deleteAll();

@ -15,13 +15,8 @@ public interface ThrOrderDetailDao extends BaseMapperPlus<ThrOrderDetailDao, Thr
List<ThrOrderDetailEntity> filterThrOrderDetailDetail(FilterThrOrderDetailRequest filterThrOrderDetailRequest);
boolean insertThrOrderDetail(ThrOrderDetailEntity thrOrderDetailEntity);
boolean importThrOrderDetail(ThrOrderDetailEntity thrOrderDetailEntity);
boolean insertThrOrderDetails(@Param("thrOrderDetailEntities") List<ThrOrderDetailEntity> thrOrderDetailEntities);
boolean deleteById(@Param("id") String id);
boolean deleteByOrderIdFk(@Param("orderIdFk") String orderIdFk);

@ -13,10 +13,6 @@ public interface ThrOrderImportDetailDao {
List<ThrOrderImportDetailEntity> filterOrderdDetailImport(FilterThrCorpImportLogRequest filterThrCorpImportLogRequest);
boolean insertOrderdDetailImport(ThrOrderImportDetailEntity thrOrderImportDetailEntity);
boolean updateOrderdDetailImport(ThrOrderImportDetailEntity thrOrderImportDetailEntity);
boolean insertOrderdDetailImports(@Param("orders") List<ThrOrderImportDetailEntity> thrOrderImportDetailEntities);
boolean deleteById(@Param("id") String id);

@ -18,12 +18,8 @@ public interface ThrProductsAddDao extends BaseMapperPlus<ThrProductsAddDao, Thr
List<ThrProductsAddEntity> batchSelectByIds(FilterThrProductsRequest filterThrProductsRequest);
List<ThrProductsAddEntity> selectThrProducts(FilterThrProductsRequest filterThrProductsRequest);
boolean insertThrProducts(ThrProductsAddEntity thrProductsEntity);
boolean insertThrProductss(@Param("thrProductsEntities") List<ThrProductsAddEntity> thrProductsEntities);
boolean updateThrProducts(ThrProductsAddEntity thrProductsEntity);

@ -34,15 +34,11 @@ public interface ThrProductsAddDiDao extends BaseMapperPlus<ThrProductsAddDiDao,
boolean updateDiProduct(ThrProductsAddDiEntity thrProductsAddDiEntity);
UdiInfoResponse getDiProductDetail(@Param("uuid") String uuid);
/**
* ID
*/
ThrProductsAddDiEntity filterThrProductsGetId(@Param("id") Integer id);
ThrProductsAddDiEntity filterThrProductsGetUuid(@Param("uuid") String uuid);
List<ThrProductsAddDiResponse> filterThrProductsDiList(FilterThrProductsRequest filterThrProductsRequest);
List<ThrProductsAddDiEntity> filterThrProductsDiLists(FilterThrProductsRequest filterThrProductsRequest);

@ -18,7 +18,6 @@ import java.util.List;
*/
public interface ThrProductsDao extends BaseMapperPlus<ThrProductsDao, ThrProductsEntity, ThrProductsEntity> {
List<ThrProductsEntity> filterThrProducts(FilterThrProductsRequest filterThrProductsRequest);
List<ThrProductsEntity> filterThrProducts1(FilterThrProductsRequest filterThrProductsRequest);
@ -36,5 +35,4 @@ public interface ThrProductsDao extends BaseMapperPlus<ThrProductsDao, ThrProduc
int insertOrUpdateEntity(ThrProductsEntity record);
ThrProductsEntity filterThrProductsByMainId(@Param("relId") String relId);
String getInternalMaterialCode(@Param("prefix")String prefix);
}

@ -11,15 +11,8 @@ import java.util.List;
@Mapper
public interface ThrProductsImportDetailDao {
List<ThrProductsImportDetailEntity> filterProductsDetailImport(FilterThrProductsImportLogRequest filterThrProductsImportLogRequest);
boolean insertProductsDetailImport(ThrProductsImportDetailEntity thrOrderImportDetailEntity);
boolean updateProductsDetailImport(ThrProductsImportDetailEntity thrOrderImportDetailEntity);
boolean insertProductsDetailImports(@Param("products") List<ThrProductsImportDetailEntity> thrOrderImportDetailEntities);
boolean deleteById(@Param("id") String id);

@ -18,24 +18,8 @@ public interface ThrSystemBusApiDao extends BaseMapperPlus<ThrSystemBusApiDao, T
List<ThrSystemBusApiEntity> filterSysBusApi(FilterBasicThirdSysDetailRequest filterBasicThirdSysDetailRequest);
/**
*
*/
boolean saveBusTypes(@Param("list") List<ThrSystemBusApiEntity> list);
boolean deleteById(@Param("id") Integer id);
ThrSystemBusApiEntity selectByCode(@Param("code") String code);
/**
*
*
* @return
*/
List<String> selectAllCode();
/**
* ID
*/
int countByThirdSysAndType(@Param("thirdSys") String thirdSys, @Param("type") int type);
}

@ -17,10 +17,6 @@ public interface ThrSystemDao {
List<ThrSystemEntity> filterBasicThiSys(FilterBasicThirdSysRequest filterBasicThirdSysRequest);
/**
* ID
*/
List<String> selectEnabledThirdId();
/**
*
@ -32,10 +28,5 @@ public interface ThrSystemDao {
*/
ThrSystemEntity selectByThirdIdAndThirdName(@Param("thirdId") String thirdId, @Param("thirdName") String thirdName);
/**
* ID
*/
String selectThirdNameByThirdId(@Param("thirdId") String thirdId);
int countThirdSys(FilterBasicThirdSysRequest filterBasicThirdSysRequest);
}

@ -18,7 +18,7 @@
</resultMap>
<select id="filterEnableList" resultType="com.glxp.api.res.thrsys.ThrBusTypeOriginResponse">
<select id="filterEnableList" resultType="com.glxp.api.entity.thrsys.ThrBusTypeOriginEntity">
select tbo.*, thr_system.thirdName thirdSysName
from thr_bustype_origin tbo
left join thr_system on tbo.thirdSys = thr_system.thirdId
@ -90,9 +90,4 @@
#{createTime})
</insert>
<select id="selectNameByAction" resultType="java.lang.String">
select name
from thr_bustype_origin
where action = #{originAction}
</select>
</mapper>

@ -25,27 +25,6 @@
ORDER BY updateTime DESC
</select>
<insert id="insertThrCorps" keyProperty="id" parameterType="com.glxp.api.entity.thrsys.ThrCorpEntity">
replace
INTO thr_corp
(unitId, name, spell, addr, creditNo,
contact, mobile, thirdSysFk, updateTime, createUser, createTime, updateUser, remark)
values (#{unitId},
#{name},
#{spell},
#{addr},
#{creditNo},
#{contact},
#{mobile},
#{thirdSysFk},
#{updateTime},
#{createUser},
#{createTime},
#{updateUser},
#{remark})
</insert>
<insert id="insertThrCorpss" keyProperty="id" parameterType="java.util.List">
replace INTO thr_corp
(unitId, name, spell, addr, creditNo,
@ -86,51 +65,6 @@
DELETE
FROM thr_corp
</delete>
<update id="updateThrCorps" parameterType="com.glxp.api.entity.thrsys.ThrCorpEntity">
UPDATE thr_corp
<trim prefix="set" suffixOverrides=",">
<if test="unitId != null">
unitId=#{unitId},
</if>
<if test="name != null">
name=#{name},
</if>
<if test="spell != null">
spell=#{spell},
</if>
<if test="addr != null">
addr=#{addr},
</if>
<if test="creditNo != null">
creditNo=#{creditNo},
</if>
<if test="contact != null">
contact=#{contact},
</if>
<if test="mobile != null">
mobile=#{mobile},
</if>
<if test="thirdSysFk != null">
thirdSysFk=#{thirdSysFk},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="createUser != null">
createUser=#{createUser},
</if>
<if test="createTime != null">
createTime=#{createTime},
</if>
<if test="updateUser != null">
updateUser=#{updateUser},
</if>
<if test="remark != null">
remark=#{remark},
</if>
</trim>
WHERE id = #{id}
</update>
<insert id="importThrCorp" parameterType="com.glxp.api.entity.thrsys.ThrCorpEntity">
replace
@ -250,4 +184,4 @@
remark = #{remark,jdbcType=VARCHAR},
</trim>
</insert>
</mapper>
</mapper>

@ -24,32 +24,6 @@
</select>
<insert id="insertCorpDetailImport" keyProperty="id"
parameterType="com.glxp.api.entity.thrsys.ThrCorpImportDetailEntity">
insert INTO thr_corp_import_detail
(
unitId,name,spell,addr,creditNo,
contact,mobile,thirdSysFk,updateTime ,genKeyFk,createUser,createTime,updateUser,remark
)
values
(
#{unitId},
#{name},
#{spell},
#{addr},
#{creditNo},
#{contact},
#{mobile},
#{thirdSysFk},
#{updateTime},
#{genKeyFk},
#{createUser},
#{createTime},
#{updateUser},
#{remark}
)
</insert>
<insert id="insertCorpDetailImports" keyProperty="id" parameterType="java.util.List">
insert INTO thr_corp_import_detail
(
@ -80,30 +54,9 @@
DELETE FROM thr_corp_import_detail WHERE genKeyFk = #{genKey}
</delete>
<update id="updateCorpDetailImport" parameterType="com.glxp.api.entity.thrsys.ThrCorpImportDetailEntity">
UPDATE thr_corp_import_detail
<trim prefix="set" suffixOverrides=",">
<if test="unitId != null">unitId=#{unitId},</if>
<if test="name != null">name=#{name},</if>
<if test="spell != null">spell=#{spell},</if>
<if test="addr != null">addr=#{addr},</if>
<if test="creditNo != null">creditNo=#{creditNo},</if>
<if test="contact != null">contact=#{contact},</if>
<if test="mobile != null">mobile=#{mobile},</if>
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="genKeyFk != null">genKeyFk=#{genKeyFk},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="createUser != null">createUser=#{createUser},</if>
<if test="createTime != null">createTime=#{createTime},</if>
<if test="updateUser != null">updateUser=#{updateUser},</if>
</trim>
WHERE id = #{id}
</update>
<delete id="deleteByTime">
Delete From thr_corp_import_detail
where date(updateTime) &lt;= date(DATE_SUB(NOW(),INTERVAL 30 day))
</delete>
</mapper>
</mapper>

@ -51,34 +51,6 @@
WHERE id = #{id}
</select>
<select id="filterThrGroupInvWarehouse" parameterType="com.glxp.api.req.thrsys.FilterThrDeptRequest"
resultType="com.glxp.api.entity.thrsys.ThrDeptEntity">
SELECT *
FROM thr_dept
<where>
<if test="id != '' and id != null">
AND id = #{id}
</if>
<if test="pid != '' and pid != null">
AND pid = #{pid}
</if>
<if test="code != '' and code != null">
AND code = #{code}
</if>
<if test="name != '' and name != null">
AND name = #{name}
</if>
<if test="advanceType != '' and advanceType != null">
AND advanceType = #{advanceType}
</if>
<if test="isDefault != '' and isDefault != null">
AND isDefault = #{isDefault}
</if>
<if test="thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk}
</if>
</where>
</select>
<insert id="insertThrInvWarehouse" keyProperty="id"
parameterType="com.glxp.api.entity.thrsys.ThrDeptEntity">
replace
@ -99,21 +71,6 @@
)
</insert>
<insert id="insertThrInvWarehouses" parameterType="java.util.List">
replace INTO thr_dept
(pid, code, name, advanceType, isDefault,
status, updateTime, remark, thirdSysFk)
VALUES
<foreach collection="thrDeptEntities" item="item" index="index"
separator=",">
(#{item.pid}, #{item.code},
#{item.name}, #{item.advanceType}, #{item.isDefault},
#{item.status}, #{item.updateTime},
#{item.remark}, #{item.thirdSysFk})
</foreach>
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM thr_dept

@ -38,25 +38,6 @@
<select id="selectById" parameterType="Map" resultType="com.glxp.api.entity.thrsys.ThrInvProductsEntity">
select * FROM thr_inv_products WHERE id = #{id}
</select>
<insert id="insertThrInvProduct" keyProperty="id"
parameterType="com.glxp.api.entity.thrsys.ThrInvProductsEntity">
replace INTO thr_inv_products
(
inventoryCode,inventoryName,count,spec,
warehouseName,warehouseCode,registerCertNo,manufacturingDate,
expirationDate,thirdSysFk,batchNo,spaceCode,spaceName,updateTime,manufactory,
productDate, expireDate, productName, productId, standard, registerNo, supId, supName,createUser,createTime,updateUser,remark
)
values
(
#{inventoryCode}, #{inventoryName}, #{count}, #{spec},
#{warehouseName}, #{warehouseCode}, #{registerCertNo}, #{manufacturingDate},
#{expirationDate},
#{thirdSysFk},#{batchNo},#{spaceCode},#{spaceName},#{updateTime},#{manufactory},
#{productDate}, #{expireDate}, #{productName}, #{productId}, #{standard},
#{registerNo}, #{supId}, #{supName} #{createUser},#{createTime}, #{updateUser}, #{remark}
)
</insert>
<insert id="insertThrInvProducts" keyProperty="id" parameterType="java.util.List">
replace INTO thr_inv_products
@ -90,38 +71,5 @@
DELETE FROM thr_inv_products
</delete>
<update id="updateThrInvProducts" parameterType="com.glxp.api.entity.thrsys.ThrInvProductsEntity">
UPDATE thr_inv_products
<trim prefix="set" suffixOverrides=",">
<if test="inventoryCode != null">inventoryCode=#{inventoryCode},</if>
<if test="inventoryName != null">inventoryName=#{inventoryName},</if>
<if test="spec != null">spec=#{spec},</if>
<if test="count != null">count=#{count},</if>
<if test="batchNo != null">batchNo=#{batchNo},</if>
<if test="warehouseName != null">warehouseName=#{warehouseName},</if>
<if test="warehouseCode != null">warehouseCode=#{warehouseCode},</if>
<if test="registerCertNo != null">registerCertNo=#{registerCertNo},</if>
<if test="manufacturingDate != null">manufacturingDate=#{manufacturingDate},</if>
<if test="expirationDate != null">expirationDate=#{expirationDate},</if>
<if test="spaceCode != null">spaceCode=#{spaceCode},</if>
<if test="spaceName != null">spaceName=#{spaceName},</if>
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="manufactory != null">manufactory=#{manufactory},</if>
<if test="productDate != null">productDate=#{productDate},</if>
<if test="expireDate != null">expireDate=#{expireDate},</if>
<if test="productName != null">productName=#{productName},</if>
<if test="productId != null">productId=#{productId},</if>
<if test="standard != null">standard=#{standard},</if>
<if test="registerNo != null">registerNo=#{registerNo},</if>
<if test="supId != null">supId=#{supId},</if>
<if test="supName != null">supName=#{supName},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="createUser != null">createUser=#{createUser},</if>
<if test="createTime != null">createTime=#{createTime},</if>
<if test="updateUser != null">updateUser=#{updateUser},</if>
</trim>
WHERE id = #{id}
</update>
</mapper>
</mapper>

@ -23,24 +23,6 @@
</select>
<insert id="insertInvProductsDetailImport" keyProperty="id"
parameterType="com.glxp.api.entity.thrsys.ThrInvProductsImportDetailEntity">
insert INTO thr_inv_products_import_detail
(
inventoryCode,inventoryName,count,spec,
warehouseName,warehouseCode,registerCertNo,manufacturingDate,
expirationDate,thirdSysFk,batchNo,spaceCode,spaceName,updateTime ,genKeyFk,createUser,createTime,updateUser,remark
)
values
(
#{inventoryCode}, #{inventoryName}, #{count}, #{spec},
#{warehouseName}, #{warehouseCode}, #{registerCertNo}, #{manufacturingDate},#{expirationDate},
#{thirdSysFk},#{batchNo},#{spaceCode},#{spaceName},
#{updateTime},#{genKeyFk},#{createUser},#{createTime}, #{updateUser},#{remark},
)
</insert>
<insert id="insertInvProductsDetailImports" keyProperty="id" parameterType="java.util.List">
insert INTO thr_inv_products_import_detail
(
@ -65,30 +47,5 @@
DELETE FROM thr_inv_products_import_detail WHERE genKeyFk = #{genKey}
</delete>
<update id="updateInvProductsDetailImport" parameterType="com.glxp.api.entity.thrsys.ThrInvProductsImportDetailEntity">
UPDATE thr_inv_products_import_detail
<trim prefix="set" suffixOverrides=",">
<if test="inventoryCode != null">inventoryCode=#{inventoryCode},</if>
<if test="inventoryName != null">inventoryName=#{inventoryName},</if>
<if test="spec != null">spec=#{spec},</if>
<if test="count != null">count=#{count},</if>
<if test="batchNo != null">batchNo=#{batchNo},</if>
<if test="warehouseName != null">warehouseName=#{warehouseName},</if>
<if test="warehouseCode != null">warehouseCode=#{warehouseCode},</if>
<if test="registerCertNo != null">registerCertNo=#{registerCertNo},</if>
<if test="manufacturingDate != null">manufacturingDate=#{manufacturingDate},</if>
<if test="expirationDate != null">expirationDate=#{expirationDate},</if>
<if test="spaceCode != null">spaceCode=#{spaceCode},</if>
<if test="spaceName != null">spaceName=#{spaceName},</if>
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="genKeyFk != null">genKeyFk=#{genKeyFk},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="createUser != null">createUser=#{createUser},</if>
<if test="createTime != null">createTime=#{createTime},</if>
<if test="updateUser != null">updateUser=#{updateUser},</if>
</trim>
WHERE id = #{id}
</update>
</mapper>
</mapper>

@ -58,29 +58,6 @@
parentId = (select code from thr_dept where id = #{parentInvId})
</select>
<select id="filterThrInvWarehouseResponse"
resultType="com.glxp.api.res.thrsys.ThrInvWarehouseResponse">
select t1.*, t2.name as parentName from thr_inv_warehouse t1
left join thr_dept t2
on t2.code =t1.parentId
<where>
<if test="id != '' and id != null">
AND t1.id = #{id}
</if>
<if test="code != '' and code != null">
AND t1.code = #{code}
</if>
<if test="name != '' and name != null">
AND t1.`name` = #{name}
</if>
<if test="parentId != '' and parentId != null">
AND t1.parentId = #{parentId}
</if>
<if test="thirdSysFk != null">
and t1.thirdSysFk = #{thirdSysFk}
</if>
</where>
</select>
<insert id="insertThrInvWarehouse" keyProperty="id"
parameterType="com.glxp.api.entity.thrsys.ThrInvWarehouseEntity">
@ -97,18 +74,6 @@
)
</insert>
<insert id="insertThrInvWarehouses" parameterType="java.util.List">
replace INTO thr_inv_warehouse
(id, code, `name`, parentId, remark, thirdSysFk)
VALUES
<foreach collection="thrDeptEntities" item="item" index="index"
separator=",">
(
#{item.id}, #{item.code},
#{item.name}, #{item.parentId},
#{item.remark}, #{item.thirdSysFk})
</foreach>
</insert>
<delete id="deleteById" parameterType="Map">
DELETE

@ -78,75 +78,6 @@
#{remark})
</insert>
<insert id="importThrOrder" keyProperty="id" parameterType="com.glxp.api.entity.thrsys.ThrOrderEntity">
replace
INTO thr_order
(id, billFlag, billNo, billdate, billType, billTypeName, corpId, corpName, inoutType, deptCode,
deptName,
invCode, invName, thirdSysFk, createUser, createTime, updateUser, updateTime, reviewUser, reviewTime,
address,
linkMan, linkTel, remark)
values (#{id},
#{billFlag},
#{billNo},
#{billdate},
#{billType},
#{billTypeName},
#{corpId},
#{corpName},
#{inoutType},
#{deptCode},
#{deptName},
#{invCode},
#{invName},
#{thirdSysFk},
#{createUser},
#{createTime},
#{updateUser},
#{updateTime},
#{reviewUser},
#{reviewTime},
#{address},
#{linkMan},
#{linkTel},
#{remark})
</insert>
<insert id="insertThrOrders" keyProperty="id" parameterType="java.util.List">
replace INTO thr_order
(billFlag, billNo, billdate, billType, billTypeName, corpId, corpName, inoutType, deptCode, deptName,
invCode, invName, thirdSysFk, createUser, createTime, updateUser, updateTime, reviewUser, reviewTime,
address,
linkMan, linkTel, remark)
values
<foreach collection="thrOrderEntities" item="item" index="index"
separator=",">
(#{item.billFlag},
#{item.billNo},
#{item.billdate},
#{item.billType},
#{item.billTypeName},
#{item.corpId},
#{item.corpName},
#{item.inoutType},
#{item.deptCode},
#{item.deptName},
#{item.invCode},
#{item.invName},
#{item.thirdSysFk},
#{item.createUser},
#{item.createTime},
#{item.updateUser},
#{item.updateTime},
#{item.reviewUser},
#{item.reviewTime},
#{item.address},
#{item.linkMan},
#{item.linkTel},
#{item.remark})
</foreach>
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM thr_order

@ -16,71 +16,6 @@
</where>
</select>
<insert id="insertThrOrderDetail" keyProperty="id"
parameterType="com.glxp.api.entity.thrsys.ThrOrderDetailEntity">
replace
INTO thr_order_detail
(productId, productName, spec, batchNo, expireDate, productDate, count, reCount, orderIdFk, thirdSysFk, supId,
supName, price, corpName, ylqxzcrbarmc, zczbhhzbapzbh, manufactory, createUser, createTime, updateUser,
updateTime, remark)
values (#{productId},
#{productName},
#{spec},
#{batchNo},
#{expireDate},
#{productDate},
#{count},
#{reCount},
#{orderIdFk},
#{thirdSysFk},
#{supId},
#{supName},
#{price},
#{corpName},
#{ylqxzcrbarmc},
#{zczbhhzbapzbh},
#{manufactory},
#{createUser},
#{createTime},
#{updateUser},
#{updateTime},
#{remark})
</insert>
<insert id="importThrOrderDetail" keyProperty="id"
parameterType="com.glxp.api.entity.thrsys.ThrOrderDetailEntity">
replace
INTO thr_order_detail
(id, productId, productName, spec, batchNo, expireDate, productDate, count, reCount, orderIdFk, thirdSysFk,
supId,
supName, price, corpName, ylqxzcrbarmc, zczbhhzbapzbh, manufactory, createUser, createTime, updateUser,
updateTime, remark)
values (#{id},
#{productId},
#{productName},
#{spec},
#{batchNo},
#{expireDate},
#{productDate},
#{count},
#{reCount},
#{orderIdFk},
#{thirdSysFk},
#{supId},
#{supName},
#{price},
#{corpName},
#{ylqxzcrbarmc},
#{zczbhhzbapzbh},
#{manufactory},
#{createUser},
#{createTime},
#{updateUser},
#{updateTime},
#{remark})
</insert>
<insert id="insertThrOrderDetails" keyProperty="id" parameterType="java.util.List" useGeneratedKeys="true">
replace INTO thr_order_detail
(productId, productName, spec, batchNo, expireDate, productDate, count, reCount, orderIdFk, thirdSysFk,

@ -23,21 +23,6 @@
</select>
<insert id="insertOrderdDetailImport" keyProperty="id"
parameterType="com.glxp.api.entity.thrsys.ThrOrderImportDetailEntity">
insert INTO thr_order_import_detail
(
billNo,billdate,corpId,corpName,billType,billFlag,productId,productName,spec,batchNo,expireDate,
productDate,count,reCount,status,updateTime,remark,genKeyFk,thirdSysFk,originType
)
values
(
#{billNo},#{billdate},#{corpId},#{corpName},#{billType},#{billFlag},#{productId},#{productName},#{spec},
#{batchNo},#{expireDate},#{productDate},#{count},#{reCount},#{status},#{updateTime},#{remark},#{genKeyFk},#{thirdSysFk},#{originType}
)
</insert>
<insert id="insertOrderdDetailImports" keyProperty="id" parameterType="java.util.List">
insert INTO thr_order_import_detail
(
@ -61,39 +46,9 @@
DELETE FROM thr_order_import_detail WHERE genKeyFk = #{genKey}
</delete>
<update id="updateOrderdDetailImport" parameterType="com.glxp.api.entity.thrsys.ThrOrderImportDetailEntity">
UPDATE thr_order_import_detail
<trim prefix="set" suffixOverrides=",">
<if test="billNo != null">billNo=#{billNo},</if>
<if test="billdate != null">billdate=#{billdate},</if>
<if test="corpId != null">corpId=#{corpId},</if>
<if test="corpName != null">corpName=#{corpName},</if>
<if test="billType != null">billType=#{billType},</if>
<if test="billFlag != null">billFlag=#{billFlag},</if>
<if test="productId != null">productId=#{productId},</if>
<if test="productName != null">productName=#{productName},</if>
<if test="spec != null">spec=#{spec},</if>
<if test="expireDate != null">expireDate=#{expireDate},</if>
<if test="batchNo != null">batchNo=#{batchNo},</if>
<if test="productDate != null">productDate=#{productDate},</if>
<if test="count != null">count=#{count},</if>
<if test="reCount != null">reCount=#{reCount},</if>
<if test="status != null">status=#{status},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="genKeyFk != null">genKeyFk=#{genKeyFk},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
<if test="originType != null">originType=#{originType},</if>
</trim>
WHERE id = #{id}
</update>
<delete id="deleteByTime">
Delete From thr_order_import_detail
where date(updateTime) &lt;= date(DATE_SUB(NOW(),INTERVAL 30 day))
</delete>
</mapper>
</mapper>

@ -55,38 +55,6 @@
ORDER BY updateTime DESC
</select>
<select id="selectThrProducts" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
resultType="com.glxp.api.entity.thrsys.ThrProductsAddEntity">
SELECT * FROM thr_products_add
<where>
<if test="name != '' and name != null">
AND name =#{name}
</if>
<if test="code != '' and code != null">
AND code =#{code}
</if>
<if test="registerNo != '' and registerNo != null">
AND registerNo=#{registerNo}
</if>
<if test="manufactory != '' and manufactory != null">
AND manufactory=#{manufactory}
</if>
<if test="thirdSysFk != '' and thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk}
</if>
<if test="checkStatus != '' and checkStatus != null">
AND checkStatus = #{checkStatus}
</if>
<if test="customerId != '' and customerId != null">
AND customerId = #{customerId}
</if>
</where>
ORDER BY updateTime DESC
</select>
<select id="batchSelectByIds" resultType="com.glxp.api.entity.thrsys.ThrProductsAddEntity">
select *
from thr_products_add where code in
@ -132,32 +100,6 @@
)
</insert>
<insert id="insertThrProductss" keyProperty="id" parameterType="java.util.List">
replace INTO thr_products_add
(
code,name,measname,spec,registerNo,manufactory,
cplb,flbm,qxlb,ybbm,sptm,tyshxydm,zczbhhzbapzbh,ylqxzcrbarmc,ylqxzcrbarywmc,cpms,
thirdSysFk,updateTime,supName,checkStatus,customerId,relId
)
values
<foreach collection="thrProductsEntities" item="item" index="index"
separator=",">
(
#{item.code},
#{item.name},
#{item.measname},
#{item.spec},
#{item.registerNo},
#{item.manufactory},
#{item.cplb}, #{item.flbm}, #{item.qxlb}, #{item.ybbm},#{item.sptm},
#{item.tyshxydm}, #{item.zczbhhzbapzbh}, #{item.ylqxzcrbarmc}, #{item.ylqxzcrbarywmc},#{item.cpms},
#{item.thirdSysFk},#{item.updateTime},#{item.supName}, #{tem.checkStatus}, #{tem.customerId},#{item.relId}
)
</foreach>
</insert>
<update id="updateThrProducts" parameterType="com.glxp.api.entity.thrsys.ThrProductsAddEntity">
UPDATE thr_products_add
<trim prefix="set" suffixOverrides=",">

@ -169,15 +169,6 @@
where id = #{id}
</select>
<select id="filterThrProductsGetUuid" parameterType="string"
resultType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity">
select *
from thr_products_add_di
where uuid = #{uuid}
limit 1
</select>
<select id="filterThrProductsList" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
resultType="com.glxp.api.res.thrsys.ThrProductsAddDiResponse">
SELECT tdi.*,

@ -23,45 +23,6 @@
</select>
<insert id="insertProductsDetailImport" keyProperty="id"
parameterType="com.glxp.api.entity.thrsys.ThrProductsImportDetailEntity">
insert INTO thr_products_import_detail
(code, name, measname, spec, registerNo, manufactory,
cplb, flbm, qxlb, ybbm, sptm, tyshxydm, zczbhhzbapzbh, ylqxzcrbarmc, ylqxzcrbarywmc, cpms,
thirdSysFk, updateTime, genKeyFk, supName, price)
values (#{code},
#{name},
#{measname},
#{spec},
#{registerNo},
#{manufactory},
#{cplb}, #{flbm}, #{qxlb}, #{ybbm}, #{sptm},
#{tyshxydm}, #{zczbhhzbapzbh}, #{ylqxzcrbarmc}, #{ylqxzcrbarywmc}, #{cpms}
#{thirdSysFk}, #{updateTime}, #{genKeyFk}, #{supName}, #{price})
</insert>
<insert id="insertProductsDetailImports" keyProperty="id" parameterType="java.util.List">
insert INTO thr_products_import_detail
(
code,name,measname,spec,registerNo,manufactory,
cplb,flbm,qxlb,ybbm,sptm,tyshxydm,zczbhhzbapzbh,ylqxzcrbarmc,ylqxzcrbarywmc,cpms,
thirdSysFk ,updateTime ,genKeyFk,supName,price )
values
<foreach collection="products" item="item" index="index"
separator=",">
(
#{item.code},
#{item.name},
#{item.measname},
#{item.spec},
#{item.registerNo},
#{item.manufactory},
#{item.cplb}, #{item.flbm}, #{item.qxlb}, #{item.ybbm},#{item.sptm},
#{item.tyshxydm}, #{item.zczbhhzbapzbh}, #{item.ylqxzcrbarmc}, #{item.ylqxzcrbarywmc},#{item.cpms},
#{item.thirdSysFk} ,#{item.updateTime},#{item.genKeyFk} ,#{item.supName} ,#{item.price} )
</foreach>
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM thr_products_import_detail
@ -73,38 +34,9 @@
WHERE genKeyFk = #{genKey}
</delete>
<update id="updateProductsDetailImport"
parameterType="com.glxp.api.entity.thrsys.ThrProductsImportDetailEntity">
UPDATE thr_products_import_detail
<trim prefix="set" suffixOverrides=",">
<if test="code != null">code=#{code},</if>
<if test="name != null">name=#{name},</if>
<if test="measname != null">measname=#{measname},</if>
<if test="spec != null">spec=#{spec},</if>
<if test="registerNo != null">registerNo=#{registerNo},</if>
<if test="cplb != null">cplb=#{cplb},</if>
<if test="flbm != null">flbm=#{flbm},</if>
<if test="qxlb != null">qxlb=#{qxlb},</if>
<if test="ybbm != null">ybbm=#{ybbm},</if>
<if test="sptm != null">sptm=#{sptm},</if>
<if test="tyshxydm != null">tyshxydm=#{tyshxydm},</if>
<if test="zczbhhzbapzbh != null">zczbhhzbapzbh=#{zczbhhzbapzbh},</if>
<if test="ylqxzcrbarmc != null">ylqxzcrbarmc=#{ylqxzcrbarmc},</if>
<if test="ylqxzcrbarywmc != null">ylqxzcrbarywmc=#{ylqxzcrbarywmc},</if>
<if test="manufactory != null">manufactory=#{manufactory},</if>
<if test="cpms != null">cpms=#{cpms},</if>
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="genKeyFk != null">genKeyFk=#{genKeyFk},</if>
<if test="supName != null">supName=#{supName},</if>
</trim>
WHERE id = #{id}
</update>
<delete id="deleteByTime">
Delete From thr_products_import_detail
where date(updateTime) &lt;= date(DATE_SUB(NOW(),INTERVAL 30 day))
</delete>
</mapper>
</mapper>

@ -67,17 +67,6 @@
#{remark})
</insert>
<insert id="saveBusTypes">
insert into thr_system_bus_api (code, `name`, thirdBuyCode, thirdSys, type)
values
<foreach collection="list" index="index" item="item" separator=",">
(#{item.code},
#{item.name},
#{item.thirdBuyCode},
#{item.thirdSys},
#{item.type})
</foreach>
</insert>
<delete id="deleteById">
delete
@ -90,15 +79,4 @@
where code = #{code}
</select>
<select id="selectAllCode" resultType="java.lang.String">
select code
from thr_system_bus_api
</select>
<select id="countByThirdSysAndType" resultType="int">
select count(*)
from thr_system_bus_api
where thirdSys = #{thirdSys}
and type = #{type}
</select>
</mapper>

@ -43,11 +43,6 @@
FROM thr_system
WHERE thirdId = #{thirdId}
</select>
<select id="selectEnabledThirdId" resultType="java.lang.String">
select thirdId
from thr_system
where enabled = true
</select>
<select id="selectCountByThirdName" resultType="java.lang.Integer">
select count(*)
from thr_system
@ -59,11 +54,6 @@
where thirdId = #{thirdId}
and thirdName = #{thirdName}
</select>
<select id="selectThirdNameByThirdId" resultType="java.lang.String">
select thirdName
from thr_system
where thirdId = #{thirdId}
</select>
<select id="countThirdSys" resultType="java.lang.Integer">
select count(*) from thr_system
@ -73,4 +63,4 @@
</if>
</where>
</select>
</mapper>
</mapper>

Loading…
Cancel
Save