Browse Source

优化代码

wuxw 2 years ago
parent
commit
c2554a9eda

+ 8 - 0
java110-bean/src/main/java/com/java110/dto/invoiceApplyItem/InvoiceApplyItemDto.java

@@ -115,4 +115,12 @@ public class InvoiceApplyItemDto extends PageDto implements Serializable {
     public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
+
+    public String getPayTime() {
+        return payTime;
+    }
+
+    public void setPayTime(String payTime) {
+        this.payTime = payTime;
+    }
 }

+ 45 - 19
java110-bean/src/main/java/com/java110/dto/invoiceEvent/InvoiceEventDto.java

@@ -1,6 +1,7 @@
 package com.java110.dto.invoiceEvent;
 
 import com.java110.dto.PageDto;
+
 import java.io.Serializable;
 import java.util.Date;
 
@@ -15,12 +16,16 @@ import java.util.Date;
 public class InvoiceEventDto extends PageDto implements Serializable {
 
     private String eventId;
-private String applyId;
-private String createUserId;
-private String createUserName;
-private String remark;
-private String eventType;
-private String communityId;
+    private String applyId;
+    private String createUserId;
+    private String createUserName;
+    private String remark;
+    private String eventType;
+
+    private String eventTypeName;
+    private String communityId;
+
+
 
 
     private Date createTime;
@@ -31,43 +36,56 @@ private String communityId;
     public String getEventId() {
         return eventId;
     }
-public void setEventId(String eventId) {
+
+    public void setEventId(String eventId) {
         this.eventId = eventId;
     }
-public String getApplyId() {
+
+    public String getApplyId() {
         return applyId;
     }
-public void setApplyId(String applyId) {
+
+    public void setApplyId(String applyId) {
         this.applyId = applyId;
     }
-public String getCreateUserId() {
+
+    public String getCreateUserId() {
         return createUserId;
     }
-public void setCreateUserId(String createUserId) {
+
+    public void setCreateUserId(String createUserId) {
         this.createUserId = createUserId;
     }
-public String getCreateUserName() {
+
+    public String getCreateUserName() {
         return createUserName;
     }
-public void setCreateUserName(String createUserName) {
+
+    public void setCreateUserName(String createUserName) {
         this.createUserName = createUserName;
     }
-public String getRemark() {
+
+    public String getRemark() {
         return remark;
     }
-public void setRemark(String remark) {
+
+    public void setRemark(String remark) {
         this.remark = remark;
     }
-public String getEventType() {
+
+    public String getEventType() {
         return eventType;
     }
-public void setEventType(String eventType) {
+
+    public void setEventType(String eventType) {
         this.eventType = eventType;
     }
-public String getCommunityId() {
+
+    public String getCommunityId() {
         return communityId;
     }
-public void setCommunityId(String communityId) {
+
+    public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
 
@@ -87,4 +105,12 @@ public void setCommunityId(String communityId) {
     public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
+
+    public String getEventTypeName() {
+        return eventTypeName;
+    }
+
+    public void setEventTypeName(String eventTypeName) {
+        this.eventTypeName = eventTypeName;
+    }
 }

+ 93 - 95
java110-db/src/main/resources/mapper/acct/InvoiceEventV1ServiceDaoImplMapper.xml

@@ -5,120 +5,118 @@
 <mapper namespace="invoiceEventV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存发票事件信息 add by wuxw 2018-07-03 -->
     <insert id="saveInvoiceEventInfo" parameterType="Map">
         insert into invoice_event(
-event_id,apply_id,create_user_id,create_user_name,remark,event_type,community_id
-) values (
-#{eventId},#{applyId},#{createUserId},#{createUserName},#{remark},#{eventType},#{communityId}
-)
+        event_id,apply_id,create_user_id,create_user_name,remark,event_type,community_id
+        ) values (
+        #{eventId},#{applyId},#{createUserId},#{createUserName},#{remark},#{eventType},#{communityId}
+        )
     </insert>
 
 
-
     <!-- 查询发票事件信息 add by wuxw 2018-07-03 -->
     <select id="getInvoiceEventInfo" parameterType="Map" resultType="Map">
-        select  t.event_id,t.event_id eventId,t.apply_id,t.apply_id applyId,t.create_user_id,t.create_user_id createUserId,t.create_user_name,t.create_user_name createUserName,t.remark,t.status_cd,t.status_cd statusCd,t.event_type,t.event_type eventType,t.community_id,t.community_id communityId 
-from invoice_event t 
-where 1 =1 
-<if test="eventId !=null and eventId != ''">
-   and t.event_id= #{eventId}
-</if> 
-<if test="applyId !=null and applyId != ''">
-   and t.apply_id= #{applyId}
-</if> 
-<if test="createUserId !=null and createUserId != ''">
-   and t.create_user_id= #{createUserId}
-</if> 
-<if test="createUserName !=null and createUserName != ''">
-   and t.create_user_name= #{createUserName}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="eventType !=null and eventType != ''">
-   and t.event_type= #{eventType}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.event_id,t.event_id eventId,t.apply_id,t.apply_id applyId,t.create_user_id,t.create_user_id
+        createUserId,t.create_user_name,t.create_user_name createUserName,t.remark,t.status_cd,t.status_cd
+        statusCd,t.event_type,t.event_type eventType,t.community_id,t.community_id communityId,td.`name` eventTypeName
+        from invoice_event t
+        left join t_dict td on t.event_type = td.status_cd and td.table_name = 'invoice_event' and td.table_columns = 'event_type'
+        where 1 =1
+        <if test="eventId !=null and eventId != ''">
+            and t.event_id= #{eventId}
+        </if>
+        <if test="applyId !=null and applyId != ''">
+            and t.apply_id= #{applyId}
+        </if>
+        <if test="createUserId !=null and createUserId != ''">
+            and t.create_user_id= #{createUserId}
+        </if>
+        <if test="createUserName !=null and createUserName != ''">
+            and t.create_user_name= #{createUserName}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="eventType !=null and eventType != ''">
+            and t.event_type= #{eventType}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改发票事件信息 add by wuxw 2018-07-03 -->
     <update id="updateInvoiceEventInfo" parameterType="Map">
-        update  invoice_event t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="applyId !=null and applyId != ''">
-, t.apply_id= #{applyId}
-</if> 
-<if test="createUserId !=null and createUserId != ''">
-, t.create_user_id= #{createUserId}
-</if> 
-<if test="createUserName !=null and createUserName != ''">
-, t.create_user_name= #{createUserName}
-</if> 
-<if test="remark !=null and remark != ''">
-, t.remark= #{remark}
-</if> 
-<if test="eventType !=null and eventType != ''">
-, t.event_type= #{eventType}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
- where 1=1 <if test="eventId !=null and eventId != ''">
-and t.event_id= #{eventId}
-</if> 
+        update invoice_event t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="applyId !=null and applyId != ''">
+            , t.apply_id= #{applyId}
+        </if>
+        <if test="createUserId !=null and createUserId != ''">
+            , t.create_user_id= #{createUserId}
+        </if>
+        <if test="createUserName !=null and createUserName != ''">
+            , t.create_user_name= #{createUserName}
+        </if>
+        <if test="remark !=null and remark != ''">
+            , t.remark= #{remark}
+        </if>
+        <if test="eventType !=null and eventType != ''">
+            , t.event_type= #{eventType}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        where 1=1
+        <if test="eventId !=null and eventId != ''">
+            and t.event_id= #{eventId}
+        </if>
 
     </update>
 
     <!-- 查询发票事件数量 add by wuxw 2018-07-03 -->
-     <select id="queryInvoiceEventsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from invoice_event t 
-where 1 =1 
-<if test="eventId !=null and eventId != ''">
-   and t.event_id= #{eventId}
-</if> 
-<if test="applyId !=null and applyId != ''">
-   and t.apply_id= #{applyId}
-</if> 
-<if test="createUserId !=null and createUserId != ''">
-   and t.create_user_id= #{createUserId}
-</if> 
-<if test="createUserName !=null and createUserName != ''">
-   and t.create_user_name= #{createUserName}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="eventType !=null and eventType != ''">
-   and t.event_type= #{eventType}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
+    <select id="queryInvoiceEventsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from invoice_event t
+        where 1 =1
+        <if test="eventId !=null and eventId != ''">
+            and t.event_id= #{eventId}
+        </if>
+        <if test="applyId !=null and applyId != ''">
+            and t.apply_id= #{applyId}
+        </if>
+        <if test="createUserId !=null and createUserId != ''">
+            and t.create_user_id= #{createUserId}
+        </if>
+        <if test="createUserName !=null and createUserName != ''">
+            and t.create_user_name= #{createUserName}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="eventType !=null and eventType != ''">
+            and t.event_type= #{eventType}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 2 - 5
service-acct/src/main/java/com/java110/acct/cmd/invoiceEvent/ListInvoiceEventCmd.java

@@ -13,17 +13,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.java110.acct.cmd.invoiceEvent;
+package com.java110.acct.cmd.invoice;
 
 import com.alibaba.fastjson.JSONObject;
 import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
 import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
 import com.java110.intf.acct.IInvoiceEventV1InnerServiceSMO;
-import com.java110.po.invoiceEvent.InvoiceEventPo;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
@@ -48,7 +45,7 @@ import org.slf4j.LoggerFactory;
  * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
  * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
  */
-@Java110Cmd(serviceCode = "invoiceEvent.listInvoiceEvent")
+@Java110Cmd(serviceCode = "invoice.listInvoiceEvent")
 public class ListInvoiceEventCmd extends Cmd {
 
   private static Logger logger = LoggerFactory.getLogger(ListInvoiceEventCmd.class);