新增库房代码

busUser
anthonywj 2 years ago
parent c581749ff4
commit b4e24759ef

@ -17,6 +17,7 @@ public class ThrCorpEntity {
private String mobile;
private String thirdSysFk;
private Boolean checked;
private String kfdm;
private Date updateTime;

@ -18,5 +18,5 @@ public class ThrCorpImportDetailEntity {
private String thirdSysFk;
private Date updateTime;
private String genKeyFk;
private String kfdm;
}

@ -15,9 +15,7 @@ public class ErpUnitsResponse {
private Boolean checked;
private String unitId; //必填 往来单位ID
private String kfdm;
}

@ -1,6 +1,6 @@
server.port=9992
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.jdbc-url=jdbc:mysql://127.0.0.1:3306/udiwms_ph1?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.jdbc-url=jdbc:mysql://127.0.0.1:3306/udiwms_za?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.username=root
spring.datasource.password=123456
spring.datasource.hikari.connection-timeout=60000

@ -2,22 +2,24 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.admin.dao.thrsys.ThrCorpDao">
<select id="filterThrCorps" parameterType="com.glxp.api.admin.req.thrsys.FilterThrCorpRequest"
resultType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity">
SELECT * FROM thr_corp
SELECT *
FROM thr_corp
<where>
<if test="unitId != '' and unitId != null">
AND unitId like concat('%',#{unitId},'%')
AND unitId like concat('%', #{unitId}, '%')
</if>
<if test="name != '' and name != null">
AND ( name LIKE concat('%',#{name},'%') or spell LIKE concat('%',#{name},'%') )
AND (name LIKE concat('%', #{name}, '%') or spell LIKE concat('%', #{name}, '%'))
</if>
<if test="thirdSysFk != '' and thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk}
</if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
<if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if>
</where>
ORDER BY updateTime DESC
@ -26,45 +28,36 @@
<insert id="insertThrCorps" keyProperty="id" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity">
replace
INTO thr_corp
(
unitId,name,spell,addr,creditNo,
contact,mobile,thirdSysFk,updateTime
)
values
(
#{unitId},
#{name},
#{spell},
#{addr},
#{creditNo},
#{contact},
#{mobile},
#{thirdSysFk},
#{updateTime}
)
INTO thr_corp
(unitId, name, spell, addr, creditNo,
contact, mobile, thirdSysFk, updateTime, kfdm)
values (#{unitId},
#{name},
#{spell},
#{addr},
#{creditNo},
#{contact},
#{mobile},
#{thirdSysFk},
#{updateTime}, #{kfdm})
</insert>
<insert id="insertThrCorpss" keyProperty="id" parameterType="java.util.List">
replace INTO thr_corp
(
unitId,name,spell,addr,creditNo,
contact,mobile,thirdSysFk,updateTime
)
values
(unitId, name, spell, addr, creditNo,
contact, mobile, thirdSysFk, updateTime, kfdm)
values
<foreach collection="thrCorpEntitys" item="item" index="index"
separator=",">
(
#{item.unitId},
#{item.name},
#{item.spell},
#{item.addr},
#{item.creditNo},
#{item.contact},
#{item.mobile},
#{item.thirdSysFk},#{item.updateTime}
)
(#{item.unitId},
#{item.name},
#{item.spell},
#{item.addr},
#{item.creditNo},
#{item.contact},
#{item.mobile},
#{item.thirdSysFk}, #{item.updateTime}, #{item.kfdm})
</foreach>
</insert>
@ -87,33 +80,51 @@
<update id="updateThrCorps" parameterType="com.glxp.api.admin.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="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="kfdm != null">
kfdm=#{kfdm}
</if>
</trim>
WHERE id = #{id}
</update>
<insert id="importThrCorp" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity">
replace
into thr_corp (unitId, spell, addr, creditNo, contact, mobile, thirdSysFk, name, updateTime)
values (
#{unitId},
#{spell},
#{addr},
#{creditNo},
#{contact},
#{mobile},
#{thirdSysFk},
#{name},
#{updateTime}
)
into thr_corp (unitId, spell, addr, creditNo, contact, mobile, thirdSysFk, name, updateTime, kfdm)
values (#{unitId},
#{spell},
#{addr},
#{creditNo},
#{contact},
#{mobile},
#{thirdSysFk},
#{name},
#{updateTime}, #{kfdm})
</insert>
</mapper>
</mapper>

@ -2,10 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.admin.dao.thrsys.ThrCorpImportDetailDao">
<select id="filterCorpDetailImport" parameterType="com.glxp.api.admin.req.basic.FilterUdiIpLogRequest"
resultType="com.glxp.api.admin.entity.thrsys.ThrCorpImportDetailEntity">
SELECT * FROM thr_corp_import_detail
SELECT *
FROM thr_corp_import_detail
<where>
<if test="genKey != '' and genKey != null">
AND genKeyFk = #{genKey}
@ -20,77 +20,97 @@
AND thirdSysFk = #{thirdSysFk}
</if>
</where>
</select>
<insert id="insertCorpDetailImport" keyProperty="id"
parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpImportDetailEntity">
insert INTO thr_corp_import_detail
(
unitId,name,spell,addr,creditNo,
contact,mobile,thirdSysFk,updateTime ,genKeyFk
)
values
(
#{unitId},
#{name},
#{spell},
#{addr},
#{creditNo},
#{contact},
#{mobile},
#{thirdSysFk},
#{updateTime},
#{genKeyFk}
)
(unitId, name, spell, addr, creditNo,
contact, mobile, thirdSysFk, updateTime, genKeyFk, kfdm)
values (#{unitId},
#{name},
#{spell},
#{addr},
#{creditNo},
#{contact},
#{mobile},
#{thirdSysFk},
#{updateTime},
#{genKeyFk}, #{kfdm})
</insert>
<insert id="insertCorpDetailImports" keyProperty="id" parameterType="java.util.List">
insert INTO thr_corp_import_detail
(
unitId,name,spell,addr,creditNo,
contact,mobile,thirdSysFk ,updateTime ,genKeyFk )
values
(unitId, name, spell, addr, creditNo,
contact, mobile, thirdSysFk, updateTime, genKeyFk, kfdm)
values
<foreach collection="corps" item="item" index="index"
separator=",">
(
#{item.unitId},
#{item.name},
#{item.spell},
#{item.addr},
#{item.creditNo},
#{item.contact},
#{item.mobile},
#{item.thirdSysFk} ,#{item.updateTime},#{item.genKeyFk} )
(#{item.unitId},
#{item.name},
#{item.spell},
#{item.addr},
#{item.creditNo},
#{item.contact},
#{item.mobile},
#{item.thirdSysFk}, #{item.updateTime}, #{item.genKeyFk}, #{item.kfdm})
</foreach>
</insert>
<delete id="deleteById" parameterType="Map">
DELETE FROM thr_corp_import_detail WHERE id = #{id}
DELETE
FROM thr_corp_import_detail
WHERE id = #{id}
</delete>
<delete id="deleteByGenkey" parameterType="Map">
DELETE FROM thr_corp_import_detail WHERE genKeyFk = #{genKey}
DELETE
FROM thr_corp_import_detail
WHERE genKeyFk = #{genKey}
</delete>
<update id="updateCorpDetailImport" parameterType="com.glxp.api.admin.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="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="kfdm != null">
kfdm=#{kfdm},
</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
From thr_corp_import_detail
where date(updateTime) &lt;= date(DATE_SUB(NOW(), INTERVAL 30 day))
</delete>
</mapper>
</mapper>

@ -100,3 +100,6 @@ CREATE TABLE if not exists `monitor_oper_log`
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_0900_ai_ci COMMENT = '操作日志记录'
ROW_FORMAT = DYNAMIC;
CALL Pro_Temp_ColumnWork('thr_corp', 'kfdm', 'varchar(255) ', 1);

Loading…
Cancel
Save