Browse Source

资金模块-调整收支类别下拉框

huangx 7 years ago
parent
commit
04aa64b8c1

+ 2 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/FundinouttypeController.java

@@ -34,8 +34,8 @@ public class FundinouttypeController {
     }
 
     @GetMapping("/getCombo")
-    public Result getCombo(){
-        List<ComboDTO> comboDTOList = fundinouttypeService.getCombo();
+    public Result getCombo(String condition){
+        List<ComboDTO> comboDTOList = fundinouttypeService.getCombo(condition);
         return Result.success(comboDTOList);
     }
 }

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/FundinouttypeMapper.java

@@ -23,7 +23,7 @@ public interface FundinouttypeMapper extends CommonBaseMapper<Fundinouttype> {
 
     int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId, @Param("id") Long id);
 
-    List<ComboDTO> getCombo(@Param("companyId") Long companyId);
+    List<ComboDTO> getCombo(@Param("companyId") Long companyId,@Param("condition") String condition);
 
     List<Fundinouttype> selectAll(@Param("companyId") Long companyId);
 }

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/FundinouttypeService.java

@@ -11,7 +11,7 @@ import java.util.List;
 
 public interface FundinouttypeService extends CommonBaseService<FundinouttypeMapper, Fundinouttype> {
 
-    List<ComboDTO> getCombo();
+    List<ComboDTO> getCombo(String condition);
 
     List<Fundinouttype> selectAll();
 

+ 2 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/FundinouttypeServiceImpl.java

@@ -89,8 +89,8 @@ public class FundinouttypeServiceImpl extends CommonBaseServiceImpl<Fundinouttyp
     }
 
     @Override
-    public List<ComboDTO> getCombo() {
-        return getMapper().getCombo(BaseContextHolder.getCompanyId());
+    public List<ComboDTO> getCombo(String condition) {
+        return getMapper().getCombo(BaseContextHolder.getCompanyId(),condition);
     }
 
     @Override

+ 8 - 0
applications/document/document-server/src/main/resources/mapper/FundinouttypeMapper.xml

@@ -158,5 +158,13 @@
   </select>
     <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
         SELECT FT_NAME display,FT_NAME value FROM FUNDINOUTTYPE
+        <where>
+          <if test="companyId!=null and companyId!=0">
+            and  COMPANYID=#{companyId}
+          </if>
+          <if test="condition!=null">
+            and ft_kind=#{condition,jdbcType=VARCHAR}
+          </if>
+        </where>
     </select>
 </mapper>

+ 1 - 1
applications/document/document-server/src/main/resources/mapper/VendorMapper.xml

@@ -142,7 +142,7 @@
         #{updateTime,jdbcType=TIMESTAMP}, #{ve_text1,jdbcType=VARCHAR}, #{ve_text2,jdbcType=VARCHAR},
         #{ve_text3,jdbcType=VARCHAR}, #{ve_text4,jdbcType=VARCHAR}, #{ve_text5,jdbcType=VARCHAR},
         #{ve_payamount,jdbcType=DOUBLE}, #{ve_leftamount,jdbcType=DOUBLE}, #{ve_beginym,jdbcType=INTEGER},
-        #{ve_preamount,jdbcTyp=DOUBLE}
+        #{ve_preamount,jdbcType=DOUBLE}
         )
     </insert>
     <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Vendor" >

+ 1 - 1
frontend/saas-web/app/view/money/othreceipts/FormPanel.js

@@ -81,7 +81,7 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                 items : null,
                 editor : {
                     xtype : "remotecombo", 
-                    storeUrl:'/api/document/fundinouttype/getCombo',
+                    storeUrl:'/api/document/fundinouttype/getCombo?condition=收入',
                     addHandler:function(b){
                         var document = Ext.create('saas.view.document.kind.Kind',{});
                         var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;

+ 2 - 2
frontend/saas-web/app/view/money/othspendings/FormPanel.js

@@ -84,8 +84,8 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                 dataIndex : "osd_type",
                 items : null,
                 editor : {
-                    xtype : "remotecombo", 
-                    storeUrl:'/api/document/fundinouttype/getCombo',
+                    xtype : "remotecombo",
+                    storeUrl:'/api/document/fundinouttype/getCombo?condition=支出',
                     addHandler:function(b){
                         var document = Ext.create('saas.view.document.kind.Kind',{});
                         var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;