Prechádzať zdrojové kódy

提交git忽略文件及增加场地直发相关后台代码

buck 3 rokov pred
rodič
commit
863ed83e4e

+ 34 - 0
.gitignore

@@ -0,0 +1,34 @@
+# Compiled class file
+*.class
+*.classpath
+*.factorypath
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+# IDE Files #
+*.iml
+.idea
+.idea/
+.project
+.settings
+target
+.DS_Store
+

+ 362 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseInAndOutStockController.java

@@ -0,0 +1,362 @@
+package com.ruoyi.web.controller.warehouse.warehouseBusiness;
+
+import com.ruoyi.common.annotation.DataScope;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.annotation.RepeatSubmit;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.model.LoginUser;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.framework.web.service.TokenService;
+import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
+import com.ruoyi.warehouseBusiness.excel.OutStock;
+import com.ruoyi.warehouseBusiness.service.ITWarehouseBillsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 仓库详情主表Controller
+ *
+ * @author ruoyi
+ * @date 2020-12-11
+ */
+@RestController
+@RequestMapping("/warehouseBusiness/inAndOutStock")
+public class TWarehouseInAndOutStockController extends BaseController {
+    @Autowired
+    private ITWarehouseBillsService itWarehouseBillsService;
+
+    /**
+     * 查询场地直装详情主表列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:inAndOutStock:list')")
+    @DataScope(deptAlias = "d", userAlias = "u")
+    @GetMapping("/list")
+    public TableDataInfo list(TWarehouseBills tWarehouseBills) {
+        startPage();
+        tWarehouseBills.setfBilltype("CDZZ");//场地直装的单据类型编码
+        List<Map<String, Object>> list = itWarehouseBillsService.selectWarehouseBusinessList(tWarehouseBills);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询场地直装详情主表列表
+     */
+    @GetMapping("/getWarehouseOutStock")
+    @DataScope(deptAlias = "d", userAlias = "u")
+    public String getWarehouseOutStockBillsNo(TWarehouseBills tWarehouseBills) {
+        return itWarehouseBillsService.getWarehouseOutStockBillsNo(tWarehouseBills);
+    }
+
+    /**
+     * 计算场地直装仓储费
+     */
+    @GetMapping("/calculateOutStockFee/{fId}")
+    public AjaxResult calculateOutStockFee(@PathVariable("fId") Long fId) {
+        return itWarehouseBillsService.calculateOutStockFee(fId);
+    }
+
+    /**
+     * 场地直装提交
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:add')")
+    @Log(title = "详情主表", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/warehouseSubmission")
+    @RepeatSubmit
+    public AjaxResult warehouseSubmission(@RequestParam("warehouseBills") String tWarehouseBills,
+                                          @RequestParam("tEnclosure") String tEnclosure,
+                                          @RequestParam("tCntr") String tCntr,
+                                          @RequestParam("warehousebillsfeesCr") String tWarehousebillsfeesCr,
+                                          @RequestParam("warehousebillsfeesDr") String tWarehousebillsfeesDr,
+                                          @RequestParam("warehousebillsitems") String tWarehousebillsitems) {
+        String billsType = "CDZZ";
+        if (StringUtils.isNull(tWarehouseBills) || "{}".equals(tWarehouseBills)) {
+            return AjaxResult.error("未找到仓库主表数据,请确认");
+        }
+        /*if (StringUtils.isNull(tWarehousebillsitems) || "[]".equals(tWarehousebillsitems)) {
+            return AjaxResult.error("未找到仓库明细数据,请确认");
+        }*/
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return itWarehouseBillsService.warehouseSubmission(tWarehouseBills, tWarehousebillsfeesCr,
+                tWarehousebillsfeesDr, tWarehousebillsitems, tEnclosure, loginUser, tCntr, billsType);
+    }
+
+    /**
+     * 提交仓库主表审批
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:inStock:add')")
+    @Log(title = "详情主表", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/submitWarehousingApproval")
+    @RepeatSubmit
+    public AjaxResult submitWarehousingApproval(@RequestParam("tWarehouseBills") String tWarehouseBills,
+                                                @RequestParam("tEnclosure") String tEnclosure,
+                                                @RequestParam("tCntr") String tCntr,
+                                                @RequestParam("tWarehousebillsfeesCr") String tWarehousebillsfeesCr,
+                                                @RequestParam("tWarehousebillsfeesDr") String tWarehousebillsfeesDr,
+                                                @RequestParam("tWarehousebillsitems") String tWarehousebillsitems) {
+        String billsType = "CDZZ";
+        if (StringUtils.isNull(tWarehouseBills) || "{}".equals(tWarehouseBills)) {
+            return AjaxResult.error("未找到仓库主表数据,请确认");
+        }
+        return itWarehouseBillsService.submitWarehousingApproval(tWarehouseBills, tWarehousebillsfeesCr,
+                tWarehousebillsfeesDr, tWarehousebillsitems, tEnclosure, tCntr, billsType);
+    }
+
+    /**
+     * 撤销已审核通过的接单场地直装信息
+     */
+    @Log(title = "详情主表", businessType = BusinessType.UPDATE)
+    @GetMapping("/withdrawOrdersById/{fId}")
+    @RepeatSubmit
+    public AjaxResult withdrawOrdersById(@PathVariable("fId") Long fId) {
+        return itWarehouseBillsService.withdrawOrdersById(fId);
+    }
+
+    /**
+     * 导出场地直装详情主表列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:export')")
+    @Log(title = "详情主表", businessType = BusinessType.EXPORT)
+    @DataScope(deptAlias = "d", userAlias = "u")
+    @GetMapping("/export")
+    public AjaxResult export(TWarehouseBills tWarehouseBills)throws Exception  {
+        tWarehouseBills.setfBilltype("SJCK");
+        List<OutStock> list = itWarehouseBillsService.outStockExport(tWarehouseBills);
+        ExcelUtil<OutStock> util = new ExcelUtil<>(OutStock.class);
+        return util.exportExcel(list, "场地直装");
+    }
+
+    /**
+     * 获取场地直装仓库详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:query')")
+    @GetMapping(value = "/{fId}")
+    @RepeatSubmit
+    public AjaxResult getInfo(@PathVariable("fId") Long fId) {
+        return AjaxResult.success(itWarehouseBillsService.selectTWarehousebillsById(fId));
+    }
+
+    /**
+     * 场地直装暂存
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:add')")
+    @Log(title = "详情主表", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/add")
+    @RepeatSubmit
+    public AjaxResult add(@RequestParam("warehouseBills") String tWarehouseBills,
+                          @RequestParam("tEnclosure") String tEnclosure,
+                          @RequestParam("tCntr") String tCntr,
+                          @RequestParam("warehousebillsfeesCr") String tWarehousebillsfeesCr,
+                          @RequestParam("warehousebillsfeesDr") String tWarehousebillsfeesDr,
+                          @RequestParam("warehousebillsitems") String tWarehousebillsitems,
+                          @RequestParam("mblnoStatus") String mblnoStatus) {
+        String billsType = "CDZZ";
+        if (StringUtils.isEmpty(tWarehouseBills) || "{}".equals(tWarehouseBills)) {
+            return AjaxResult.error("提交失败:请检查主表数据");
+        }
+        if (StringUtils.isEmpty(mblnoStatus)) {
+            // 判断是提单号是否在一天当中出现第二次或以上
+            AjaxResult result = itWarehouseBillsService.selectContainMblno(tWarehouseBills, billsType);
+            String ajaxCode = result.get("code").toString();
+            if ("500".equals(ajaxCode)) {
+                return result;
+            }
+        }
+        // 获取当前的用户
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return itWarehouseBillsService.insertTWarehousebills(tWarehouseBills, tWarehousebillsfeesCr,
+                tWarehousebillsfeesDr, tWarehousebillsitems, tEnclosure, loginUser, tCntr, billsType);
+    }
+
+
+    /**
+     * 修改场地直装详情主表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:edit')")
+    @Log(title = "详情主表", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @RepeatSubmit
+    public AjaxResult edit(@RequestBody TWarehouseBills tWarehouseBills) {
+        return toAjax(itWarehouseBillsService.updateTWarehousebills(tWarehouseBills));
+    }
+
+    /**
+     * 删除场地直装详情主表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:remove')")
+    @Log(title = "详情主表", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{fIds}")
+    @RepeatSubmit
+    public AjaxResult remove(@PathVariable Long[] fIds) {
+        return itWarehouseBillsService.deleteTWarehousebillsByIds(fIds);
+    }
+
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:remove')")
+    @Log(title = "详情主表", businessType = BusinessType.DELETE)
+    @DeleteMapping("/queryRemove/{fId}")
+    public AjaxResult queryRemove(@PathVariable("fId") Long fId) {
+        return itWarehouseBillsService.queryRemove(fId);
+    }
+
+
+    /**
+     *  撤销场地直装信息
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:revoke')")
+    @Log(title = "详情主表", businessType = BusinessType.UPDATE)
+    @GetMapping("/get/{fId}")
+    @RepeatSubmit
+    public AjaxResult revoke(@PathVariable("fId") Long fId) {
+        String  billsType="SJCKRevoke";
+        // 获取当前的用户
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return itWarehouseBillsService.revokeTWarehousebillsById(fId,loginUser,billsType);
+    }
+
+
+    /**
+     * 撤销入库信息
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:edit')")
+    @Log(title = "详情主表", businessType = BusinessType.UPDATE)
+    @GetMapping("/withdrawById/{fId}")
+    @RepeatSubmit
+    public AjaxResult withdrawById(@PathVariable("fId") Long fId) {
+        // 查询是否对账、收费、付费
+        int result = itWarehouseBillsService.derecognition(fId);
+        if(result == 1){
+            return AjaxResult.error("撤销请核失败,财务已对账");
+        } else if (result == 2){
+            return AjaxResult.error("撤销请核失败,财务已收费");
+        } else if (result == 3){
+            return AjaxResult.error("撤销请核失败,财务已付费");
+        }
+        String billsType = "SJCKRevoke";
+        // 获取当前的用户
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return itWarehouseBillsService.revokeTWarehousebillsById(fId, loginUser, billsType);
+    }
+
+    /**
+     * 撤销场地直装库
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:add')")
+    @Log(title = "详情主表", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/updateCredit")
+    @RepeatSubmit
+    public AjaxResult deleteCredit(@RequestParam("warehouseBills") String warehouseBills,
+                                   @RequestParam("tEnclosure") String tEnclosure,
+                                   @RequestParam("tCntr") String tCntr,
+                                   @RequestParam("warehousebillsfeesCr") String warehousebillsfeesCr,
+                                   @RequestParam("warehousebillsfeesDr") String warehousebillsfeesDr,
+                                   @RequestParam("warehousebillsitems") String warehousebillsitems) {
+        String billsType = "SJCKRevoke";
+        // 获取当前的用户
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return itWarehouseBillsService.revokeTWarehousebillsById1(warehouseBills, warehousebillsitems,
+                tEnclosure, warehousebillsfeesCr, warehousebillsfeesDr, loginUser, tCntr, billsType);
+    }
+
+    /**
+     *  打印作业单  状态 改为 -->  待场地直装
+     *      生成 流水号 --> log 记录 20
+     *      waitWarehousing
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:add')")
+    @Log(title = "详情主表", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/waitWarehousing")
+    @RepeatSubmit
+    public AjaxResult waitWarehousing(@RequestParam("warehouseBills") String warehouseBills,
+                                      @RequestParam("tEnclosure") String tEnclosure,
+                                      @RequestParam("tCntr") String tCntr,
+                                      @RequestParam("warehousebillsfeesCr") String warehousebillsfeesCr,
+                                      @RequestParam("warehousebillsfeesDr") String warehousebillsfeesDr,
+                                      @RequestParam("warehousebillsitems") String warehousebillsitems) {
+        Long billsType = 20L;
+        // 获取当前的用户
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return itWarehouseBillsService.waitWarehousing(warehouseBills, warehousebillsitems,
+                tEnclosure, warehousebillsfeesCr, warehousebillsfeesDr, loginUser, tCntr, billsType , "CK");
+    }
+
+    /**
+     *   装货      状态 改为 -->  装货中
+     *                   log 记录 30
+     *      ischargeCargo
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:add')")
+    @Log(title = "详情主表", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/ischargeCargo")
+    @RepeatSubmit
+    public AjaxResult ischargeCargo(@RequestParam("warehouseBills") String warehouseBills,
+                                    @RequestParam("tEnclosure") String tEnclosure,
+                                    @RequestParam("tCntr") String tCntr,
+                                    @RequestParam("warehousebillsfeesCr") String warehousebillsfeesCr,
+                                    @RequestParam("warehousebillsfeesDr") String warehousebillsfeesDr,
+                                    @RequestParam("warehousebillsitems") String warehousebillsitems) {
+        Long billsType = 30L;
+        // 获取当前的用户
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return itWarehouseBillsService.waitWarehousing(warehouseBills, warehousebillsitems,
+                tEnclosure, warehousebillsfeesCr, warehousebillsfeesDr, loginUser, tCntr, billsType,"1");
+    }
+
+
+    /**
+     *   场地直装确认   状态 改为 -->  已场地直装
+     *                   log 记录 40
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:add')")
+    @Log(title = "详情主表", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/addCredit")
+    @RepeatSubmit
+    public AjaxResult addCredit(@RequestParam("warehouseBills") String warehouseBills,
+                                @RequestParam("tEnclosure") String tEnclosure,
+                                @RequestParam("tCntr") String tCntr,
+                                @RequestParam("warehousebillsfeesCr") String warehousebillsfeesCr,
+                                @RequestParam("warehousebillsfeesDr") String warehousebillsfeesDr,
+                                @RequestParam("warehousebillsitems") String warehousebillsitems) {
+        String billsType = "SJCK";
+        if (StringUtils.isNull(warehouseBills) || "{}".equals(warehouseBills)) {
+            return AjaxResult.error("未找到主表信息,请确认");
+        }
+        if (StringUtils.isNull(warehousebillsitems) || "[]".equals(warehousebillsitems)) {
+            return AjaxResult.error("未找到明细信息,请确认");
+        }
+        // 获取当前的用户
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return itWarehouseBillsService.updateCredit(warehouseBills, warehousebillsitems, tEnclosure,
+                warehousebillsfeesCr, warehousebillsfeesDr, loginUser, tCntr, billsType);
+    }
+
+    /**
+     *   明細流水号
+     */
+    @PostMapping(value = "/serialNumber")
+    public AjaxResult serialNumber() {
+        String billsType = "CDZZ";
+        return itWarehouseBillsService.serialNumber(billsType);
+    }
+    /**
+     * 场地直装明细提交审批确认
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:inStock:add')")
+    @Log(title = "详情主表", businessType = BusinessType.INSERT)
+    @GetMapping(value = "/addDetails/{fId}")
+    @RepeatSubmit
+    public AjaxResult addDetails(@PathVariable("fId") Long fId) {
+        String billsType = "CDZZITEM";
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return itWarehouseBillsService.addDetails(fId, billsType,loginUser);
+    }
+
+}

+ 14 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsitems.java

@@ -339,8 +339,21 @@ public class TWarehousebillsitems extends BaseEntity {
 
     //报关单号
     private String fCustomno;
+    
+    /**
+     * 场地直装,D:入库明细 C 出库明细
+     */
+    private String fDc;
+    
+    public String getfDc() {
+		return fDc;
+	}
+
+	public void setfDc(String fDc) {
+		this.fDc = fDc;
+	}
 
