sunhh пре 2 година
родитељ
комит
c5436cb4b9

+ 2 - 2
purchase-admin/src/main/resources/logback.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <!-- 日志存放路径 -->
-        <property name="log.path" value="/home/purchase/logs"/>
-<!--    <property name="log.path" value="/Users/sunhuanhuan/Documents/project/106/文档/purchase/logs"/>-->
+<!--        <property name="log.path" value="/home/purchase/logs"/>-->
+    <property name="log.path" value="/Users/sunhuanhuan/Documents/project/106/文档/purchase/logs"/>
     <!-- 日志输出格式 -->
     <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
 

+ 100 - 96
purchase-system/src/main/resources/mapper/base/BaseExpertMapper.xml

@@ -20,81 +20,83 @@
     </resultMap>
 
     <insert id="insertExpert" parameterType="com.ozs.base.domain.BaseExpert">
-        insert into base_expert (
-        <if test="expertName != null and expertName != '' ">
-            expert_name,
-        </if>
-        <if test="expertGender != null and expertGender != '' ">
-            expert_gender,
-        </if>
-        <if test="expertDateBirth != null and expertDateBirth != '' ">
-            expert_date_birth,
-        </if>
-        <if test="expertTel != null and expertTel != '' ">
-            expert_tel,
-        </if>
-        <if test="majorType != null and majorType != ''">
-            major_type,
-        </if>
-        <if test="unitInformation != null and unitInformation != ''">
-            unit_information,
-        </if>
-        <if test="majorGrade != null and majorGrade != '' ">
-            major_grade,
-        </if>
-        <if test="varietyPurchase != null and varietyPurchase != '' ">
-            variety_purchase,
-        </if>
-        <if test="professionalTitle != null and professionalTitle != ''">
-            professional_title,
-        </if>
-        <if test="status != null and status != ''">
-            status,
-        </if>
-        <if test="localArea != null and localArea != ''">
-            local_area,
-        </if>
-        <if test="idNumber != null and idNumber != ''">
-            id_number
-        </if>
-        ) values (
-        <if test="expertName != null and expertName != ''">
-            #{expertName},
-        </if>
-        <if test="expertGender != null and expertGender != ''">
-            #{expertGender},
-        </if>
-        <if test="expertDateBirth != null and expertDateBirth != ''">
-            #{expertDateBirth},
-        </if>
-        <if test="expertTel != null and expertTel != ''">
-            #{expertTel},
-        </if>
-        <if test="majorType != null and majorType != ''">
-            #{majorType},
-        </if>
-        <if test="unitInformation != null and unitInformation != ''">
-            #{unitInformation},
-        </if>
-        <if test="majorGrade != null and majorGrade != ''">
-            #{majorGrade},
-        </if>
-        <if test="varietyPurchase != null and varietyPurchase != ''">
-            #{varietyPurchase},
-        </if>
-        <if test="professionalTitle != null and professionalTitle != ''">
-            #{professionalTitle},
-        </if>
-        <if test="status != null and status != ''">
-            #{status},
-        </if>
-        <if test="localArea != null and localArea != ''">
-            #{localArea},
-        </if>
-        <if test="idNumber != null and idNumber != ''">
-            #{idNumber}
-        </if>
-        )
+        insert into base_expert
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="expertName != null and expertName != '' ">
+                expert_name,
+            </if>
+            <if test="expertGender != null and expertGender != '' ">
+                expert_gender,
+            </if>
+            <if test="expertDateBirth != null and expertDateBirth != '' ">
+                expert_date_birth,
+            </if>
+            <if test="expertTel != null and expertTel != '' ">
+                expert_tel,
+            </if>
+            <if test="majorType != null and majorType != ''">
+                major_type,
+            </if>
+            <if test="unitInformation != null and unitInformation != ''">
+                unit_information,
+            </if>
+            <if test="majorGrade != null and majorGrade != '' ">
+                major_grade,
+            </if>
+            <if test="varietyPurchase != null and varietyPurchase != '' ">
+                variety_purchase,
+            </if>
+            <if test="professionalTitle != null and professionalTitle != ''">
+                professional_title,
+            </if>
+            <if test="status != null and status != ''">
+                status,
+            </if>
+            <if test="localArea != null and localArea != ''">
+                local_area,
+            </if>
+            <if test="idNumber != null and idNumber != ''">
+                id_number,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="expertName != null and expertName != ''">
+                #{expertName},
+            </if>
+            <if test="expertGender != null and expertGender != ''">
+                #{expertGender},
+            </if>
+            <if test="expertDateBirth != null and expertDateBirth != ''">
+                #{expertDateBirth},
+            </if>
+            <if test="expertTel != null and expertTel != ''">
+                #{expertTel},
+            </if>
+            <if test="majorType != null and majorType != ''">
+                #{majorType},
+            </if>
+            <if test="unitInformation != null and unitInformation != ''">
+                #{unitInformation},
+            </if>
+            <if test="majorGrade != null and majorGrade != ''">
+                #{majorGrade},
+            </if>
+            <if test="varietyPurchase != null and varietyPurchase != ''">
+                #{varietyPurchase},
+            </if>
+            <if test="professionalTitle != null and professionalTitle != ''">
+                #{professionalTitle},
+            </if>
+            <if test="status != null and status != ''">
+                #{status},
+            </if>
+            <if test="localArea != null and localArea != ''">
+                #{localArea},
+            </if>
+            <if test="idNumber != null and idNumber != ''">
+                #{idNumber},
+            </if>
+        </trim>
     </insert>
 
     <select id="selectByUnitInformation" parameterType="java.lang.String"
