浏览代码

物资信息导出修改

lazhaoqian 3 年之前
父节点
当前提交
a4063202d4

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TFeesController.java

@@ -46,9 +46,9 @@ public class TFeesController extends BaseController {
     @Log(title = "费用信息", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(TFees tFees) {
-        List<TFees> list = tFeesService.selectTFeesList(tFees);
+        List<TFees> list = tFeesService.selectTFeesAnPinList(tFees);
         ExcelUtil<TFees> util = new ExcelUtil<TFees>(TFees.class);
-        return util.exportExcel(list, "fees");
+        return util.exportExcel(list, "物资信息");
     }
 
     /**

+ 36 - 8
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/domain/TFees.java

@@ -37,13 +37,17 @@ public class TFees extends BaseEntity {
     /**
      * 费用属性(数据字典)"全部、仓储、海运、空运"
      */
-    @Excel(name = "费用属性(数据字典)全部、仓储、海运、空运")
+    @Excel(name = "物资类别")
+    private String feeTypeName;
+
     private String fFeetype;
 
     /**
      * 计量单位(数据字典)"对应t_unitfees的f_id"
      */
-    @Excel(name = "计量单位(数据字典)对应t_unitfees的f_id")
+    @Excel(name = "计量单位")
+    private String feeUnitName;
+
     private Long fFeeunitid;
 
     /**
@@ -55,7 +59,6 @@ public class TFees extends BaseEntity {
     /**
      * 状态
      */
-    @Excel(name = "状态")
     private String fStatus;
 
     /**
@@ -67,11 +70,12 @@ public class TFees extends BaseEntity {
     /**
      * 收付方向
      */
-    @Excel(name = "收付方向")
     private String fDc;
 
     /** 是否允许修改(T允许,F不允许) */
-    @Excel(name = "是否允许修改(T允许,F不允许)")
+    @Excel(name = "是否允许修改")
+    private String modifyName;
+
     private String isModify;
     /** 税务类别 */
     @Excel(name = "税务类别")
@@ -90,11 +94,35 @@ public class TFees extends BaseEntity {
     private String fTaxTag;
 
     /** 是否显示优惠政策 0是 1否 */
-    @Excel(name = "是否显示优惠政策 0是 1否")
-    private Integer fDiscounts;
-    //中文名
+    @Excel(name = "是否显示优惠政策")
     private String fDiscountsName;
 
+    private Integer fDiscounts;
+
+    public String getFeeTypeName() {
+        return feeTypeName;
+    }
+
+    public void setFeeTypeName(String feeTypeName) {
+        this.feeTypeName = feeTypeName;
+    }
+
+    public String getFeeUnitName() {
+        return feeUnitName;
+    }
+
+    public void setFeeUnitName(String feeUnitName) {
+        this.feeUnitName = feeUnitName;
+    }
+
+    public String getModifyName() {
+        return modifyName;
+    }
+
+    public void setModifyName(String modifyName) {
+        this.modifyName = modifyName;
+    }
+
     public String getfDiscountsName() {
         return fDiscountsName;
     }

+ 7 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TFeesMapper.java

@@ -87,4 +87,11 @@ public interface TFeesMapper {
      * @return
      */
     public TFees selectTFeesByFName(String fName);
+    /**
+     * 查询费用信息列表
+     *
+     * @param tFees 费用信息
+     * @return 费用信息集合
+     */
+    public List<TFees> selectTFeesAnPinList(TFees tFees);
 }

+ 7 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/ITFeesService.java

@@ -72,4 +72,11 @@ public interface ITFeesService {
      * @return
      */
     public String checkUFNnameUnique(TFees tFees);
+    /**
+     * 查询费用信息列表
+     *
+     * @param tFees 费用信息
+     * @return 费用信息集合
+     */
+    public List<TFees> selectTFeesAnPinList(TFees tFees);
 }

+ 5 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/impl/TFeesServiceImpl.java

@@ -149,4 +149,9 @@ public class TFeesServiceImpl implements ITFeesService {
         }
         return UserConstants.UNIQUE;
     }
+
+    @Override
+    public List<TFees> selectTFeesAnPinList(TFees tFees) {
+        return tFeesMapper.selectTFeesAnPinList(tFees);
+    }
 }

+ 53 - 0
ruoyi-warehouse/src/main/resources/mapper/basicData/TFeesMapper.xml

@@ -181,5 +181,58 @@
         from t_fees
         where f_name = #{fAame}
     </select>
+    <select id="selectTFeesAnPinList" parameterType="TFees" resultMap="TFeesResult">
+        SELECT
+        tf.f_id,
+        tf.f_no,
+        tf.f_name,
+        tf.f_feetype,
+        sd.dict_label feeTypeName,
+        tf.f_feeunitid,
+        st.dict_label feeUnitName,
+        tf.f_currency,
+        tf.f_status,
+        tf.del_flag,
+        tf.create_by,
+        tf.create_time,
+        tf.update_by,
+        tf.update_time,
+        tf.remark,
+        tf.f_dc,
+        tf.is_modify,
+        tf.f_tax_sort,
+        tf.f_tax_code,
+        tf.f_tax_rate,
+        tf.f_tax_tag,
+        tf.f_discounts,
+        CASE
+
+        WHEN tf.f_discounts = '0' THEN
+        '是' ELSE '否'
+        END AS fDiscountsName,
+        CASE
+
+        WHEN tf.is_modify = 'T' THEN
+        '允许' ELSE '不允许'
+        END AS modifyName
+        FROM
+        t_fees tf
+        LEFT JOIN sys_dict_data sd ON sd.dict_value = tf.f_feetype
+        LEFT JOIN sys_dict_data st ON st.dict_value = tf.f_feeunitid
+        WHERE
+        sd.dict_type = 'data_cost_attribute'
+        AND st.dict_type = 'data_unitfees'
+        <where>
+            <if test="fNo != null  and fNo != ''">and tf.f_no like concat('%', #{fNo}, '%')</if>
+            <if test="fName != null  and fName != ''">and tf.f_name like concat('%', #{fName}, '%')</if>
+            <if test="fFeetype != null  and fFeetype != ''">and tf.f_feetype = #{fFeetype}</if>
+            <if test="fFeeunitid != null ">and tf.f_feeunitid = #{fFeeunitid}</if>
+            <if test="isModify != null  and isModify != ''">and tf.is_modify = #{isModify}</if>
+            <if test="fCurrency != null  and fCurrency != ''">and tf.f_currency like concat('%', #{fCurrency}, '%')</if>
+            <if test="fStatus != null  and fStatus != ''">and tf.f_status = #{fStatus}</if>
+            <if test="fDc != null  and fDc != ''">and tf.f_dc like concat('%', #{fDc}, '%')</if>
+        </where>
+        ORDER BY CONVERT(f_name USING gbk) asc
+    </select>
 
 </mapper>