-    public Long getfCartypeId() {
+	public Long getfCartypeId() {
         return fCartypeId;
     }
 

+ 3 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/BillnoSerialServiceImpl.java

@@ -43,7 +43,7 @@ public class BillnoSerialServiceImpl implements IBillnoSerialService {
     /**
      * 获取业务编号
      *
-     * @param billType 编号类型(SJRK(入库) SJCK(实际出库) CKDB(调拨) HQZY(货权转移))
+     * @param billType 编号类型(SJRK(入库) SJCK(实际出库) CKDB(调拨) HQZY(货权转移)CDZZ(场地直装))
      * @param time     入库时间
      * @return 结果
      */
@@ -117,6 +117,8 @@ public class BillnoSerialServiceImpl implements IBillnoSerialService {
             billNo = "invoiceFP" + billNo;
         }else if ("INV".equals(billType)) {
             billNo = "INV" + billNo;
+        }else if ("CDZZ".equals(billType)) {
+            billNo = "ZZ" + billNo;
         }
         return billNo;
     }

+ 4 - 0
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -381,6 +381,10 @@
                 AND dictIn.dict_type = 'st_trans_type'
                 AND dictIn.status = '0'
             </if>
+            <if test="fBilltype != null  and fBilltype == 'CDZZ'"><!-- 场地直装 仿出库 -->
+                AND dictIn.dict_type = 'st_out_type'
+                AND dictIn.status = '0'
+            </if>
             <if test="fBillstatus != null  and fBillstatus != ''">and bill.f_billstatus = #{fBillstatus}</if>
             <if test="fItemsStatus != null  and fItemsStatus != ''">and bill.f_items_status = #{fItemsStatus}</if>
             <if test="createBy != null and createBy != ''">and bill.create_by = #{createBy}</if>

+ 9 - 3
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsMapper.xml

@@ -68,6 +68,7 @@
         <result property="fNowCarton"  column="f_now_carton" />
         <result property="fItemstatus"    column="f_itemstatus"    />
         <result property="fCartypeId"    column="f_cartype_id"    />
+        <result property="fDc"    column="f_dc"    />
     </resultMap>
 
     <sql id="selectTWarehousebillsitemsVo">
@@ -77,7 +78,7 @@
            del_flag, create_by, create_time, update_by, update_time, remark, f_inventory_days, f_storage_fee_deadline, f_amt, f_billing_days,
             f_driver_name, f_driver_tel, f_driver_id_car, f_serial_number, f_is_pass, f_billtype, f_billing_qty, f_billing_deadline, f_business_type,
              f_is_inventory, f_warehouse_information, f_orgwarehouse_information, f_labour, f_fleet, f_stevedore, f_lntype, f_forkliftman,
-              f_localcntrno, f_sealno,f_now_carton,f_itemstatus,f_cartype_id from t_warehousebillsitems
+              f_localcntrno, f_sealno,f_now_carton,f_itemstatus,f_cartype_id,f_dc from t_warehousebillsitems
     </sql>
 
     <select id="selectTWarehousebillsitemsList" parameterType="TWarehousebillsitems"
@@ -130,6 +131,7 @@
             <if test="fDriverIdCar != null  and fDriverIdCar != ''">and f_driver_id_car = #{fDriverIdCar}</if>
             <if test="fSerialNumber != null  and fSerialNumber != ''">and f_serial_number = #{fSerialNumber}</if>
             <if test="fIsPass != null  and fIsPass != ''">and f_is_pass = #{fIsPass}</if>
+            <if test="fDc != null  and fDc != ''">and f_dc = #{fDc}</if>
         </where>
     </select>
 
@@ -192,7 +194,8 @@
             item.f_warehouse_information AS fWarehouseInformation,
             item.f_orgwarehouse_information AS fOrgwarehouseInformation,
             item.f_now_carton AS fNowCarton,
-            item.f_cartype_id AS fCartypeId
+            item.f_cartype_id AS fCartypeId,
+            item.f_dc AS fDc
         FROM
             t_warehousebills w
             LEFT JOIN t_warehousebillsitems item ON item.f_pid = w.f_id
@@ -276,7 +279,8 @@
             <if test="fSealno != null">f_sealno,</if>
             <if test="fNowCarton != null">f_now_carton,</if>
             <if test="fItemstatus != null">f_itemstatus,</if>
-            <if test="fCartypeId != null">f_cartype_id,</if>
+            <if test="fCartypeId != null">f_cartype_id,</if> 
+            <if test="fDc != null">f_dc,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fPid != null">#{fPid},</if>
@@ -341,6 +345,7 @@
             <if test="fNowCarton != null">#{fNowCarton},</if>
             <if test="fItemstatus != null">#{fItemstatus},</if>
             <if test="fCartypeId != null">#{fCartypeId},</if>
+            <if test="fDc != null">#{fDc},</if>
         </trim>
     </insert>
 
@@ -409,6 +414,7 @@
             <if test="fNowCarton != null">f_now_carton = #{fNowCarton},</if>
             <if test="fItemstatus != null">f_itemstatus = #{fItemstatus},</if>
             <if test="fCartypeId != null">f_cartype_id = #{fCartypeId},</if>
+            <if test="fDc != null">f_dc = #{fDc},</if>     
         </trim>
         where f_id = #{fId}
     </update>