@@ -108,26 +110,28 @@
     </select>
 
     <insert id="insertBaseUnitInformation" parameterType="com.ozs.base.domain.BaseUnitInformation">
-        insert into base_unit_information (
-        <if test="unitName != null and unitName != '' ">
-            unit_name,
-        </if>
-        <if test="created != null and created != '' ">
-            created,
-        </if>
-        <if test="createTime != null">
-            create_time
-        </if>
-        ) values (
-        <if test="unitName != null and unitName != ''">
-            #{unitName},
-        </if>
-        <if test="created != null and created != ''">
-            #{created},
-        </if>
-        <if test="createTime != null">
-            #{createTime}
-        </if>
-        )
+        insert into base_unit_information
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="unitName != null and unitName != '' ">
+                unit_name,
+            </if>
+            <if test="created != null and created != '' ">
+                created,
+            </if>
+            <if test="createTime != null">
+                create_time,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="unitName != null and unitName != ''">
+                #{unitName},
+            </if>
+            <if test="created != null and created != ''">
+                #{created},
+            </if>
+            <if test="createTime != null">
+                #{createTime},
+            </if>
+        </trim>
     </insert>
 </mapper>

+ 72 - 166
purchase-system/src/main/resources/mapper/base/BaseSupplierMapper.xml

@@ -24,105 +24,43 @@
     </resultMap>
 
     <insert id="insertBaseSupplier" parameterType="com.ozs.base.domain.BaseSupplier">
