新增库房代码

busUser
anthonywj 2 years ago
parent c581749ff4
commit b4e24759ef

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

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

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

@ -1,6 +1,6 @@
server.port=9992 server.port=9992
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 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.username=root
spring.datasource.password=123456 spring.datasource.password=123456
spring.datasource.hikari.connection-timeout=60000 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" > <!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"> <mapper namespace="com.glxp.api.admin.dao.thrsys.ThrCorpDao">
<select id="filterThrCorps" parameterType="com.glxp.api.admin.req.thrsys.FilterThrCorpRequest" <select id="filterThrCorps" parameterType="com.glxp.api.admin.req.thrsys.FilterThrCorpRequest"
resultType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity"> resultType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity">
SELECT * FROM thr_corp SELECT *
FROM thr_corp
<where> <where>
<if test="unitId != '' and unitId != null"> <if test="unitId != '' and unitId != null">
AND unitId like concat('%',#{unitId},'%') AND unitId like concat('%', #{unitId}, '%')
</if> </if>
<if test="name != '' and name != null"> <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>
<if test="thirdSysFk != '' and thirdSysFk != null"> <if test="thirdSysFk != '' and thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk} AND thirdSysFk = #{thirdSysFk}
</if> </if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''"> <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') ]]> <![CDATA[
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if> </if>
</where> </where>
ORDER BY updateTime DESC ORDER BY updateTime DESC
@ -26,45 +28,36 @@
<insert id="insertThrCorps" keyProperty="id" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity"> <insert id="insertThrCorps" keyProperty="id" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity">
replace replace
INTO thr_corp INTO thr_corp
( (unitId, name, spell, addr, creditNo,
unitId,name,spell,addr,creditNo, contact, mobile, thirdSysFk, updateTime, kfdm)
contact,mobile,thirdSysFk,updateTime values (#{unitId},
) #{name},
values #{spell},
( #{addr},
#{unitId}, #{creditNo},
#{name}, #{contact},
#{spell}, #{mobile},
#{addr}, #{thirdSysFk},
#{creditNo}, #{updateTime}, #{kfdm})
#{contact},
#{mobile},
#{thirdSysFk},
#{updateTime}
)
</insert> </insert>
<insert id="insertThrCorpss" keyProperty="id" parameterType="java.util.List"> <insert id="insertThrCorpss" keyProperty="id" parameterType="java.util.List">
replace INTO thr_corp replace INTO thr_corp
( (unitId, name, spell, addr, creditNo,
unitId,name,spell,addr,creditNo, contact, mobile, thirdSysFk, updateTime, kfdm)
contact,mobile,thirdSysFk,updateTime values
)
values
<foreach collection="thrCorpEntitys" item="item" index="index" <foreach collection="thrCorpEntitys" item="item" index="index"
separator=","> separator=",">
( (#{item.unitId},
#{item.unitId}, #{item.name},
#{item.name}, #{item.spell},
#{item.spell}, #{item.addr},
#{item.addr}, #{item.creditNo},
#{item.creditNo}, #{item.contact},
#{item.contact}, #{item.mobile},
#{item.mobile}, #{item.thirdSysFk}, #{item.updateTime}, #{item.kfdm})
#{item.thirdSysFk},#{item.updateTime}
)
</foreach> </foreach>
</insert> </insert>
@ -87,33 +80,51 @@
<update id="updateThrCorps" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity"> <update id="updateThrCorps" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity">
UPDATE thr_corp UPDATE thr_corp
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<if test="unitId != null">unitId=#{unitId},</if> <if test="unitId != null">
<if test="name != null">name=#{name},</if> unitId=#{unitId},
<if test="spell != null">spell=#{spell},</if> </if>
<if test="addr != null">addr=#{addr},</if> <if test="name != null">
<if test="creditNo != null">creditNo=#{creditNo},</if> name=#{name},
<if test="contact != null">contact=#{contact},</if> </if>
<if test="mobile != null">mobile=#{mobile},</if> <if test="spell != null">
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if> spell=#{spell},
<if test="updateTime != null">updateTime=#{updateTime},</if> </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> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<insert id="importThrCorp" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity"> <insert id="importThrCorp" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity">
replace replace
into thr_corp (unitId, spell, addr, creditNo, contact, mobile, thirdSysFk, name, updateTime) into thr_corp (unitId, spell, addr, creditNo, contact, mobile, thirdSysFk, name, updateTime, kfdm)
values ( values (#{unitId},
#{unitId}, #{spell},
#{spell}, #{addr},
#{addr}, #{creditNo},
#{creditNo}, #{contact},
#{contact}, #{mobile},
#{mobile}, #{thirdSysFk},
#{thirdSysFk}, #{name},
#{name}, #{updateTime}, #{kfdm})
#{updateTime}
)
</insert> </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" > <!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"> <mapper namespace="com.glxp.api.admin.dao.thrsys.ThrCorpImportDetailDao">
<select id="filterCorpDetailImport" parameterType="com.glxp.api.admin.req.basic.FilterUdiIpLogRequest" <select id="filterCorpDetailImport" parameterType="com.glxp.api.admin.req.basic.FilterUdiIpLogRequest"
resultType="com.glxp.api.admin.entity.thrsys.ThrCorpImportDetailEntity"> resultType="com.glxp.api.admin.entity.thrsys.ThrCorpImportDetailEntity">
SELECT * FROM thr_corp_import_detail SELECT *
FROM thr_corp_import_detail
<where> <where>
<if test="genKey != '' and genKey != null"> <if test="genKey != '' and genKey != null">
AND genKeyFk = #{genKey} AND genKeyFk = #{genKey}
@ -20,77 +20,97 @@
AND thirdSysFk = #{thirdSysFk} AND thirdSysFk = #{thirdSysFk}
</if> </if>
</where> </where>
</select> </select>
<insert id="insertCorpDetailImport" keyProperty="id" <insert id="insertCorpDetailImport" keyProperty="id"
parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpImportDetailEntity"> parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpImportDetailEntity">
insert INTO thr_corp_import_detail insert INTO thr_corp_import_detail
( (unitId, name, spell, addr, creditNo,
unitId,name,spell,addr,creditNo, contact, mobile, thirdSysFk, updateTime, genKeyFk, kfdm)
contact,mobile,thirdSysFk,updateTime ,genKeyFk values (#{unitId},
) #{name},
values #{spell},
( #{addr},
#{unitId}, #{creditNo},
#{name}, #{contact},
#{spell}, #{mobile},
#{addr}, #{thirdSysFk},
#{creditNo}, #{updateTime},
#{contact}, #{genKeyFk}, #{kfdm})
#{mobile},
#{thirdSysFk},
#{updateTime},
#{genKeyFk}
)
</insert> </insert>
<insert id="insertCorpDetailImports" keyProperty="id" parameterType="java.util.List"> <insert id="insertCorpDetailImports" keyProperty="id" parameterType="java.util.List">
insert INTO thr_corp_import_detail insert INTO thr_corp_import_detail
( (unitId, name, spell, addr, creditNo,
unitId,name,spell,addr,creditNo, contact, mobile, thirdSysFk, updateTime, genKeyFk, kfdm)
contact,mobile,thirdSysFk ,updateTime ,genKeyFk ) values
values
<foreach collection="corps" item="item" index="index" <foreach collection="corps" item="item" index="index"
separator=","> separator=",">
( (#{item.unitId},
#{item.unitId}, #{item.name},
#{item.name}, #{item.spell},
#{item.spell}, #{item.addr},
#{item.addr}, #{item.creditNo},
#{item.creditNo}, #{item.contact},
#{item.contact}, #{item.mobile},
#{item.mobile}, #{item.thirdSysFk}, #{item.updateTime}, #{item.genKeyFk}, #{item.kfdm})
#{item.thirdSysFk} ,#{item.updateTime},#{item.genKeyFk} )
</foreach> </foreach>
</insert> </insert>
<delete id="deleteById" parameterType="Map"> <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>
<delete id="deleteByGenkey" parameterType="Map"> <delete id="deleteByGenkey" parameterType="Map">
DELETE FROM thr_corp_import_detail WHERE genKeyFk = #{genKey} DELETE
FROM thr_corp_import_detail
WHERE genKeyFk = #{genKey}
</delete> </delete>
<update id="updateCorpDetailImport" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpImportDetailEntity"> <update id="updateCorpDetailImport" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpImportDetailEntity">
UPDATE thr_corp_import_detail UPDATE thr_corp_import_detail
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<if test="unitId != null">unitId=#{unitId},</if> <if test="unitId != null">
<if test="name != null">name=#{name},</if> unitId=#{unitId},
<if test="spell != null">spell=#{spell},</if> </if>
<if test="addr != null">addr=#{addr},</if> <if test="name != null">
<if test="creditNo != null">creditNo=#{creditNo},</if> name=#{name},
<if test="contact != null">contact=#{contact},</if> </if>
<if test="mobile != null">mobile=#{mobile},</if> <if test="spell != null">
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if> spell=#{spell},
<if test="updateTime != null">updateTime=#{updateTime},</if> </if>
<if test="genKeyFk != null">genKeyFk=#{genKeyFk},</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> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<delete id="deleteByTime"> <delete id="deleteByTime">
Delete From thr_corp_import_detail Delete
where date(updateTime) &lt;= date(DATE_SUB(NOW(),INTERVAL 30 day)) From thr_corp_import_detail
where date(updateTime) &lt;= date(DATE_SUB(NOW(), INTERVAL 30 day))
</delete> </delete>
</mapper> </mapper>

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

Loading…
Cancel
Save