3/7 优化代码1.0

dev_2.5_ocean
wangwei 4 months ago
parent 9cb19e8667
commit 828704f29b

@ -87,7 +87,4 @@ public interface AuthAdminDao extends BaseMapperPlus<AuthAdminDao, AuthAdmin, Au
List<AuthAdmin> companyUserList(@Param("param")FilterInvLinkDataRequest filterInvLinkDataRequest);
List<AuthAdmin> getUserByIds(@Param("userIds") List<Long> ids,@Param("key") String key);
List<AuthAdmin> getDepts(FilterAuthUserRequest filterAuthUserRequest);
}

@ -32,36 +32,10 @@ public interface DeptDao extends BaseMapperPlus<DeptDao, DeptEntity, DeptEntity>
Long getIdByCode(@Param("fromCorpId") Long fromCorpId);
/**
*
*
* @param invWarehouseEntities
*/
void importInvWarehouse(@Param("invWarehouseEntities") List<DeptEntity> invWarehouseEntities);
/**
* ID
*
* @param id
* @param thridWarehouseId
* @param sysId
* @return
*/
boolean updateThridId(@Param("id") String id, @Param("thridWarehouseId") String thridWarehouseId, @Param("sysId") String sysId);
boolean updateTime(@Param("code") String code, @Param("updateTime") Date updateTime);
List<DeptEntity> getDeptById(@Param("ids") List<Integer> ids);
List<DeptEntity> selectByPcode(@Param("pcode") String pcode);
/**
* code*
*/
DeptEntity selectByCodeAll(@Param("code") String code);
/**
*
*

@ -25,8 +25,6 @@ public interface DeptUserDao extends BaseMapperPlus<DeptUserDao, DeptUserEntity,
boolean deleteByUser(@Param("userId") Long userId);
int deleteByList(@Param("ids") List<Integer> ids);
int insertBatch(List<DeptUserEntity> list);

@ -17,8 +17,6 @@ public interface SysPdaKeyDao {
void updateDeviceKey(SysPdaKeyEntity sysPdaKeyEntity);
void updateDeviceKeyByImei(SysPdaKeyEntity sysPdaKeyEntity);
void deleteDeviceKey(DeleteRequest deleteRequest);
}

@ -12,7 +12,6 @@ import java.util.List;
@Mapper
public interface WarehouseBussinessTypeDao extends BaseMapperPlus<WarehouseBussinessTypeDao, WarehouseBussinessTypeEntity, WarehouseBussinessTypeEntity> {
int deleteByPrimaryKey(Integer id);
List<WarehouseBussinessTypeEntity> selectListByCode(@Param("code") String code);

@ -18,33 +18,16 @@ public interface WarehouseUserDao extends BaseMapperPlus<WarehouseUserDao, Wareh
int insertEntity(WarehouseUserEntity record);
WarehouseUserEntity selectByPrimaryKey(Long id);
List<WarehouseUserEntity> selectListByCode(@Param("code") String code);
List<WarehouseUserEntity> selectListkey(FilterInvLinkDataRequest filterInvLinkDataRequest);
List<WarehouseUserEntity> selectNotSelectUserid(@Param("userIds") List<Long> userIds);
List<String> selectCodeByUser(@Param("userId") String userId);
void deleteByCode(@Param("code") String code);
/**
*
*
* @param code
* @param isDirector
*/
void updateDirector(@Param("code") String code, @Param("isDirector") int isDirector);
/**
* id
*
* @param id
* @param isDirector
*/
void updateDirectorById(@Param("id") Long id, @Param("isDirector") int isDirector);
/**
*

@ -15,7 +15,6 @@ public interface BasicCorpDao extends BaseMapperPlus<BasicCorpDao, BasicCorpEnti
List<BasicCorpEntity> filterList(BasicUnitMaintainFilterRequest basicUnitMaintainFilterRequest);
List<BasicCorpEntity> filterList2(BasicUnitMaintainFilterRequest basicUnitMaintainFilterRequest);
boolean insertBasicUnitMaintain(BasicCorpEntity basicUnitMaintainEntity);
boolean insertThrUnitMaintainignore(BasicCorpEntity thrUnitMaintainResponse);
@ -27,10 +26,6 @@ public interface BasicCorpDao extends BaseMapperPlus<BasicCorpDao, BasicCorpEnti
boolean deleteById(@Param("id") String id);
List<BasicCorpEntity> batchSelectByIds(@Param("ids") List<Integer> id);
List<BasicCorpEntity> batchSelectByErpIds(@Param("erpIds") List<String> erpIds);
BasicCorpEntity selectByName(@Param("name") String name);

@ -17,7 +17,6 @@ public interface BasicProductsImportDetailDao {
boolean updateUdiInfoImport(BasicProductsImportDetailEntity udiInfoImportEntity);
boolean insertUdiInfoImports(@Param("udiInfos") List<BasicProductsImportDetailEntity> udiInfos);
boolean deleteById(@Param("id") String id);

@ -18,6 +18,5 @@ public interface CompanyProductRelevanceDao extends BaseMapperPlus<CompanyProduc
boolean deleteById(String id);
boolean deleteByRlId(String id);
}

@ -21,7 +21,6 @@ public interface EntrustReceDao extends BaseMapperPlus<EntrustReceDao, EntrustRe
EntrustReceEntity findByUnique(@Param("action") String action, @Param("entrustUser") Long entrustUser);
boolean insertEntrustRec(EntrustReceEntity ioOrderStatusEntity);
boolean deleteById(String id);

@ -16,16 +16,6 @@ public interface ProductInfoDao extends BaseMapperPlus<ProductInfoDao,ProductInf
List<ProductInfoEntity> filterProductGroup(ProductInfoFilterRequest productInfoFilterRequest);
List<ProductInfoEntity> filterCpmctymc(ProductInfoFilterRequest productInfoFilterRequest);
List<ProductInfoEntity> filterUdiByTyshxydm(ProductInfoFilterRequest productInfoFilterRequest);
List<ProductInfoEntity> filterUdiByCreditNo(ProductInfoFilterRequest productInfoFilterRequest);
List<ProductInfoEntity> filterUdiByNewest(ProductInfoFilterRequest productInfoFilterRequest);
List<ProductInfoEntity> selectByUpdateTime(@Param("startDate") String startDate, @Param("endDate") String endDate);//按更新时间查询
boolean insertProductInfo(ProductInfoEntity productInfoEntity);
boolean insertProductInfos(@Param("datas") List<ProductInfoEntity> productInfoEntity);
@ -34,16 +24,8 @@ public interface ProductInfoDao extends BaseMapperPlus<ProductInfoDao,ProductInf
boolean deleteAll(@Param("ids") List<String> ids);
boolean updateProductInfo(ProductInfoEntity productInfoEntity);
boolean updateProductByUuid(ProductInfoEntity productInfoEntity);
List<ProductInfoEntity> selectByUuid(@Param("uuid") String uuid);
List<ProductInfoEntity> filterUdi(ProductInfoFilterRequest productInfoFilterRequest);
List<ProductInfoEntity> filterUdiNoPage(ProductInfoFilterRequest productInfoFilterRequest);
Long filterUdiNoPageCount(ProductInfoFilterRequest productInfoFilterRequest);
@ -51,9 +33,6 @@ public interface ProductInfoDao extends BaseMapperPlus<ProductInfoDao,ProductInf
List<ProductInfoEntity> syncDlUdi(ProductInfoFilterRequest productInfoFilterRequest);
List<String> filterUuidByCreditNo(ProductInfoFilterRequest productInfoFilterRequest);
List<ProductInfoEntity> selectAllByUuid(@Param("ids") List<String> ids);
}

@ -18,8 +18,6 @@ public interface SysWorkplaceQueueMapper extends BaseMapper<SysWorkplaceQueue> {
List<SysWorkplaceQueueResponse> filterList(SysWorkplaceQueueRequest request);
List<SysWorkplaceQueueResponse> filterBindList(SysWorkplaceQueueRequest request);
Integer selectMaxGrid(@Param("freightCode") String freightCode,@Param("layer") Integer layer);
String selectMaxCode(String layerCode);
SysWorkplaceQueue selectByLayerCode(String layerCode);

@ -10,20 +10,14 @@ import java.util.List;
@Mapper
public interface UdiCompanyDao {
List<UdiCompanyEntity> selectAllTyshxyh();
List<UdiCompanyEntity> filterUdiCompany(UdiCompanyRequest udiCompanyRequest);
boolean insertUdiCompany(UdiCompanyEntity udiCompanyEntity);
boolean insertUdiCompanys(@Param("udiCompanyEntities") List<UdiCompanyEntity> udiCompanyEntities);
boolean deleteById(@Param("id") String id);
boolean deleteAll(@Param("ids") List<String> ids);
boolean updateUdiCompany(UdiCompanyEntity udiCompanyEntity);
List<UdiCompanyEntity> syncDlCompany(UdiCompanyRequest udiCompanyRequest);
}

@ -55,8 +55,6 @@ public interface UdiProductDao extends BaseMapperPlus<UdiProductDao, UdiProductE
List<UdiProductEntity> batchSelectByUuid(@Param("uuids") List<String> uuids);
List<UdiRelevanceResponse> filterUdiInfo2(FilterUdiRelRequest filterUdiRelRequest);
UdiRelevanceResponse filterUdiInfoById(String id);
/**

@ -35,17 +35,14 @@ public interface UdiRelevanceDao extends BaseMapperPlus<UdiRelevanceDao, UdiRele
List<UdiRelevanceResponse> contrastJoinSelect(FilterUdiRelRequest filterUdiRelRequest);
UdiRelevanceEntity selectById(@Param("id") Long id);
UdiRelevanceEntity selectByThirdId(FilterUdiRelRequest filterUdiRelRequest);
List<UdiRelevanceEntity> filterEntity(FilterUdiRelRequest filterUdiRelRequest);
boolean insertUdiRelevance(UdiRelevanceEntity udiRelevanceEntity);
boolean insertUdiRelevanceignore(UdiRelevanceEntity udiRelevanceEntity);
boolean updateUdiRelevance(UdiRelevanceEntity udiRelevanceEntity);
@ -53,8 +50,6 @@ public interface UdiRelevanceDao extends BaseMapperPlus<UdiRelevanceDao, UdiRele
boolean deleteByIds(@Param("ids") List<String> id);
boolean deleteByUuid(@Param("uuid") String uuid);
/**
* UUID
*
@ -66,15 +61,6 @@ public interface UdiRelevanceDao extends BaseMapperPlus<UdiRelevanceDao, UdiRele
List<UdiRelevanceEntity> batchSelectByIds(@Param("ids") List<String> ids);
/**
* /**
* UUID
*
* @param relId
* @return
*/
String selectUuidById(@Param("relId") String relId);
List<UdiRelevanceResponse> selectGroupByNameCode(@Param("nameCode") String nameCode, @Param("isDisable") Boolean isDisable);
@ -104,13 +90,6 @@ public interface UdiRelevanceDao extends BaseMapperPlus<UdiRelevanceDao, UdiRele
*/
Long selectProductByRelCode(@Param("relCode") String relCode);
/**
* DIid
*
* @param nameCode
* @return
*/
String selectRelIdByNameCode(@Param("nameCode") String nameCode);
/**
*

@ -20,8 +20,6 @@ public interface UdiRlSupDao extends BaseMapperPlus<UdiRlSupDao, CompanyProductR
UdiRlSupEntity findCompanyProductRelevance(String CustomerId);
UdiRlSupEntity findCompanyProductRelevanceByProductId(String productId);
UdiRlSupEntity findCompanyProductRelevanceByUdiRlIdFk(@Param("udiRlIdFk") String udiRlIdFk, @Param("customerId") String customerId);
UdiRlSupEntity findCompanyProductRelevanceByProductUuid(UdiRlSupEntity udiRlSupEntity);
@ -35,14 +33,4 @@ public interface UdiRlSupDao extends BaseMapperPlus<UdiRlSupDao, CompanyProductR
boolean deleteById(String id);
boolean deleteByRlId(String id);
/**
*
*
* @param companyProductRelevanceRequest
* @return
*/
Long selectSupRlCount(CompanyProductRelevanceRequest companyProductRelevanceRequest);
}