-        insert into base_supplier (
-        <if test="supplierName != null and supplierName != '' ">
-            supplier_name,
-        </if>
-        <if test="supplierResponsiblePerson != null and supplierResponsiblePerson != '' ">
-            supplier_responsible_person,
-        </if>
-        <if test="supplierAddress != null and supplierAddress != '' ">
-            supplier_address,
-        </if>
-        <if test="supplierType != null and supplierType != '' ">
-            supplier_type,
-        </if>
-        <if test="supplierState != null and supplierState != ''">
-            supplier_state,
-        </if>
-        <if test="supplierAdvancePurchase != null and supplierAdvancePurchase != ''">
-            supplier_advance_purchase,
-        </if>
-        <if test="postalCode != null and postalCode != ''">
-            postal_code,
-        </if>
-        <if test="projectPerson != null and projectPerson != ''">
-            project_person,
-        </if>
-        <if test="telephone != null and telephone != ''">
-            telephone,
-        </if>
-        <if test="bankAccountName != null and bankAccountName != ''">
-            bank_account_name,
-        </if>
-        <if test="bankOfDeposit != null and bankOfDeposit != ''">
-            bank_of_deposit,
-        </if>
-        <if test="bankAccountNumber != null and bankAccountNumber != ''">
-            bank_account_number,
-        </if>
-        <if test="created != null and created != ''">
-            created,
-        </if>
-        <if test="createTime != null">
-            create_time,
-        </if>
-        <if test="updated != null and updated != ''">
-            updated,
-        </if>
-        <if test="updateTime != null">
-            update_time
-        </if>
-        ) values (
-        <if test="supplierName != null and supplierName != ''">
-            #{supplierName},
-        </if>
-        <if test="supplierResponsiblePerson != null and supplierResponsiblePerson != ''">
-            #{supplierResponsiblePerson},
-        </if>
-        <if test="supplierAddress != null and supplierAddress != ''">
-            #{supplierAddress},
-        </if>
-        <if test="supplierType != null and supplierType != ''">
-            #{supplierType},
-        </if>
-        <if test="supplierState != null and supplierState != ''">
-            #{supplierState},
-        </if>
-        <if test="supplierAdvancePurchase != null and supplierAdvancePurchase != ''">
-            #{supplierAdvancePurchase},
-        </if>
-        <if test="postalCode != null and postalCode != ''">
-            #{postalCode},
-        </if>
-        <if test="projectPerson != null and projectPerson != ''">
-            #{projectPerson},
-        </if>
-        <if test="telephone != null and telephone != ''">
-            #{telephone},
-        </if>
-        <if test="bankAccountName != null and bankAccountName != ''">
-            #{bankAccountName},
-        </if>
-        <if test="bankOfDeposit != null and bankOfDeposit != ''">
-            #{bankOfDeposit},
-        </if>
-        <if test="bankAccountNumber != null and bankAccountNumber != ''">
-            #{bankAccountNumber},
-        </if>
-        <if test="created != null and created != ''">
-            #{created},
-        </if>
-        <if test="createTime != null">
-            #{createTime},
-        </if>
-        <if test="updated != null and updated != ''">
-            #{updated},
-        </if>
-        <if test="updateTime != null">
-            #{updateTime}
-        </if>
-        )
+        insert into base_supplier
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="supplierName != null">supplier_name,</if>
+            <if test="supplierResponsiblePerson != null">supplier_responsible_person,</if>
+            <if test="supplierAddress != null">supplier_address,</if>
+            <if test="supplierType != null">supplier_type,</if>
+            <if test="supplierState != null">supplier_state,</if>
+            <if test="supplierAdvancePurchase != null">supplier_advance_purchase,</if>
+            <if test="postalCode != null">postal_code,</if>
+            <if test="projectPerson != null">project_person,</if>
+            <if test="telephone != null">telephone,</if>
+            <if test="bankAccountName != null">bank_account_name,</if>
+            <if test="bankOfDeposit != null">bank_of_deposit,</if>
+            <if test="bankAccountNumber != null">bank_account_number,</if>
+            <if test="created != null">created,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updated != null">updated,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="supplierName != null">#{supplierName},</if>
+            <if test="supplierResponsiblePerson != null">#{supplierResponsiblePerson},</if>
+            <if test="supplierAddress != null">#{supplierAddress},</if>
+            <if test="supplierType != null">#{supplierType},</if>
+            <if test="supplierState != null">#{supplierState},</if>
+            <if test="supplierAdvancePurchase != null">#{supplierAdvancePurchase},</if>
+            <if test="postalCode != null">#{postalCode},</if>
+            <if test="projectPerson != null">#{projectPerson},</if>
+            <if test="telephone != null">#{telephone},</if>
+            <if test="bankAccountName != null">#{bankAccountName},</if>
+            <if test="bankOfDeposit != null">#{bankOfDeposit},</if>
+            <if test="bankAccountNumber != null">#{bankAccountNumber},</if>
+            <if test="created != null">#{created},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updated != null">#{updated},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
     </insert>
 
     <delete id="deleteBaseSupplier" parameterType="java.lang.Integer">
@@ -133,56 +71,24 @@
 
     <update id="updateBaseSupplier" parameterType="com.ozs.base.domain.BaseSupplier">
         update base_supplier
-        <set>
-            <if test="supplierName != null and supplierName != ''">
-                supplier_name = #{supplierName},
-            </if>
-            <if test="supplierResponsiblePerson != null and supplierResponsiblePerson != ''">
-                supplier_responsible_person = #{supplierResponsiblePerson},
-            </if>
-            <if test="supplierAddress != null and supplierAddress != ''">
-                supplier_address = #{supplierAddress},
-            </if>
-            <if test="supplierType != null and supplierType != ''">
-                supplier_type = #{supplierType},
-            </if>
-            <if test="supplierState != null and supplierState != ''">
-                supplier_state = #{supplierState},
-            </if>
-            <if test="supplierAdvancePurchase != null and supplierAdvancePurchase != '' ">
-                supplier_advance_purchase = #{supplierAdvancePurchase},
-            </if>
-            <if test="postalCode != null and postalCode != ''">
-                postal_code = #{postalCode},
-            </if>
-            <if test="projectPerson != null and projectPerson != ''">
-                project_person = #{projectPerson},
-            </if>
-            <if test="telephone != null and telephone != ''">
-                telephone = #{telephone},
-            </if>
-            <if test="bankAccountName != null and bankAccountName != ''">
-                bank_account_name = #{bankAccountName},
-            </if>
-            <if test="bankOfDeposit != null and bankOfDeposit != ''">
-                bank_of_deposit = #{bankOfDeposit},
-            </if>
-            <if test="bankAccountNumber != null and bankAccountNumber != ''">
-                bank_account_number = #{bankAccountNumber},
-            </if>
-            <if test="created != null and created != ''">
-                created = #{created},
-            </if>
-            <if test="createTime != null">
-                create_time = #{createTime},
-            </if>
-            <if test="updated != null and updated != ''">
-                updated = #{updated},
-            </if>
-            <if test="updateTime != null">
-                update_time = #{updateTime},
-            </if>
-        </set>
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="supplierName != null">supplier_name = #{supplierName},</if>
+            <if test="supplierResponsiblePerson != null">supplier_responsible_person = #{supplierResponsiblePerson},</if>
+            <if test="supplierAddress != null">supplier_address = #{supplierAddress},</if>
+            <if test="supplierType != null">supplier_type = #{supplierType},</if>
+            <if test="supplierState != null">supplier_state = #{supplierState},</if>
+            <if test="supplierAdvancePurchase != null">supplier_advance_purchase = #{supplierAdvancePurchase},</if>
+            <if test="postalCode != null">postal_code = #{postalCode},</if>
+            <if test="projectPerson != null">project_person = #{projectPerson},</if>
+            <if test="telephone != null">telephone = #{telephone},</if>
+            <if test="bankAccountName != null">bank_account_name = #{bankAccountName},</if>
+            <if test="bankOfDeposit != null">bank_of_deposit = #{bankOfDeposit},</if>
+            <if test="bankAccountNumber != null">bank_account_number = #{bankAccountNumber},</if>
+            <if test="created != null">created = #{created},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updated != null">updated = #{updated},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
         where id = #{id}
     </update>
 
@@ -190,55 +96,55 @@
         select * from base_supplier
         <where>
             <if test="id != null and id != ''">
-                id = #{id},
+                and id = #{id}
             </if>
             <if test="supplierName != null and supplierName != ''">