@ -206,26 +206,6 @@
</where>
</select>
<select id="getUserByIds" resultType="com.glxp.api.entity.auth.AuthAdmin">
select *
from auth_user
<where>
userFlag != 0
<if test="key != null and key != ''">
AND (auth_user.userName like concat('%', #{key}, '%')
or auth_user.employeeName like concat('%', #{key}, '%')
)
</if>
<if test="userIds != null and userIds.size() != 0">
and auth_user.id in
<foreach collection="userIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="selectAllocatedList" parameterType="com.glxp.api.req.auth.FilterAuthUserRequest"
resultType="com.glxp.api.entity.auth.AuthAdmin">
select u.*
@ -279,50 +259,5 @@
</where>
order by u.createTime desc
</select>
<select id="getDepts" resultType="com.glxp.api.entity.auth.AuthAdmin">
SELECT auth_user.*, auth_dept.name deptName
FROM auth_dept_user adu
left join auth_user on adu.userId = auth_user.id
left join auth_dept on adu.deptId = auth_dept.id
<where>
<if test="ids != null and ids.size > 0">
AND auth_user.id IN
<foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</if>
<if test="userFlag != null">
AND auth_user.userFlag = #{userFlag}
</if>
<if test="userName != null and '' != userName">
AND auth_user.userName LIKE CONCAT('%', #{userName}, '%')
</if>
<if test="neUserName != null and '' != neUserName">
AND auth_user.userName != #{neUserName}
</if>
<if test="invCode != null and '' != invCode">
AND auth_user.locInvCode = #{invCode}
</if>
<if test="deptName != null and '' != deptName">
AND auth_dept.name LIKE CONCAT('%', #{deptName}, '%')
</if>
<if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[
and DATE_FORMAT(auth_user.lastModifyTime
, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}
, '%Y-%m-%d %H:%i:%S')
]]>
</if>
<if test="userKey != null and userKey != ''">
AND (auth_user.userName like concat('%', #{userKey}, '%')
or auth_user.employeeName like concat('%', #{userKey}, '%')
)
</if>
<if test="deptCode != null and deptCode != ''">
AND auth_user.locDeptCode = #{deptCode}
</if>
</where>
ORDER BY auth_user.id DESC
</select>
</mapper>

@ -276,38 +276,17 @@
</foreach>
</insert>
<update id="updateThridId" parameterType="Map">
update auth_dept
set ${sysId} = #{thridWarehouseId,jdbcType=VARCHAR}
where id = #{id}
</update>
<update id="updateTime" parameterType="Map">
update auth_dept
SET updateTime = #{updateTime}
where code = #{code}
</update>
<select id="getDeptById" resultType="com.glxp.api.entity.auth.DeptEntity" >
select *
from auth_dept
where id in
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="selectByPcode" resultType="com.glxp.api.entity.auth.DeptEntity">
select * from auth_dept where pcode = #{pcode}
</select>
<select id="selectByCodeAll" resultType="com.glxp.api.entity.auth.DeptEntity">
select *
from auth_dept
where code = #{code}
</select>
<select id="selectNameByCode" resultType="java.lang.String">
select name from auth_dept where code = #{code}

@ -87,17 +87,6 @@
and deptId = #{deptId}
</delete>
<delete id="deleteByList" parameterType="java.util.List"
>
delete
from auth_dept_user
where deptId in
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<insert id="insertBatch" parameterType="java.util.List">
replace INTO auth_dept_user
(deptId, userId)

@ -13,12 +13,6 @@
<!--@mbg.generated-->
id, code, `action`, `name`
</sql>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete
from auth_warehouse_bustype
where id = #{id,jdbcType=INTEGER}
</delete>
<select id="selectListByCode" parameterType="java.lang.String" resultMap="BaseResultMap">

@ -19,25 +19,6 @@
isDirector,
locSubInvCode
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List"/>
from auth_warehouse_user
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectNotSelectUserid" resultMap="BaseResultMap">
select *
from auth_warehouse_user
<where>
<if test="userIds != null and userIds.size() != 0">
and id in
<foreach collection="userIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<delete id="deleteByCodeAndId">
<!--@mbg.generated-->
delete
@ -122,15 +103,4 @@
where code = #{code}
</delete>
<update id="updateDirector">
update auth_warehouse_user
set isDirector = #{isDirector}
where code = #{code}
</update>
<update id="updateDirectorById">
update auth_warehouse_user
set isDirector = #{isDirector}
where id = #{id}
</update>
</mapper>

@ -106,41 +106,6 @@
limit 1
</select>
<insert id="insertBasicUnitMaintain" keyProperty="id"
parameterType="com.glxp.api.entity.basic.BasicCorpEntity">
REPLACE
INTO basic_corp
(thirdId, erpId, name, spell,
addr, status, type, creditNo, contact, mobile, thirdId1, thirdId2, thirdId3, thirdId4,
thirdName, thirdName1, thirdName2, thirdName3, thirdName4, updateTime, corpType, outType, createUser,
createTime, updateUser, remark)
values (#{thirdId},
#{erpId},
#{name},
#{spell},
#{addr},
#{status},
#{type},
#{creditNo},
#{contact},
#{mobile},
#{thirdId1},
#{thirdId2},
#{thirdId3},
#{thirdId4},
#{thirdName},
#{thirdName1},
#{thirdName2},
#{thirdName3},
#{thirdName4},
#{updateTime},
#{corpType},
#{outType},
#{createUser},
#{createTime},
#{updateUser},
#{remark})
</insert>
<insert id="insertThrUnitMaintainignore"
parameterType="com.glxp.api.entity.basic.BasicCorpEntity">
@ -271,24 +236,6 @@
WHERE id = #{id}
</delete>
<select id="batchSelectByIds" resultType="com.glxp.api.entity.basic.BasicCorpEntity">
select *
from basic_corp where id in
<foreach collection="ids" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</select>
<select id="batchSelectByErpIds" resultType="com.glxp.api.entity.basic.BasicCorpEntity">
select *
from basic_corp where erpId in
<foreach collection="erpIds" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</select>
<select id="selectByName" parameterType="java.lang.String"
resultType="com.glxp.api.entity.basic.BasicCorpEntity">
SELECT *

@ -38,21 +38,6 @@
)
</insert>
<insert id="insertUdiInfoImports" keyProperty="id" parameterType="java.util.List">
insert INTO basic_products_import_detail
(udiCode,ybbm,sptm,thirdId1,thirdId2,
thirdId3,thirdId4,thirdId,status,updateTime,remark,genKeyFk,isUseDy)
values
<foreach collection="udiInfos" item="item" index="index"
separator=",">
(
#{item.udiCode}, #{item.ybbm},#{item.sptm},
#{item.thirdId1}, #{item.thirdId2},#{item.thirdId3},
#{item.thirdId4}, #{item.thirdId},#{item.status},
#{item.updateTime},#{item.remark}, #{item.genKeyFk},#{item.isUseDy}
)
</foreach>
</insert>
<delete id="deleteById" parameterType="Map">
DELETE FROM basic_products_import_detail WHERE id = #{id}
</delete>
@ -79,4 +64,4 @@
WHERE id = #{id}
</update>
</mapper>
</mapper>

@ -20,8 +20,6 @@
#{unitFk}, #{price})
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM company_product_relevance
@ -29,12 +27,6 @@
</delete>
<delete id="deleteByRlId" parameterType="Map">
DELETE
FROM company_product_relevance
WHERE udiRlIdFk = #{id}
</delete>
<select id="filterUdiGp" parameterType="com.glxp.api.req.basic.CompanyProductRelevanceRequest"
resultType="com.glxp.api.res.basic.CompanyProductRelevanceResponse">
SELECT company_product_relevance.id,

@ -130,28 +130,6 @@
order by updateTime desc
</select>
<insert id="insertEntrustRec" keyProperty="id"
parameterType="com.glxp.api.entity.basic.EntrustReceEntity">
replace
INTO basic_entrust_accept(`action`, curDept, entrustInv, `entrustUser`, userId,
updateTime, remark, entrustAction, finishRece, curInv, entrustDept, entrustInv,
entrustEnd)
values (#{action},
#{entrustInv},
#{entrustUser},
#{userId},
#{updateTime},
#{remark},
#{entrustAction},
#{finishRece},
#{curInv},
#{entrustDept},
#{entrustInv},
#{entrustEnd})
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM basic_entrust_accept

@ -70,206 +70,12 @@
GROUP BY uuid
</select>
<select id="filterCpmctymc" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity">
select *
from productinfo
<where>
<if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if>
<if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode}, '%')
</if>
<if test="uuid != '' and uuid != null">
AND uuid = #{uuid}
</if>
<if test="updateTime != null and updateTime != ''">
<![CDATA[
and updateTime >= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if>
</where>
GROUP BY cpmctymc
</select>
<select id="filterUdiByTyshxydm" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity">
SELECT *
FROM productinfo
<where>
diType = 1
<if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if>
<if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode}, '%')
</if>
<if test="uuid != '' and uuid != null">
AND uuid = #{uuid}
</if>
<if test="updateTime != null and updateTime != ''">
<![CDATA[
and updateTime >= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if>
</where>
GROUP BY nameCode
</select>
<select id="selectAllByUuid" parameterType="java.util.List"
resultType="com.glxp.api.entity.basic.ProductInfoEntity">
select *
from productinfo where
uuid in (
<foreach collection="ids" item="item" index="index"
separator=",">
#{item}
</foreach>
)
</select>
<select id="selectByUuid" parameterType="Map"
resultType="com.glxp.api.entity.basic.ProductInfoEntity">
select *
from productinfo
where uuid = #{uuid}
</select>
<!-- CHAR_LENGTH(nameCode) <![CDATA[ >= ]]> 14-->
<select id="filterUdiByCreditNo" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity">
select p.* from productinfo p
INNER JOIN
(select deviceRecordKey, max(versionNumber) versionNumber
from productinfo
<where>
<if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if>
<if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode}, '%')
</if>
<if test="uuid != '' and uuid != null">
AND uuid = #{uuid}
</if>
</where>
GROUP BY deviceRecordKey)
a on p.deviceRecordKey = a.deviceRecordKey and p.versionNumber = a.versionNumber
<where>
<if test="diType != '' and diType != null">
AND diType = #{diType}
</if>
</where>
</select>
<select id="filterUdiByNewest" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity">
SELECT *
FROM productinfo
<where>
<if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if>
<if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode}, '%')
</if>
<if test="uuid != '' and uuid != null">
AND uuid = #{uuid}
</if>
<if test="isNewest != null">
AND isNewest = #{isNewest}
</if>
</where>
</select>
<select id="filterUuidByCreditNo" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="java.lang.String">
select p.uuid from productinfo p
INNER JOIN
(select deviceRecordKey, max(versionNumber) versionNumber
from productinfo
<where>
<if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if>
<if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode}, '%')
</if>
<if test="uuid != '' and uuid != null">
AND uuid = #{uuid}
</if>
</where>
GROUP BY deviceRecordKey)
a on p.deviceRecordKey = a.deviceRecordKey and p.versionNumber = a.versionNumber
group by uuid
</select>
<select id="filterUdi" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity">
select *
from productinfo
<where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc = #{ylqxzcrbarmc}
</if>
<if test="ylqxzcrbarmc == '' and cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null and cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat('%', #{cpmctymc}, '%')
</if>
<if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode}, '%')
</if>
<if test="uuid != '' and uuid != null">
AND uuid = #{uuid}
</if>
<if test="ggxh != '' and ggxh != null">
AND ggxh LIKE concat('%', #{ggxh}, '%')
</if>
<if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null">
AND zczbhhzbapzbh LIKE concat('%', #{zczbhhzbapzbh}, '%')
</if>
<if test="deviceRecordKey != '' and deviceRecordKey != null">
AND deviceRecordKey = #{deviceRecordKey}
</if>
<if test="updateTime != null and updateTime != ''">
<![CDATA[
and updateTime >= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if>
<if test="isNewest != null and isNewest != ''">
AND isNewest = #{isNewest}
</if>
<if test="diType != '' and diType != null">
AND diType = #{diType}
</if>
</where>
</select>
<select id="filterUdiNoPage" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity">
select *
@ -364,18 +170,6 @@
</where>
</select>
<select id="selectByUpdateTime"
resultType="com.glxp.api.entity.basic.ProductInfoEntity">
select *
from productinfo
where
<![CDATA[ DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{startDate}, '%Y-%m-%d %H:%i:%S') ]]>
and
<![CDATA[ DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') <= DATE_FORMAT(#{endDate}, '%Y-%m-%d %H:%i:%S')
]]>
</select>
<select id="syncDlUdi" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity">
SELECT *
@ -548,198 +342,4 @@
</foreach>
</delete>
<update id="updateProductInfo" parameterType="com.glxp.api.entity.basic.ProductInfoEntity">
UPDATE productinfo
<set>
<if test="nameCode != null">
nameCode=#{nameCode},
</if>
<if test="packRatio != null">
packRatio=#{packRatio},
</if>
<if test="packLevel != null">
packLevel=#{packLevel},
</if>
<if test="bhxjsl != null">
bhxjsl=#{bhxjsl},
</if>
<if test="bhzxxsbzsl != null">
bhzxxsbzsl=#{bhzxxsbzsl},
</if>
<if test="zxxsbzbhsydysl != null">
zxxsbzbhsydysl=#{zxxsbzbhsydysl},
</if>
<if test="bhxjcpbm != null">
bhxjcpbm=#{bhxjcpbm},
</if>
<if test="bzcj != null">
bzcj=#{bzcj},
</if>
<if test="thirdProductNo != null">
thirdProductNo=#{thirdProductNo},
</if>
<if test="addType != null">
addType=#{addType},
</if>
<if test="deviceRecordKey != null">
deviceRecordKey=#{deviceRecordKey},
</if>
<if test="isUseDy != null">
isUseDy=#{isUseDy},
</if>
<if test="thirdProductName != null">
thirdProductName=#{thirdProductName},
</if>
<if test="cpmctymc != null">
cpmctymc=#{cpmctymc},
</if>
<if test="cplb != null">
cplb=#{cplb},
</if>
<if test="flbm != null">
flbm=#{flbm},
</if>
<if test="ggxh != null">
ggxh=#{ggxh},
</if>
<if test="qxlb != null">
qxlb=#{qxlb},
</if>
<if test="tyshxydm != null">
tyshxydm=#{tyshxydm},
</if>
<if test="ylqxzcrbarmc != null">
ylqxzcrbarmc=#{ylqxzcrbarmc},
</if>
<if test="ylqxzcrbarywmc != null">
ylqxzcrbarywmc=#{ylqxzcrbarywmc},
</if>
<if test="uuid != null">
uuid=#{uuid},
</if>
<if test="sjcpbm != null">
sjcpbm=#{sjcpbm},
</if>
<if test="versionNumber != null">
versionNumber=#{versionNumber},
</if>
<if test="diType != null">
diType=#{diType},
</if>
<if test="isNewest != null">
isNewest=#{isNewest},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="cplx != null">
cplx=#{cplx},
</if>
<if test="hchzsb != null">
hchzsb=#{hchzsb},
</if>
<if test="sfwblztlcp != null">
sfwblztlcp=#{sfwblztlcp},
</if>
<if test="cgzmraqxgxx != null">
cgzmraqxgxx=#{cgzmraqxgxx},
</if>
<if test="sfbjwycxsy != null">
sfbjwycxsy=#{sfbjwycxsy},
</if>
<if test="zdcfsycs != null">
zdcfsycs=#{zdcfsycs},
</if>
<if test="sfwwjbz != null">
sfwwjbz=#{sfwwjbz},
</if>
<if test="syqsfxyjxmj != null">
syqsfxyjxmj=#{syqsfxyjxmj},
</if>
<if test="qtxxdwzlj != null">
qtxxdwzlj=#{qtxxdwzlj},
</if>
<if test="mjfs != null">
mjfs=#{mjfs},
</if>
<if test="categoryName != null">
categoryName=#{categoryName},
</if>
</set>
WHERE id = #{id}
</update>
<update id="updateProductByUuid" parameterType="com.glxp.api.entity.basic.ProductInfoEntity">
UPDATE productinfo
<set>
<if test="scbssfbhph != null">
scbssfbhph=#{scbssfbhph},
</if>
<if test="scbssfbhxlh != null">
scbssfbhxlh=#{scbssfbhxlh},
</if>
<if test="scbssfbhscrq != null">
scbssfbhscrq=#{scbssfbhscrq},
</if>
<if test="scbssfbhsxrq != null">
scbssfbhsxrq=#{scbssfbhsxrq},
</if>
<if test="ybbm != null">
ybbm=#{ybbm},
</if>
<if test="spmc != null">
spmc=#{spmc},
</if>
<if test="cphhhbh != null">
cphhhbh=#{cphhhbh},
</if>
<if test="cpms != null">
cpms=#{cpms},
</if>
<if test="cpbsbmtxmc != null">
cpbsbmtxmc=#{cpbsbmtxmc},
</if>
<if test="isNewest != null">
isNewest=#{isNewest},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="cplx != null">
cplx=#{cplx},
</if>
<if test="hchzsb != null">
hchzsb=#{hchzsb},
</if>
<if test="sfwblztlcp != null">
sfwblztlcp=#{sfwblztlcp},
</if>
<if test="cgzmraqxgxx != null">
cgzmraqxgxx=#{cgzmraqxgxx},
</if>
<if test="sfbjwycxsy != null">
sfbjwycxsy=#{sfbjwycxsy},
</if>
<if test="zdcfsycs != null">
zdcfsycs=#{zdcfsycs},
</if>
<if test="sfwwjbz != null">
sfwwjbz=#{sfwwjbz},
</if>
<if test="syqsfxyjxmj != null">
syqsfxyjxmj=#{syqsfxyjxmj},
</if>
<if test="qtxxdwzlj != null">
qtxxdwzlj=#{qtxxdwzlj},
</if>
<if test="mjfs != null">
mjfs=#{mjfs},
</if>
<if test="categoryName != null">
categoryName=#{categoryName},
</if>
</set>
WHERE uuid = #{uuid}
</update>
</mapper>

@ -159,18 +159,6 @@
</if>
</where>
</select>
<select id="selectMaxGrid" resultType="java.lang.Integer">
select max(grid) as grid
from sys_workplace_queue
<where>
<if test="freightCode != null and freightCode != ''">
AND freightCode = #{freightCode}
</if>
<if test="layer != null and layer != ''">
AND layer = #{layer}
</if>
</where>
</select>
<select id="selectMaxCode" resultType="java.lang.String">
SELECT MAX(CAST(SUBSTRING_INDEX(code, '-', -1) AS UNSIGNED)) AS code
from sys_workplace_queue
@ -191,17 +179,6 @@
ORDER BY CAST(SUBSTRING_INDEX(code, '-', -1) AS UNSIGNED) DESC
LIMIT 1
</select>
<!-- <update id="updateByRelId">-->
<!-- UPDATE sys_workplace_queue-->
<!-- <trim prefix="set" suffixOverrides=",">-->
<!-- <if test="nameCode != null">-->
<!-- nameCode=#{nameCode},-->
<!-- </if>-->
<!-- </trim>-->
<!-- WHERE nameCode = #{nameCode}-->
<!-- and uuid = #{uuid}-->
<!-- </update>-->
<update id="updateByRelId">
UPDATE sys_workplace_queue
<set>

@ -3,15 +3,6 @@
<mapper namespace="com.glxp.api.dao.basic.UdiCompanyDao">
<select id="selectAllTyshxyh"
resultType="com.glxp.api.entity.basic.UdiCompanyEntity">
SELECT deviceRecordKey, tyshxydm, ylqxzcrbarmc, ylqxzcrbarywmc
FROM device
GROUP BY tyshxydm
</select>
<select id="filterUdiCompany"
parameterType="com.glxp.api.req.basic.UdiCompanyRequest"
resultType="com.glxp.api.entity.basic.UdiCompanyEntity">
@ -56,25 +47,6 @@
)
</insert>
<insert id="insertUdiCompanys" keyProperty="id" parameterType="com.glxp.api.entity.basic.UdiCompanyEntity">
replace INTO udicompany(id,
tyshxydm,ylqxzcrbarmc,ylqxzcrbarywmc,qylxrdh,
qylxrcz,qylxryx)
values
<foreach collection="udiCompanyEntities" item="item" index="index"
separator=",">
(
#{item.id},
#{item.tyshxydm},
#{item.ylqxzcrbarmc},
#{item.ylqxzcrbarywmc},
#{item.qylxrdh},
#{item.qylxrcz},
#{item.qylxryx})
</foreach>
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM udicompany
@ -88,18 +60,6 @@
</foreach>
</delete>
<update id="updateUdiCompany" parameterType="com.glxp.api.entity.basic.UdiCompanyEntity">
UPDATE udicompany
<set>
<if test="tyshxydm != null">tyshxydm=#{tyshxydm},</if>
<if test="ylqxzcrbarmc != null">ylqxzcrbarmc=#{ylqxzcrbarmc},</if>
<if test="ylqxzcrbarywmc != null">ylqxzcrbarywmc=#{ylqxzcrbarywmc},</if>
<if test="qylxrdh != null">qylxrdh=#{qylxrdh},</if>
<if test="qylxrcz != null">qylxrcz=#{qylxrcz},</if>
<if test="qylxryx != null">qylxryx=#{qylxryx},</if>
</set>
WHERE id = #{id}
</update>
<select id="syncDlCompany" parameterType="com.glxp.api.req.basic.UdiCompanyRequest"
resultType="com.glxp.api.entity.basic.UdiCompanyEntity">

@ -31,109 +31,6 @@
</where>
</select>
<select id="filterUdiInfo2" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
resultType="com.glxp.api.res.basic.UdiRelevanceResponse">
SELECT basic_products.id,
basic_udirel.thirdId,
basic_udirel.isUseDy,
basic_udirel.thirdId1,
basic_udirel.thirdId2,
basic_udirel.thirdId3,
basic_udirel.thirdId4,
basic_udirel.isDisable,
basic_udirel.udplatCode,
basic_products.nameCode,
basic_products.packRatio,
basic_products.packLevel,
basic_products.packUnit,
basic_products.bhxjsl,
basic_products.bhzxxsbzsl,
basic_products.zxxsbzbhsydysl,
basic_products.bhxjcpbm,
basic_products.bzcj,
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,
basic_products.scbssfbhph,
basic_products.scbssfbhxlh,
basic_products.scbssfbhscrq,
basic_products.scbssfbhsxrq,
basic_products.cpms,
basic_products.originUuid,
basic_products.allowNoBatch,
basic_products.allowNoExpire,
basic_products.allowNoProduct,
basic_products.allowNoSerial,
basic_products.spmc,
basic_products.sfwblztlcp,
basic_products.cgzmraqxgxx,
basic_products.sfbjwycxsy,
basic_products.zdcfsycs,
basic_products.sfwwjbz,
basic_products.syqsfxyjxmj,
basic_products.mjfs,
basic_products.categoryName,
basic_products.cplx,
basic_products.hchzsb,
company_product_relevance.customerId as unitFk
FROM (company_product_relevance
inner JOIN basic_udirel
ON company_product_relevance.udiRlIdFk = basic_udirel.id)
inner JOIN basic_products
ON basic_udirel.uuid = basic_products.uuid
<where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc}, '%')
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if>
<if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode}, '%')
</if>
<if test="unionCode != '' and unionCode != null">
or nameCode LIKE concat('%', #{unionCode}, '%')
or basic_udirel.ybbm LIKE concat('%', #{unionCode}, '%')
or basic_udirel.sptm LIKE concat('%', #{unionCode}, '%')
</if>
<if test="thrPiId != '' and thrPiId != null">
or thirdId LIKE concat('%', #{thrPiId}, '%')
or thirdId1 LIKE concat('%', #{thrPiId}, '%')
or thirdId2 LIKE concat('%', #{thrPiId}, '%')
or thirdId3 LIKE concat('%', #{thrPiId}, '%')
or thirdId4 LIKE concat('%', #{thrPiId}, '%')
</if>
<if test="uuid != '' and uuid != null">
AND uuid = #{uuid}
</if>
<if test="thirdId != '' and thirdId != null">
AND thirdId = #{thirdId}
</if>
<if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null">
AND zczbhhzbapzbh LIKE concat(#{zczbhhzbapzbh}, '%')
</if>
<if test="customerId != '' and customerId != null">
AND company_product_relevance.customerId = #{customerId}
</if>
<if test="originUuid != '' and originUuid != null">
AND originUuid = #{originUuid}
</if>
</where>
ORDER BY updateTime DESC
</select>
<!--// AND company_product_relevance.auditStatus = 1-->
<select id="findById" parameterType="java.lang.String"
resultType="com.glxp.api.entity.basic.UdiProductEntity">
SELECT *

@ -1265,12 +1265,6 @@
</select>
<select id="selectUuidById" parameterType="java.lang.String"
resultType="java.lang.String">
select uuid
FROM basic_udirel
WHERE id = #{relId}
</select>
<select id="selectByThirdId" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
resultType="com.glxp.api.entity.basic.UdiRelevanceEntity">
@ -1388,50 +1382,6 @@
#{autoCode}, #{distributeMaxLevel}, #{useMaxLevel}, #{unpackUseTime}, #{detailSort})
</insert>
<insert id="insertUdiRelevanceignore"
parameterType="com.glxp.api.entity.basic.UdiRelevanceEntity">
insert
ignore
INTO basic_udirel
(id, uuid, mainId, thirdId, thirdId1, thirdId2, thirdId3, thirdId4, udplatCode, isUseDy, isDisable,
isLock,
lockStatus, isAdavence, purType, attributeType, hcType, useMuti, useNum, supName, createTime,
updateTime, modifyTime,
createUser,
updateUser,
remark, useExpireTime, dispatch, groupBuy, needCert, isStack)
values (#{id},
#{uuid},
#{mainId},
#{thirdId},
#{thirdId1},
#{thirdId2},
#{thirdId3},
#{thirdId4},
#{udplatCode},
#{isUseDy},
#{isDisable},
#{isLock},
#{lockStatus},
#{isAdavence},
#{purType},
#{attributeType},
#{hcType},
#{useMuti},
#{useNum},
#{supName},
#{createTime},
#{updateTime},
#{modifyTime},
#{createUser},
#{updateUser},
#{remark},
#{useExpireTime},
#{dispatch},
#{groupBuy},
#{needCert},
#{isStack})
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
@ -1447,11 +1397,6 @@
</foreach>
</delete>
<delete id="deleteByUuid" parameterType="Map">
DELETE
FROM basic_udirel
WHERE uuid = #{uuid}
</delete>
<update id="updateUdiRelevance" parameterType="com.glxp.api.entity.basic.UdiRelevanceEntity">
UPDATE basic_udirel
@ -1723,12 +1668,6 @@
where basic_udirel.relCode = #{relCode}
</select>
<select id="selectRelIdByNameCode" resultType="java.lang.String">
select basic_udirel.id
from basic_udirel
inner join basic_products on basic_udirel.uuid = basic_products.uuid
where basic_products.nameCode = #{nameCode}
</select>
<select id="selectOneUdiJoinSup" resultType="com.glxp.api.res.basic.UdiRelevanceResponse">
select basic_udirel.*,

@ -309,12 +309,6 @@
where customerId = #{customerId}
</select>
<select id="findCompanyProductRelevanceByProductId" parameterType="java.lang.String"
resultType="com.glxp.api.entity.basic.UdiRlSupEntity">
SELECT *
FROM company_product_relevance
where productId = #{productId}
</select>
<select id="findCompanyProductRelevanceByUdiRlIdFk" parameterType="java.lang.String"
resultType="com.glxp.api.entity.basic.UdiRlSupEntity">
@ -418,26 +412,4 @@
WHERE id = #{id}
</delete>
<delete id="deleteByRlId" parameterType="Map">
DELETE
FROM company_product_relevance
WHERE udiRlIdFk = #{id}
</delete>
<select id="selectSupRlCount" resultType="java.lang.Long">
select count(*)
FROM company_product_relevance
inner JOIN basic_udirel
ON company_product_relevance.udiRlIdFk = basic_udirel.id
inner JOIN basic_products ON basic_udirel.uuid = basic_products.uuid
<where>
<if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode}, '%')
</if>
<if test="unitFk != null and unitFk != ''">
and unitFk = #{unitFk}
</if>
</where>
</select>
</mapper>

@ -63,42 +63,6 @@
WHERE id = #{id}
</update>
<update id="updateDeviceKeyByImei" parameterType="com.glxp.api.entity.system.SysPdaKeyEntity">
UPDATE sys_pda_check
<set>
<if test="isCheck != null">
isCheck=#{isCheck},
</if>
<if test="companyName != null">
companyName=#{companyName},
</if>
<if test="phone != null">
phone=#{phone},
</if>
<if test="contact != null">
contact=#{contact},
</if>
<if test="imeiKey != null">
imeiKey=#{imeiKey},
</if>
<if test="date != null">
date=#{date},
</if>
<if test="imei != null">
imei=#{imei},
</if>
<if test="creditNum != null">
creditNum=#{creditNum},
</if>
<if test="rgType != null">
rgType=#{rgType},
</if>
<if test="remark != null">
remark=#{remark},
</if>
</set>
WHERE imei = #{imei}
</update>
<insert id="insertDeviceKey" parameterType="com.glxp.api.entity.system.SysPdaKeyEntity">
replace

Loading…
Cancel
Save