-                supplier_name like '% +' #{supplierName} '+ %',
+                and supplier_name like '% +' #{supplierName} '+ %'
             </if>
             <if test="supplierResponsiblePerson != null and supplierResponsiblePerson != ''">
-                supplier_responsible_person like '% +' #{supplierResponsiblePerson} '+ %',
+                and supplier_responsible_person like '% +' #{supplierResponsiblePerson} '+ %'
             </if>
             <if test="supplierAddress != null and supplierAddress != ''">
-                supplier_address like '% +' #{supplierAddress} '+ %',
+                and supplier_address like '% +' #{supplierAddress} '+ %'
             </if>
             <if test="supplierType != null and supplierType != ''">
-                supplier_type = #{supplierType},
+                and supplier_type = #{supplierType}
             </if>
             <if test="supplierState != null and supplierState != ''">
-                supplier_state = #{supplierState},
+                and supplier_state = #{supplierState}
             </if>
             <if test="supplierAdvancePurchase != null and supplierAdvancePurchase != '' ">
-                supplier_advance_purchase = #{supplierAdvancePurchase},
+                and supplier_advance_purchase = #{supplierAdvancePurchase}
             </if>
             <if test="postalCode != null and postalCode != ''">
-                postal_code = #{postalCode},
+                and postal_code = #{postalCode}
             </if>
             <if test="projectPerson != null and projectPerson != ''">
-                project_person = #{projectPerson},
+                and project_person = #{projectPerson}
             </if>
             <if test="telephone != null and telephone != ''">
-                telephone = #{telephone},
+                and telephone = #{telephone}
             </if>
             <if test="bankAccountName != null and bankAccountName != ''">
-                bank_account_name = #{bankAccountName},
+                and bank_account_name = #{bankAccountName}
             </if>
             <if test="bankOfDeposit != null and bankOfDeposit != ''">
-                bank_of_deposit = #{bankOfDeposit},
+                and bank_of_deposit = #{bankOfDeposit}
             </if>
             <if test="bankAccountNumber != null and bankAccountNumber != ''">
-                bank_account_number = #{bankAccountNumber},
+                and bank_account_number = #{bankAccountNumber}
             </if>
             <if test="created != null and created != ''">
-                created = #{created},
+                and created = #{created}
             </if>
             <if test="createTime != null">
-                create_time = #{createTime},
+                and create_time = #{createTime}
             </if>
             <if test="updated != null and updated != ''">
-                updated = #{updated},
+                and updated = #{updated}
             </if>
             <if test="updateTime != null">
-                update_time = #{updateTime}
+                and update_time = #{updateTime}
             </if>
         </where>
     </select>

+ 5 - 5
purchase-system/src/main/resources/mapper/plan/ProvisionalPlanMapper.xml

@@ -39,7 +39,7 @@
 
     <update id="updateProvisionalPlanById" parameterType="com.ozs.plan.doman.vo.requestVo.ProvisionalPlanVo">
         update plan_practical
-        <set>
+        <trim prefix="SET" suffixOverrides=",">
             <if test="purchaseDeptId != null and purchaseDeptId != ''">
                 purchase_dept_id = #{purchaseDeptId},
             </if>
@@ -98,9 +98,9 @@
                 updated = #{updated},
             </if>
             <if test="updateTime != null">
-                update_time = #{updateTime}
+                update_time = #{updateTime},
             </if>
-        </set>
+        </trim>
         where plan_practical_id = #{planPracticalId}
     </update>
 
@@ -186,14 +186,14 @@
     <!--	计划审核-->
     <update id="review" parameterType="com.ozs.plan.doman.ProvisionalPlan">
         update plan_practical
-        <set>
+        <trim prefix="SET" suffixOverrides=",">
             <if test="refuseReason != null and refuseReason != ''">
                 refuse_reason = #{refuseReason},
             </if>
             <if test="projectStatus != null and projectStatus != ''">
                 project_status = #{projectStatus}
             </if>
-        </set>
+        </trim>
         where plan_practical_id = #{planPracticalId}
     </update>
 </mapper>