YYC
2024-12-23 3697ca81ae651e6087706668744f5b67535f9f40
数据调整
已添加6个文件
已修改8个文件
1988 ■■■■■ 文件已修改
src/main/java/com/fzzy/api/entity/Api9201.java 198 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/api/view/repository/Api9201Rep.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/async/fzzy40/Fzzy40SyncService13.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1023.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1310.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync9201.java 182 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/async/fzzy40/repository/Fzzy40Sync9201Rep.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/otherview/gd2022/GdApi9201.view.xml 1105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/otherview/gd2022/pr/GDApi1023PR.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/otherview/gd2022/pr/GDApi9201PR.java 239 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/push/gd2022/ApiCodeConstant.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/web/TestController.java 184 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/templates/home/home.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/api/entity/Api9201.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,198 @@
package com.fzzy.api.entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.bstek.dorado.annotation.PropertyDef;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fzzy.push.gd2022.dto.Gd2022Api1023Dtl;
import com.fzzy.push.gd2022.dto.Gd2022Api1023People;
import com.fzzy.push.gd2022.dto.Gd2022Api1023Way;
import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
 * ç†è’¸å¤‡æ¡ˆä¸»è¡¨ä¿¡æ¯
 *
 * @Author:YAN
 */
@Entity
@Data
@Table(name = "API_9201")
public class Api9201 extends ApiParent implements Serializable {
    @Id
    @Column(name = "id", length = 12)
    @PropertyDef(label = "id", description = "入库日期+4位顺序号")
    private String id;
    @Column(name = "xzbm", length = 4)
    @PropertyDef(label = "熏蒸备案编号", description = "4位顺序号")
    private String xzbm;
    @Column(name = "kqdm", length = 21)
    @PropertyDef(label = "库区代码")
    private String kqdm;
    @Column(name = "kqmc", length = 21)
    @PropertyDef(label = "库区名称")
    private String kqmc;
    @Column(name = "tbrq")
    @PropertyDef(label = "填报日期")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date tbrq;
    @Column(name = "dwdm", length = 18)
    @PropertyDef(label = "单位代码", description = "企业信用代码")
    private String dwdm;
    @Column(name = "dwmc", length = 18)
    @PropertyDef(label = "单位名称")
    private String dwmc;
    @Column(name = "sqxzrq")
    @PropertyDef(label = "申请熏蒸日期")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date sqxzrq;
    @Column(name = "fzr", length = 20)
    @PropertyDef(label = "负责人")
    private String fzr;
    @Column(name = "fzrdh", length = 11)
    @PropertyDef(label = "负责人电话")
    private String fzrdh;
    @Column(name = "xcfzr", length = 20)
    @PropertyDef(label = "现场负责人")
    private String xcfzr;
    @Column(name = "fzrzw", length = 10)
    @PropertyDef(label = "现场负责人职务")
    private String xcfzrzw;
    @Column(name = "xcfzrdh", length = 11)
    @PropertyDef(label = "现场负责人电话")
    private String xcfzrdh;
    @Column(name = "tbr", length = 20)
    @PropertyDef(label = "填表人")
    private String tbr;
    @Column(name = "tbrdh", length = 11)
    @PropertyDef(label = "填表人电话")
    private String tbrdh;
    @Column(name = "sfszjjxd", length = 2)
    @PropertyDef(label = "是否设置警戒线(东)", description = "是或否")
    private String sfszjjxd;
    @Column(name = "sfszjjxx", length = 2)
    @PropertyDef(label = "是否设置警戒线(西)", description = "是或否")
    private String sfszjjxx;
    @Column(name = "sfszjjxn", length = 2)
    @PropertyDef(label = "是否设置警戒线(南)", description = "是或否")
    private String sfszjjxn;
    @Column(name = "sfszjjxb", length = 2)
    @PropertyDef(label = "是否设置警戒线(北)", description = "是或否")
    private String sfszjjxb;
    @Column(name = "ssxzzystqybqk", length = 1024)
    @PropertyDef(label = "实施熏蒸作业时天气预报情况")
    private String ssxzzystqybqk;
    @Column(name = "xzssgcap", length = 1024)
    @PropertyDef(label = "熏蒸安排及实施过程")
    private String xzssgcap;
    @Column(name = "aqfhjyjcccs", length = 1024)
    @PropertyDef(label = "安全防护及应急处置措施")
    private String aqfhjyjcccs;
    @Column(name = "xzzysx", length = 1024)
    @PropertyDef(label = "熏蒸注意事项")
    private String xzzysx;
    @Column(name = "fileStorageId", length = 19)
    @PropertyDef(label = "文件存储ID")
    private String fileStorageId;
    @Column(name = "yjmc", length = 64)
    @PropertyDef(label = "药剂名称")
    private String yjmc;
    @Column(name = "yjlx", length = 10)
    @PropertyDef(label = "药剂类型/型号")
    private String yjlx;
    @Column(name = "yjyxqz")
    @PropertyDef(label = "药剂有效期至")
    private Date yjyxqz;
    @Column(name = "lqsl", precision = 20, scale = 3)
    @PropertyDef(label = "领取数量", description = "公斤")
    private Double lqsl;
    @Column(name = "sysbjfs", length = 20)
    @PropertyDef(label = "施药设备及方式")
    private String sysbjfs;
    @Column(name = "zcdd", length = 30)
    @PropertyDef(label = "暂存地点")
    private String zcdd;
    @Column(name = "lqr", length = 20)
    @PropertyDef(label = "领取人")
    private String lqr;
    @Column(name = "lqrq")
    @PropertyDef(label = "领取时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date lqrq;
    @Column(name = "czbz", length = 1)
    @PropertyDef(label = "操作标志")
    private String czbz;
    @Column(name = "zhgxsj")
    @PropertyDef(label = "更新时间")
    private Date zhgxsj;
    @Column(name = "dtl", length = 2000)
    @PropertyDef(label = "粮情明细表")
    private String dtl;
    @Column(name = "way", length = 2000)
    @PropertyDef(label = "熏蒸备案方式")
    private String way;
    @Column(name = "people", length = 2000)
    @PropertyDef(label = "粮情明细表")
    private String people;
    /**
     * å‚¨ç²®ç²®æƒ…明细表
     */
    @Transient
    private List<Gd2022Api1023Dtl> dtls;
    /**
     * ç†è’¸å¤‡æ¡ˆæ–¹å¼
     */
    @Transient
    private List<Gd2022Api1023Way> ways;
    /**
     * ç†è’¸ä½œä¸šäººå‘˜
     */
    @Transient
    private List<Gd2022Api1023People> peoples;
}
src/main/java/com/fzzy/api/view/repository/Api9201Rep.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
package com.fzzy.api.view.repository;
import com.fzzy.api.entity.Api1307;
import com.fzzy.api.entity.Api9201;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
public interface Api9201Rep extends JpaRepository<Api9201, String>, JpaSpecificationExecutor<Api9201> {
    /**
     * æ ¹æ®è¡¨å•主键更新操作标志状态
     *
     * @param dwdm ä¸»é”®ID
     * @param czbz æ“ä½œæ ‡å¿—
     * @return
     */
    @Transactional
    @Modifying
    @Query("update Api9201 set czbz =:czbz where dwdm =:dwdm ")
    int updateStatus(@Param("dwdm") String dwdm, @Param("czbz") String czbz);
    @Query("from Api9201 where kqdm=:kqdm and zhgxsj >=:start and zhgxsj <:end order by zhgxsj ")
    List<Api9201> findPushDataByTime(@Param("kqdm") String kqdm, @Param("start") Date start, @Param("end") Date end);
    @Query("from Api9201 where bizId=:bizId ")
    List<Api9201> getDataByBizId(@Param("bizId") String bizId);
}
src/main/java/com/fzzy/async/fzzy40/Fzzy40SyncService13.java
@@ -36,6 +36,8 @@
    @Autowired
    private Fzzy40Sync1311 fzzySync1311;
    @Autowired
    private Fzzy40Sync9201 fzzySync9201;
    @Autowired
    private Fzzy40Sync2103 fzzy40Sync2103;
    @Override
@@ -48,10 +50,11 @@
        /*-----各省独有接口信息同步-----*/
        if (StringUtils.isNotEmpty(param.getPushProtocol()) && PushProtocol.SB_GD_2022.getCode().equals(param.getPushProtocol())) {
        if (StringUtils.isNotEmpty(param.getPushProtocol()) && (PushProtocol.SB_GD_2022.getCode().equals(param.getPushProtocol())||PushProtocol.SB_GD_2023.getCode().equals(param.getPushProtocol()))) {
            //广东省平台2022版,需要同步熏蒸备案信息
            //熏蒸备案数据同步
            fzzySync1023.syncData(param.getKqdm(), param.getDeptId(), param.getStart(), param.getEnd());
            fzzySync9201.syncData(param.getKqdm(), param.getDeptId(), param.getStart(), param.getEnd());
        }
        if (StringUtils.isNotEmpty(param.getPushProtocol()) && PushProtocol.SB_SH_2023.getCode().equals(param.getPushProtocol())) {
            //上海市平台2023版,需要同步粮情设备配置信息
src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1023.java
@@ -75,7 +75,7 @@
        apiLog.setType(ApiLog.TYPE_SYNC);
        apiLog.setKqdm(deptId);
        apiLog.setUploadTime(new Date());
        apiLog.setInteId(ApiCodeConstant.API_1023);
        apiLog.setInteId(ApiCodeConstant.API_9201);
        apiLog.setStatus(99);
        apiLog.setId(ContextUtil.getUUID());
        try {
src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1310.java
@@ -103,7 +103,7 @@
                //粮食等级
                mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSDJ, fz40Quality.getFoodLevel());
                api1310.setLsdjdm(mappingCode);
                api1310.setRkrq(DateUtils.addDays(fz40Quality.getTime(), -30));
                api1310.setRkrq(fz40Quality.getStoreDate());
                api1310.setJylb(fz40Quality.getType());
                api1310.setJysj(fz40Quality.getTime());
                api1310.setJydw(fz40Quality.getUser());
src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync9201.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,182 @@
package com.fzzy.async.fzzy40.impl;
import com.alibaba.fastjson2.JSON;
import com.fzzy.api.Constant;
import com.fzzy.api.entity.*;
import com.fzzy.api.service.ApiCommonService;
import com.fzzy.api.service.ApiTriggerService;
import com.fzzy.api.utils.ContextUtil;
import com.fzzy.api.view.repository.*;
import com.fzzy.async.fzzy40.entity.Fz40DrugLogApply;
import com.fzzy.async.fzzy40.entity.Fz40DrugLogDtl;
import com.fzzy.async.fzzy40.entity.Fz40DrugLogPeople;
import com.fzzy.async.fzzy40.repository.*;
import com.fzzy.push.gd2022.ApiCodeConstant;
import com.fzzy.push.gd2022.dto.Gd2022Api1023Dtl;
import com.fzzy.push.gd2022.dto.Gd2022Api1023People;
import com.fzzy.push.gd2022.dto.Gd2022Api1023Way;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * ç†è’¸å¤‡æ¡ˆä¿¡æ¯
 *
 * @Author:YAN
 */
@Slf4j
@Component
public class Fzzy40Sync9201 {
    @Autowired
    private Api1101Rep api1101Rep;
    @Autowired
    private Api1102Rep api1102Rep;
    @Autowired
    private Fzzy40Sync9201Rep fzzy40Sync9201Rep;
    @Autowired
    private Fzzy40SyncDrugLogPeopleRep drugLogPeopleRep;
    @Autowired
    private Fzzy40SyncDrugLogDtlRep drugLogDtlRep;
    @Autowired
    private ApiLogRep apiLogRep;
    @Autowired
    private ApiCommonService commonService;
    @Autowired
    private ApiTriggerService apiTriggerService;
    @Autowired
    private Api9201Rep api9201Rep;
    /**
     * åŒæ­¥ç†è’¸å¤‡æ¡ˆä¿¡æ¯
     *
     * @param deptId
     * @param start
     * @param end
     */
    public void syncData(String kqdm, String deptId, Date start, Date end) {
        log.info("-------------9201接口熏蒸备案信息开始同步------------------");
        //同步数据,只记录失败的信息
        ApiLog apiLog = new ApiLog();
        apiLog.setType(ApiLog.TYPE_SYNC);
        apiLog.setKqdm(deptId);
        apiLog.setUploadTime(new Date());
        apiLog.setInteId(ApiCodeConstant.API_9201);
        apiLog.setStatus(99);
        apiLog.setId(ContextUtil.getUUID());
        try {
            List<Fz40DrugLogApply> list = fzzy40Sync9201Rep.listDrugLogApply(deptId, start, end);
            if (null == list || list.isEmpty()) {
                log.info("-------------没有获取到熏蒸备案信息------------------");
                return;
            }
            List<Gd2022Api1023Dtl> dtlList;
            List<Gd2022Api1023Way> wayList;
            List<Gd2022Api1023People> peopleList;
            List<Api9201> api9201List;
            Api9201 api9201;
            Gd2022Api1023Dtl api9201Dtl;
            Gd2022Api1023Way api9201Way;
            Gd2022Api1023People api9201People;
            for (Fz40DrugLogApply data : list) {
                api9201 = new Api9201();
                BeanUtils.copyProperties(data, api9201);
                api9201.setBizId(data.getXzbm());
                api9201.setId(data.getXzbm());
                api9201.setXzbm(data.getXzbm().substring(8));
                api9201.setKqdm(kqdm);
                List<Api1102> api1102List = api1102Rep.findPushData(kqdm);
                if (null != api1102List && api1102List.size() > 0) {
                    api9201.setKqmc(api1102List.get(0).getKqmc());
                }
                api9201.setDwdm(kqdm.substring(0, 18));
                List<Api1101> api1101List = api1101Rep.findPushData(kqdm);
                if (null != api1101List && api1101List.size() > 0) {
                    api9201.setDwmc(api1101List.get(0).getDwmc());
                }
                api9201.setYjmc(data.getDrugName());
                api9201.setYjlx(data.getDrugType());
                api9201.setLqrq(data.getLqsj());
                api9201.setZhgxsj(data.getUpdateTime());
                if (data.getLqr().contains("、")) {
                    api9201.setLqr(data.getLqr().replace('、', '|'));
                }
                //储粮粮情明细表
                List<Fz40DrugLogDtl> dtls = drugLogDtlRep.listDrugLogDtl(data.getXzbm());
                Api1105 api1105 = commonService.getApi1105Cache(data.getDepotId());
                api9201Dtl = new Gd2022Api1023Dtl();
                BeanUtils.copyProperties(data, api9201Dtl);
                if (null != api1105) {
                    api9201Dtl.setCfmc(api1105.getHwmc());
                    api9201Dtl.setCfdm(api1105.getHwdm().substring(0, 25));
                }
                //粮食品种
                String mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSPZ, data.getFoodVariety());
                api9201Dtl.setLspzdm(mappingCode);
                api9201Dtl.setLsxzdm(data.getFoodType());
                api9201Dtl.setLsdjdm(data.getFoodLevel());
                api9201Dtl.setLssl(data.getNumber());
                api9201Dtl.setSf(data.getPerWet());
                api9201Dtl.setZz(data.getPerImpurity());
                dtlList = new ArrayList<>();
                dtlList.add(api9201Dtl);
                api9201.setDtl(JSON.toJSONString(dtlList));
                api9201Way = new Gd2022Api1023Way();
                BeanUtils.copyProperties(data, api9201Way);
                wayList = new ArrayList<>();
                wayList.add(api9201Way);
                api9201.setWay(JSON.toJSONString(wayList));
                List<Fz40DrugLogPeople> peoples = drugLogPeopleRep.listDrugLogPeople(data.getXzbm());
                if (null != peoples && peoples.size() > 0) {
                    peopleList = new ArrayList<>();
                    for (Fz40DrugLogPeople people : peoples) {
                        api9201People = new Gd2022Api1023People();
                        BeanUtils.copyProperties(people, api9201People);
                        api9201People.setXm(people.getMx());
                        if (StringUtils.isEmpty(people.getZyzg())) {
                            api9201People.setZyzg("培训合格");
                        }
                        peopleList.add(api9201People);
                    }
                    api9201.setPeople(JSON.toJSONString(peopleList));
                    api9201List = api9201Rep.getDataByBizId(api9201.getBizId());
                    if (null == api9201List || api9201List.isEmpty()) {
                        api9201.setCzbz(Constant.CZBZ_I);
                    } else {
                        api9201.setCzbz(api9201List.get(0).getCzbz());
                    }
                }
                api9201Rep.save(api9201);
                log.info("9201---同步数据:{}", api9201.toString());
            }
        } catch (Exception e) {
            log.error("---熏蒸备案同步执行失败----{}", e.toString());
            apiLog.setResult("熏蒸备案信息同步执行失败:" + e.getMessage());
            apiLogRep.save(apiLog);
        }
    }
}
src/main/java/com/fzzy/async/fzzy40/repository/Fzzy40Sync9201Rep.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
package com.fzzy.async.fzzy40.repository;
import com.fzzy.async.fzzy40.entity.Fz40DrugLogApply;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.util.Date;
import java.util.List;
/**
 * ç†è’¸å¤‡æ¡ˆä¿¡æ¯
 *
 * @Author:YAN
 */
public interface Fzzy40Sync9201Rep extends JpaRepository<Fz40DrugLogApply, String> {
    //查询熏蒸备案主表
    @Query("from Fz40DrugLogApply where deptId =:deptId and updateTime >=:start and updateTime <:end order by updateTime ")
    List<Fz40DrugLogApply> listDrugLogApply(@Param("deptId") String deptId, @Param("start") Date start, @Param("end") Date end);
   }
src/main/java/com/fzzy/otherview/gd2022/GdApi9201.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1105 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.api.entity.Api9201</Property>
      <PropertyDef name="bizId">
        <Property/>
        <Property name="label">业务id</Property>
      </PropertyDef>
      <PropertyDef name="kqdm">
        <Property/>
        <Property name="label">库区代码</Property>
      </PropertyDef>
      <PropertyDef name="syncTime">
        <Property name="dataType">Date</Property>
        <Property name="label">同步时间</Property>
      </PropertyDef>
      <PropertyDef name="id">
        <Property/>
        <Property name="label">id</Property>
      </PropertyDef>
      <PropertyDef name="xzbm">
        <Property/>
        <Property name="label">熏蒸备案编号</Property>
      </PropertyDef>
      <PropertyDef name="kqmc">
        <Property/>
        <Property name="label">库区名称</Property>
      </PropertyDef>
      <PropertyDef name="tbrq">
        <Property name="dataType">Date</Property>
        <Property name="label">填报日期</Property>
      </PropertyDef>
      <PropertyDef name="dwdm">
        <Property/>
        <Property name="label">单位代码</Property>
      </PropertyDef>
      <PropertyDef name="dwmc">
        <Property/>
        <Property name="label">单位名称</Property>
      </PropertyDef>
      <PropertyDef name="sqxzrq">
        <Property name="dataType">Date</Property>
        <Property name="label">申请熏蒸日期</Property>
      </PropertyDef>
      <PropertyDef name="fzr">
        <Property/>
        <Property name="label">负责人</Property>
      </PropertyDef>
      <PropertyDef name="fzrdh">
        <Property/>
        <Property name="label">负责人电话</Property>
      </PropertyDef>
      <PropertyDef name="xcfzr">
        <Property/>
        <Property name="label">现场负责人</Property>
      </PropertyDef>
      <PropertyDef name="xcfzrzw">
        <Property/>
        <Property name="label">现场负责人职务</Property>
      </PropertyDef>
      <PropertyDef name="xcfzrdh">
        <Property/>
        <Property name="label">现场负责人电话</Property>
      </PropertyDef>
      <PropertyDef name="tbr">
        <Property/>
        <Property name="label">填表人</Property>
      </PropertyDef>
      <PropertyDef name="tbrdh">
        <Property/>
        <Property name="label">填表人电话</Property>
      </PropertyDef>
      <PropertyDef name="sfszjjxd">
        <Property/>
        <Property name="label">是否设置警戒线(东)</Property>
      </PropertyDef>
      <PropertyDef name="sfszjjxx">
        <Property/>
        <Property name="label">是否设置警戒线(西)</Property>
      </PropertyDef>
      <PropertyDef name="sfszjjxn">
        <Property/>
        <Property name="label">是否设置警戒线(南)</Property>
      </PropertyDef>
      <PropertyDef name="sfszjjxb">
        <Property/>
        <Property name="label">是否设置警戒线(北)</Property>
      </PropertyDef>
      <PropertyDef name="ssxzzystqybqk">
        <Property/>
        <Property name="label">实施熏蒸作业时天气预报情况</Property>
      </PropertyDef>
      <PropertyDef name="xzssgcap">
        <Property/>
        <Property name="label">熏蒸安排及实施过程</Property>
      </PropertyDef>
      <PropertyDef name="aqfhjyjcccs">
        <Property/>
        <Property name="label">安全防护及应急处置措施</Property>
      </PropertyDef>
      <PropertyDef name="xzzysx">
        <Property/>
        <Property name="label">熏蒸注意事项</Property>
      </PropertyDef>
      <PropertyDef name="fileStorageId">
        <Property/>
        <Property name="label">文件存储ID</Property>
      </PropertyDef>
      <PropertyDef name="yjmc">
        <Property/>
        <Property name="label">药剂名称</Property>
      </PropertyDef>
      <PropertyDef name="yjlx">
        <Property/>
        <Property name="label">药剂类型/型号</Property>
      </PropertyDef>
      <PropertyDef name="yjyxqz">
        <Property name="dataType">Date</Property>
        <Property name="label">药剂有效期至</Property>
      </PropertyDef>
      <PropertyDef name="lqsl">
        <Property name="dataType">Double</Property>
        <Property name="label">领取数量</Property>
      </PropertyDef>
      <PropertyDef name="sysbjfs">
        <Property/>
        <Property name="label">施药设备及方式</Property>
      </PropertyDef>
      <PropertyDef name="zcdd">
        <Property/>
        <Property name="label">暂存地点</Property>
      </PropertyDef>
      <PropertyDef name="lqr">
        <Property/>
        <Property name="label">领取人</Property>
      </PropertyDef>
      <PropertyDef name="lqrq">
        <Property name="dataType">Date</Property>
        <Property name="label">领取时间</Property>
      </PropertyDef>
      <PropertyDef name="czbz">
        <Property/>
        <Property name="label">操作标志</Property>
      </PropertyDef>
      <PropertyDef name="zhgxsj">
        <Property name="dataType">Date</Property>
        <Property name="label">更新时间</Property>
      </PropertyDef>
      <PropertyDef name="dtl">
        <Property/>
        <Property name="label">粮情明细表</Property>
      </PropertyDef>
      <PropertyDef name="way">
        <Property/>
        <Property name="label">熏蒸备案方式</Property>
      </PropertyDef>
      <PropertyDef name="people">
        <Property/>
        <Property name="label">粮情明细表</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtGBArea">
      <Property name="creationType">com.fzzy.api.entity.GbArea</Property>
      <PropertyDef name="code">
        <Property></Property>
        <Property name="label">接口编码</Property>
      </PropertyDef>
      <PropertyDef name="name">
        <Property></Property>
        <Property name="label">名称</Property>
      </PropertyDef>
      <PropertyDef name="parentCode">
        <Property></Property>
        <Property name="label">父编码</Property>
      </PropertyDef>
      <PropertyDef name="disabledTag">
        <Property></Property>
        <Property name="label">禁用</Property>
      </PropertyDef>
      <PropertyDef name="simple">
        <Property></Property>
        <Property name="label">是否默认</Property>
      </PropertyDef>
      <PropertyDef name="remark">
        <Property></Property>
        <Property name="label">备注说明</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtLog">
      <Property name="creationType">com.fzzy.api.entity.ApiLog</Property>
      <PropertyDef name="id">
        <Property></Property>
      </PropertyDef>
      <PropertyDef name="kqdm">
        <Property></Property>
        <Property name="label">库区代码</Property>
      </PropertyDef>
      <PropertyDef name="inteId">
        <Property></Property>
        <Property name="label">接口编号</Property>
      </PropertyDef>
      <PropertyDef name="uploadTime">
        <Property name="dataType">Date</Property>
        <Property name="label">上传时间</Property>
      </PropertyDef>
      <PropertyDef name="status">
        <Property name="dataType">int</Property>
        <Property name="label">上传结果</Property>
      </PropertyDef>
      <PropertyDef name="result">
        <Property></Property>
        <Property name="label">返回信息</Property>
      </PropertyDef>
      <PropertyDef name="dataId">
        <Property></Property>
        <Property name="label">接口数据主键</Property>
      </PropertyDef>
      <PropertyDef name="data">
        <Property></Property>
        <Property name="label">接口报文</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtDtl">
      <Property name="creationType">com.fzzy.push.gd2022.dto.Gd2022Api1023Dtl</Property>
      <PropertyDef name="cfdm">
        <Property/>
      </PropertyDef>
      <PropertyDef name="lspzdm">
        <Property/>
      </PropertyDef>
      <PropertyDef name="lsxzdm">
        <Property/>
      </PropertyDef>
      <PropertyDef name="lsdjdm">
        <Property/>
      </PropertyDef>
      <PropertyDef name="lssl">
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="sf">
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="zz">
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="lw">
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="cw">
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="cnsd">
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="clfs">
        <Property/>
      </PropertyDef>
      <PropertyDef name="cfmc">
        <Property/>
      </PropertyDef>
      <PropertyDef name="rkrq">
        <Property name="dataType">Date</Property>
      </PropertyDef>
      <PropertyDef name="hc">
        <Property/>
      </PropertyDef>
      <PropertyDef name="cldjpd">
        <Property/>
      </PropertyDef>
      <PropertyDef name="ldtj">
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="kjtj">
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="lddwyyl">
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="kjdwyyl">
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="zyyl">
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="qmx">
        <Property/>
      </PropertyDef>
      <PropertyDef name="jhxzksrq">
        <Property name="dataType">Date</Property>
      </PropertyDef>
      <PropertyDef name="jhxzjsrq">
        <Property name="dataType">Date</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtPeople">
      <Property name="creationType">com.fzzy.push.gd2022.dto.Gd2022Api1023People</Property>
      <PropertyDef name="xm">
        <Property/>
      </PropertyDef>
      <PropertyDef name="zw">
        <Property/>
      </PropertyDef>
      <PropertyDef name="zyzg">
        <Property/>
      </PropertyDef>
      <PropertyDef name="stzk">
        <Property/>
      </PropertyDef>
      <PropertyDef name="xzrwfg">
        <Property/>
      </PropertyDef>
      <PropertyDef name="sfwb">
        <Property/>
      </PropertyDef>
    </DataType>
    <DataType name="dtWay">
      <Property name="creationType">com.fzzy.push.gd2022.dto.Gd2022Api1023Way</Property>
      <PropertyDef name="xznd">
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="mbsj">
        <Property name="dataType">Integer</Property>
      </PropertyDef>
      <PropertyDef name="xzfs">
        <Property/>
      </PropertyDef>
      <PropertyDef name="sqfs">
        <Property/>
      </PropertyDef>
    </DataType>
    <DataType name="dtParam">
      <Property name="creationType">com.fzzy.api.data.ApiParam</Property>
      <PropertyDef name="kqdm">
        <Property></Property>
        <Property name="label">所属库区</Property>
      </PropertyDef>
      <PropertyDef name="start">
        <Property name="dataType">Date</Property>
        <Property name="label">开始时间</Property>
      </PropertyDef>
      <PropertyDef name="end">
        <Property name="dataType">Date</Property>
        <Property name="label">截止时间</Property>
      </PropertyDef>
      <PropertyDef name="czbz">
        <Property></Property>
        <Property name="label">操作标志</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;apiTriggerService#trigger&quot;).getResult(&quot;CZBZ&quot;)}</Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="regionPadding:10">
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataType">[dtMain]</Property>
      <Property name="dataProvider">gDApi9201PR#pageList</Property>
      <Property name="pageSize">20</Property>
    </DataSet>
    <DataSet id="dsQuery">
      <ClientEvent name="onReady">self.insert();</ClientEvent>
      <Property name="dataType">dtParam</Property>
    </DataSet>
    <AutoForm>
      <Property name="dataSet">dsQuery</Property>
      <Property name="cols">*,*,*,*</Property>
      <Property name="labelAlign">right</Property>
      <Property name="labelSeparator">:</Property>
      <Property name="labelWidth">90</Property>
      <AutoFormElement>
        <Property name="name">kqdm</Property>
        <Property name="property">kqdm</Property>
        <Editor/>
      </AutoFormElement>
      <AutoFormElement>
        <Property name="name">start</Property>
        <Property name="property">start</Property>
        <Editor/>
      </AutoFormElement>
      <AutoFormElement>
        <Property name="name">end</Property>
        <Property name="property">end</Property>
        <Editor/>
      </AutoFormElement>
      <AutoFormElement>
        <Property name="name">czbz</Property>
        <Property name="property">czbz</Property>
        <Property name="trigger">autoMappingDropDown2</Property>
        <Editor/>
      </AutoFormElement>
    </AutoForm>
    <ToolBar>
      <ToolBarLabel>
        <Property name="text">工具栏:</Property>
        <Property name="style">
          <Property name="font-weight">bold</Property>
        </Property>
      </ToolBarLabel>
      <ToolBarButton>
        <ClientEvent name="onClick">view.get(&quot;#dsMain&quot;).flushAsync();</ClientEvent>
        <Property name="caption">刷新</Property>
        <Property name="iconClass">fa fa-search</Property>
        <Property name="width">100</Property>
        <Property name="exClassName">toolbar-button-push</Property>
      </ToolBarButton>
      <ToolBarButton>
        <ClientEvent name="onClick">view.get(&quot;#dsMain&quot;).insert();&#xD;
view.get(&quot;#dialogMain&quot;).show();</ClientEvent>
        <Property name="caption">新增</Property>
        <Property name="iconClass">fa fa-plus</Property>
        <Property name="width">100</Property>
        <Property name="exClassName">toolbar-button</Property>
      </ToolBarButton>
      <ToolBarButton>
        <ClientEvent name="onClick">var cur = view.get(&quot;#dgMain&quot;).getCurrentItem();&#xD;
if(cur){&#xD;
    view.get(&quot;#dialogMain&quot;).show();&#xD;
}else{&#xD;
    $alert(&quot;请勾选需要修改的数据!&quot;);&#xD;
}&#xD;
</ClientEvent>
        <Property name="caption">修改</Property>
        <Property name="iconClass">fa fa-pencil</Property>
        <Property name="width">100</Property>
        <Property name="exClassName">toolbar-button-warm</Property>
      </ToolBarButton>
      <Separator/>
      <ToolBarButton>
        <ClientEvent name="onClick">var cur = view.get(&quot;#dgMain&quot;).getCurrentItem();&#xD;
if(cur){&#xD;
    view.get(&quot;#ajaxDelUpdate&quot;).set(&quot;parameter&quot;,cur).execute(function(result){&#xD;
        if(result){&#xD;
            $alert(result);&#xD;
        } else{&#xD;
            cur.set(&quot;czbz&quot;,&quot;d&quot;);&#xD;
        }&#xD;
    });&#xD;
}else{&#xD;
    $alert(&quot;请勾选需要标记删除的数据!&quot;);&#xD;
}&#xD;
</ClientEvent>
        <Property name="caption">标记删除</Property>
        <Property name="iconClass">fa fa-minus</Property>
        <Property name="exClassName">toolbar-button-warn</Property>
        <Property name="width">100</Property>
      </ToolBarButton>
      <ToolBarButton>
        <ClientEvent name="onClick">var cur = view.get(&quot;#dgMain&quot;).getCurrentItem();&#xD;
if(cur){&#xD;
    view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,cur).execute(function(result){&#xD;
        if(result){&#xD;
            $alert(result);&#xD;
        } else{&#xD;
            cur.remove();&#xD;
        }&#xD;
    });&#xD;
}else{&#xD;
    $alert(&quot;请勾选需要删除的数据!&quot;);&#xD;
}</ClientEvent>
        <Property name="caption">直接删除</Property>
        <Property name="iconClass">fa fa-minus</Property>
        <Property name="exClassName">toolbar-button-warn</Property>
        <Property name="width">100</Property>
      </ToolBarButton>
      <Separator/>
      <ToolBarButton>
        <ClientEvent name="onClick">var select = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
if(select &amp;&amp; select.length > 0){&#xD;
    view.get(&quot;#ajaxPush&quot;).set(&quot;parameter&quot;,select).execute(function(result){&#xD;
        view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
        $notify(result);&#xD;
    });&#xD;
}else{&#xD;
    $alert(&quot;请勾选需要上报的数据!&quot;);&#xD;
}</ClientEvent>
        <Property name="caption">手动上传</Property>
        <Property name="iconClass">fa fa-hand-o-up</Property>
        <Property name="exClassName">toolbar-button-push</Property>
        <Property name="width">100</Property>
      </ToolBarButton>
      <Fill/>
      <ToolBarButton>
        <ClientEvent name="onClick">//显示记录&#xD;
view.get(&quot;#iFrame&quot;).reload();&#xD;
view.get(&quot;#dialogLog&quot;).show();</ClientEvent>
        <Property name="caption">上传记录</Property>
        <Property name="iconClass">fa fa-bars</Property>
        <Property name="exClassName">toolbar-button</Property>
      </ToolBarButton>
    </ToolBar>
    <DataGrid id="dgMain">
      <Property name="dataSet">dsMain</Property>
      <Property name="selectionMode">multiRows</Property>
      <Property name="readOnly">true</Property>
      <RowNumColumn/>
      <RowSelectorColumn>
        <Property name="caption">上传</Property>
      </RowSelectorColumn>
      <DataColumn name="xzbm">
        <Property name="property">xzbm</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="kqmc">
        <Property name="property">kqmc</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="tbrq">
        <Property name="property">tbrq</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="dwdm">
        <Property name="property">dwdm</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="fzr">
        <Property name="property">fzr</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="fzrdh">
        <Property name="property">fzrdh</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="xcfzr">
        <Property name="property">xcfzr</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="czbz">
        <Property name="property">czbz</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="zhgxsj">
        <Property name="property">zhgxsj</Property>
        <Property name="align">center</Property>
      </DataColumn>
    </DataGrid>
    <ToolBar layoutConstraint="bottom">
      <Fill/>
      <DataPilot>
        <Property name="itemCodes">pageSize,pages</Property>
        <Property name="dataSet">dsMain</Property>
      </DataPilot>
    </ToolBar>
    <Dialog id="dialogMain" layout="regionPadding:5">
      <Property name="width">85%</Property>
      <Property name="closeable">false</Property>
      <Property name="iconClass">fa fa-sliders</Property>
      <Property name="caption">熏蒸备案信息</Property>
      <Property name="height">85%</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">var cur = view.get(&quot;#dgMain&quot;).getCurrentItem();&#xD;
view.get(&quot;#updateSave&quot;).execute(function(){&#xD;
    self.get(&quot;parent&quot;).hide();&#xD;
});</ClientEvent>
          <Property name="caption">确定</Property>
          <Property name="iconClass">fa fa-check</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">var cur = view.get(&quot;#dgMain&quot;).getCurrentItem();&#xD;
self.get(&quot;parent&quot;).hide();&#xD;
if(cur) cur.cancel();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="iconClass">fa fa-times</Property>
        </Button>
      </Buttons>
      <Children>
        <FieldSet layout="regionPadding:5">
          <Property name="caption">基础信息</Property>
          <Buttons/>
          <Children>
            <AutoForm>
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*,*</Property>
              <Property name="labelPosition">top</Property>
              <Property name="labelSeparator">:</Property>
              <AutoFormElement>
                <Property name="name">xzbm</Property>
                <Property name="property">xzbm</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">kqdm</Property>
                <Property name="property">kqdm</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">kqmc</Property>
                <Property name="property">kqmc</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">tbrq</Property>
                <Property name="property">tbrq</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">dwdm</Property>
                <Property name="property">dwdm</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">dwmc</Property>
                <Property name="property">dwmc</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">sqxzrq</Property>
                <Property name="property">sqxzrq</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">fzr</Property>
                <Property name="property">fzr</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">fzrdh</Property>
                <Property name="property">fzrdh</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">xcfzr</Property>
                <Property name="property">xcfzr</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">xcfzrzw</Property>
                <Property name="property">xcfzrzw</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">xcfzrdh</Property>
                <Property name="property">xcfzrdh</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">tbr</Property>
                <Property name="property">tbr</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">tbrdh</Property>
                <Property name="property">tbrdh</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">sfszjjxd</Property>
                <Property name="property">sfszjjxd</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">sfszjjxx</Property>
                <Property name="property">sfszjjxx</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">sfszjjxn</Property>
                <Property name="property">sfszjjxn</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">sfszjjxb</Property>
                <Property name="property">sfszjjxb</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">ssxzzystqybqk</Property>
                <Property name="property">ssxzzystqybqk</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">xzssgcap</Property>
                <Property name="property">xzssgcap</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">aqfhjyjcccs</Property>
                <Property name="property">aqfhjyjcccs</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">xzzysx</Property>
                <Property name="property">xzzysx</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">fileStorageId</Property>
                <Property name="property">fileStorageId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">yjmc</Property>
                <Property name="property">yjmc</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">yjlx</Property>
                <Property name="property">yjlx</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">yjyxqz</Property>
                <Property name="property">yjyxqz</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">lqsl</Property>
                <Property name="property">lqsl</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">sysbjfs</Property>
                <Property name="property">sysbjfs</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">zcdd</Property>
                <Property name="property">zcdd</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">lqr</Property>
                <Property name="property">lqr</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">lqrq</Property>
                <Property name="property">lqrq</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">czbz</Property>
                <Property name="property">czbz</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">zhgxsj</Property>
                <Property name="property">zhgxsj</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet layout="regionPadding:5">
          <Property name="caption">熏蒸作业人员信息</Property>
          <Buttons/>
          <Children>
            <Panel layout="regionPadding:5">
              <Property name="caption">人员信息</Property>
              <Property name="height">400</Property>
              <Buttons/>
              <Children>
                <Container layout="regionPadding:10">
                  <Property name="exClassName">bg-color</Property>
                  <Property name="contentOverflow">hidden</Property>
                  <Property name="height">55</Property>
                  <Label layoutConstraint="left">
                    <Property name="text">菜单栏:</Property>
                  </Label>
                  <Button layoutConstraint="left">
                    <ClientEvent name="onClick">var list = view.get(&quot;#dsMain.data:#&quot;).get(&quot;way&quot;);&#xD;
list.insert({});</ClientEvent>
                    <Property name="caption">新增</Property>
                    <Property name="exClassName">btn-default</Property>
                    <Property name="iconClass">fa fa-plus</Property>
                  </Button>
                  <Button layoutConstraint="left">
                    <ClientEvent name="onClick">var data = view.get(&quot;#dataPeoples.currentEntity&quot;);&#xD;
if(!data){&#xD;
 return;&#xD;
}&#xD;
data.remove();</ClientEvent>
                    <Property name="caption">删除</Property>
                    <Property name="iconClass">fa fa-minus</Property>
                    <Property name="exClassName">btn-warn</Property>
                  </Button>
                </Container>
                <DataGrid id="dataPeoples">
                  <Property name="dataPath">#.people</Property>
                  <Property name="dataSet">dsMain</Property>
                  <DataColumn name="xm">
                    <Property name="property">xm</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                  <DataColumn name="zw">
                    <Property name="property">zw</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                  <DataColumn name="zyzg">
                    <Property name="property">zyzg</Property>
                    <Property name="trigger">listDropZG</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                  <DataColumn name="stzk">
                    <Property name="property">stzk</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                  <DataColumn name="xzrwfg">
                    <Property name="property">xzrwfg</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                  <DataColumn name="sfwb">
                    <Property name="property">sfwb</Property>
                    <Property name="trigger">listDropYN</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                </DataGrid>
              </Children>
              <Tools/>
            </Panel>
          </Children>
        </FieldSet>
        <FieldSet layout="regionPadding:5">
          <Property name="caption">熏蒸备案方式信息</Property>
          <Buttons/>
          <Children>
            <Panel layout="regionPadding:5">
              <Property name="caption">熏蒸备案方式</Property>
              <Property name="height">400</Property>
              <Buttons/>
              <Children>
                <Container layout="regionPadding:10">
                  <Property name="exClassName">bg-color</Property>
                  <Property name="contentOverflow">hidden</Property>
                  <Property name="height">55</Property>
                  <Label layoutConstraint="left">
                    <Property name="text">菜单栏:</Property>
                  </Label>
                  <Button layoutConstraint="left">
                    <ClientEvent name="onClick">var list = view.get(&quot;#dsMain.data:#&quot;).get(&quot;drugLogWays&quot;);&#xD;
list.insert({});</ClientEvent>
                    <Property name="caption">新增</Property>
                    <Property name="exClassName">btn-default</Property>
                    <Property name="iconClass">fa fa-plus</Property>
                  </Button>
                  <Button layoutConstraint="left">
                    <ClientEvent name="onClick">var data = view.get(&quot;#dataWays.currentEntity&quot;);&#xD;
if(!data){&#xD;
 return;&#xD;
}&#xD;
data.remove();</ClientEvent>
                    <Property name="caption">删除</Property>
                    <Property name="iconClass">fa fa-minus</Property>
                    <Property name="exClassName">btn-warn</Property>
                  </Button>
                </Container>
                <DataGrid id="dataWays">
                  <Property name="dataPath">#.way</Property>
                  <Property name="dataSet">dsMain</Property>
                  <DataColumn name="xznd">
                    <Property name="property">xznd</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                  <DataColumn name="mbsj">
                    <Property name="property">mbsj</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                  <DataColumn name="xzfs">
                    <Property name="property">xzfs</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                  <DataColumn name="sqfs">
                    <Property name="property">sqfs</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                </DataGrid>
              </Children>
              <Tools/>
            </Panel>
          </Children>
        </FieldSet>
      </Children>
      <Tools/>
    </Dialog>
    <Dialog id="dialogDtl" layout="regionPadding:5">
      <Property name="caption">熏蒸作业的储粮粮情</Property>
      <Property name="width">90%</Property>
      <Property name="iconClass">fa fa-sliders</Property>
      <Property name="height">90%</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">self.get(&quot;parent&quot;).hide();</ClientEvent>
          <Property name="caption">确定</Property>
          <Property name="iconClass">fa fa-check</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">var cur = view.get(&quot;#dgMain&quot;).getCurrentItem();&#xD;
self.get(&quot;parent&quot;).hide();&#xD;
if(cur) cur.cancel();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="iconClass">fa fa-times</Property>
        </Button>
      </Buttons>
      <Children>
        <FieldSet layout="regionPadding:5">
          <Property name="caption">熏蒸作业的储粮粮情明细</Property>
          <Buttons/>
          <Children>
            <Panel layout="regionPadding:5">
              <Property name="caption">储粮粮情明细</Property>
              <Buttons/>
              <Children>
                <Container layout="regionPadding:10">
                  <Property name="exClassName">bg-color</Property>
                  <Property name="contentOverflow">hidden</Property>
                  <Property name="height">55</Property>
                  <Label layoutConstraint="left">
                    <Property name="text">菜单栏:</Property>
                  </Label>
                  <Button layoutConstraint="left">
                    <ClientEvent name="onClick">var list = view.get(&quot;#dsMain.data:#&quot;).get(&quot;dtlList&quot;);&#xD;
list.insert({});&#xD;
view.get(&quot;#addDtl&quot;).show();</ClientEvent>
                    <Property name="caption">新增</Property>
                    <Property name="exClassName">btn-default</Property>
                    <Property name="iconClass">fa fa-plus</Property>
                  </Button>
                  <Button layoutConstraint="left">
                    <ClientEvent name="onClick">var cur = view.get(&quot;#dgDtl&quot;).getCurrentItem();&#xD;
if(cur){&#xD;
    view.get(&quot;#addDtl&quot;).show();&#xD;
}else{&#xD;
    $alert(&quot;请勾选需要修改的数据!&quot;);&#xD;
}</ClientEvent>
                    <Property name="caption">修改</Property>
                    <Property name="exClassName">btn-warm</Property>
                    <Property name="iconClass">fa fa-pencil</Property>
                  </Button>
                  <Button layoutConstraint="left">
                    <ClientEvent name="onClick">var list = view.get(&quot;#dsMain.data:#&quot;).get(&quot;dtls&quot;);&#xD;
list.remove();&#xD;
view.get(&quot;#updateDelDtl&quot;).execute(function(){&#xD;
});</ClientEvent>
                    <Property name="caption">删除</Property>
                    <Property name="iconClass">fa fa-minus</Property>
                    <Property name="exClassName">btn-warn</Property>
                  </Button>
                </Container>
                <DataGrid id="dgDtl">
                  <Property name="dataPath">#.dtls</Property>
                  <Property name="dataSet">dsMain</Property>
                  <DataColumn name="cfdm">
                    <Property name="property">cfdm</Property>
                    <Property name="readOnly">true</Property>
                    <Property name="align">center</Property>
                    <Property name="width">260</Property>
                  </DataColumn>
                  <DataColumn name="lspzdm">
                    <Property name="property">lspzdm</Property>
                    <Property name="readOnly">true</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                  <DataColumn name="lsxzdm">
                    <Property name="property">lsxzdm</Property>
                    <Property name="readOnly">true</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                  <DataColumn name="cldjpd">
                    <Property name="property">cldjpd</Property>
                    <Property name="readOnly">true</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                  <DataColumn name="zyyl">
                    <Property name="property">zyyl</Property>
                    <Property name="readOnly">true</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                  <DataColumn name="qmx">
                    <Property name="property">qmx</Property>
                    <Property name="readOnly">true</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                  <DataColumn name="jhxzksrq">
                    <Property name="property">jhxzksrq</Property>
                    <Property name="readOnly">true</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                  <DataColumn name="jhxzjsrq">
                    <Property name="property">jhxzjsrq</Property>
                    <Property name="readOnly">true</Property>
                    <Property name="align">center</Property>
                  </DataColumn>
                </DataGrid>
              </Children>
              <Tools/>
            </Panel>
          </Children>
        </FieldSet>
      </Children>
      <Tools/>
    </Dialog>
    <CustomDropDown id="cddGbArea">
      <Property name="assignmentMap">xzqhdm=code,xzqhmc=name</Property>
      <Property name="height">500</Property>
      <Property name="minHeight">500</Property>
      <Property name="maxHeight">500</Property>
      <Property name="width">400</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsGBArea">
          <Property name="dataProvider">gbAreaPR#findByCode</Property>
          <Property name="dataType">[dtGBArea]</Property>
        </DataSet>
        <Container layout="hbox regionPadding:5">
          <TextEditor id="key2">
            <Property name="blankText"> -- ç¼–码或者名称 --</Property>
            <Property name="width">200</Property>
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key2.value&quot;);&#xD;
view.get(&quot;#dsGBArea&quot;).set(&quot;parameter&quot;,{key:key}).flushAsync();</ClientEvent>
            <Property name="iconClass">fa fa-search</Property>
            <Property name="caption">查询</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsGBArea.data:#&quot;);&#xD;
if (data) {&#xD;
    view.get(&quot;#cddGbArea&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
            <Property name="caption">确定</Property>
            <Property name="iconClass">fa fa-check</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsGBArea.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#cddGbArea&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
          <Property name="dataSet">dsGBArea</Property>
          <Property name="readOnly">true</Property>
          <DataColumn name="code">
            <Property name="property">code</Property>
          </DataColumn>
          <DataColumn name="name">
            <Property name="property">name</Property>
          </DataColumn>
        </DataGrid>
      </Container>
    </CustomDropDown>
    <Dialog id="dialogLog">
      <Property name="width">90%</Property>
      <Property name="height">90%</Property>
      <Property name="caption">上传记录</Property>
      <Property name="iconClass">fa fa-sliders</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">self.get(&quot;parent&quot;).hide();</ClientEvent>
          <Property name="caption">关闭</Property>
          <Property name="iconClass">fa fa-times</Property>
          <Property name="exClassName">toolbar-button-warn</Property>
        </Button>
      </Buttons>
      <Children>
        <Container>
          <IFrame id="iFrame">
            <Property name="path">com.fzzy.api.view.ApiLog.d</Property>
            <Property name="userData">
              <Entity>
                <Property name="deptId">deptId</Property>
              </Entity>
            </Property>
          </IFrame>
        </Container>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="updateDelDtl">
      <Property name="dataResolver">gDApi9201PR#updateSave</Property>
      <Property name="confirmMessage">当前数据删除后无法恢复,请确认要删除么?</Property>
      <UpdateItem>
        <Property name="dataPath">[#current]</Property>
        <Property name="dataSet">dsMain</Property>
      </UpdateItem>
    </UpdateAction>
    <UpdateAction id="updateSave">
      <Property name="dataResolver">gDApi1023PR#saveData</Property>
      <UpdateItem>
        <Property name="dataPath">[#current]</Property>
        <Property name="dataSet">dsMain</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxDel">
      <Property name="confirmMessage">当前数据删除后无法恢复,请确认要删除么?</Property>
      <Property name="service">gDApi9201PR#delData</Property>
    </AjaxAction>
    <AjaxAction id="ajaxDelUpdate">
      <Property name="confirmMessage">当前数据删除后无法恢复,请确认要删除么?</Property>
      <Property name="service">gDApi9201PR#delUpdate</Property>
    </AjaxAction>
    <AjaxAction id="ajaxPush">
      <Property name="service">gDApi9201PR#pushData</Property>
    </AjaxAction>
    <ListDropDown id="listDropYN">
      <Property name="items">是,否</Property>
    </ListDropDown>
    <ListDropDown id="listDropZG">
      <Property name="items">初级,中级,高级</Property>
    </ListDropDown>
  </View>
</ViewConfig>
src/main/java/com/fzzy/otherview/gd2022/pr/GDApi1023PR.java
@@ -66,7 +66,7 @@
            @Override
            public Predicate toPredicate(Root<ApiInfoData> root, CriteriaQuery<?> criteriaQuery, CriteriaBuilder criteriaBuilder) {
                List<Predicate> predicates = new ArrayList<>(); //所有的断言
                Predicate predicate = criteriaBuilder.equal(root.get("inteId"), ApiCodeConstant.API_1023);
                Predicate predicate = criteriaBuilder.equal(root.get("inteId"), ApiCodeConstant.API_9201);
                predicates.add(predicate);
                if (null != param) {
                    if (StringUtils.isNotBlank(param.getKqdm())) {
@@ -169,7 +169,7 @@
        }
        //封装参数
        ApiParam param = new ApiParam(apiConf, "21", ApiCodeConstant.API_1023);
        ApiParam param = new ApiParam(apiConf, "21", ApiCodeConstant.API_9201);
        //获取实现接口
        ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol());
@@ -184,7 +184,7 @@
            if (responseDto.getSuccess() == 0) {
                if (Constant.CZBZ_I.equals(data.getCzbz())) {
                    //推送成功,更新数据上传状态
                    List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(ApiCodeConstant.API_1023, DateFormatUtils.format(data.getTbrq(), "yyyyMMdd") +  data.getXzbm(), data.getKqdm());
                    List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(ApiCodeConstant.API_9201, DateFormatUtils.format(data.getTbrq(), "yyyyMMdd") +  data.getXzbm(), data.getKqdm());
                    data.setCzbz(Constant.CZBZ_U);
                    infoData = apiInfoList.get(0);
                    infoData.setUpdateTime(new Date());
src/main/java/com/fzzy/otherview/gd2022/pr/GDApi9201PR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,239 @@
package com.fzzy.otherview.gd2022.pr;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.annotation.Expose;
import com.bstek.dorado.data.provider.Page;
import com.fzzy.api.Constant;
import com.fzzy.api.data.ApiParam;
import com.fzzy.api.dto.ResponseDto;
import com.fzzy.api.entity.Api9201;
import com.fzzy.api.entity.ApiConfs;
import com.fzzy.api.service.ApiCommonService;
import com.fzzy.api.service.ApiPushManager;
import com.fzzy.api.service.ApiRemoteService;
import com.fzzy.api.utils.ContextUtil;
import com.fzzy.api.view.repository.Api9201Rep;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Component;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import java.util.ArrayList;
import java.util.List;
/**
 * å¹¿ä¸œçœæŽ¥å£-9201 ç†è’¸å¤‡æ¡ˆ
 *
 * @author czt
 * @date 2023/8/17
 */
@Component(value = "gDApi9201PR")
public class GDApi9201PR {
    @Autowired
    private Api9201Rep api9201Rep;
    @Autowired
    private ApiCommonService apiCommonService;
    @Autowired
    private ApiPushManager apiPushManager;
    /**
     * gDApi9201PR#pageList
     *
     * @return
     */
    @DataProvider
    public void pageList(Page<Api9201> page, ApiParam param) {
        //多参数分页查询
        Pageable pageable = PageRequest.of(page.getPageNo() - 1, page.getPageSize(), Sort.Direction.DESC, "id");
        if (null == param) {
            org.springframework.data.domain.Page<Api9201> japPage = api9201Rep.findAll(pageable);
            page.setEntityCount((int) japPage.getTotalElements());
            page.setEntities(japPage.getContent());
            return;
        }
        Specification<Api9201> specification = new Specification<Api9201>() {
            private static final long serialVersionUID = 1L;
            public Predicate toPredicate(Root<Api9201> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
                List<Predicate> predicates = new ArrayList<>(); //所有的断言
                if (StringUtils.isNotBlank(param.getKqdm())) {
                    Predicate predicate1 = cb.equal(root.get("hwdm"), param.getKqdm());
                    predicates.add(predicate1);
                }
                if (StringUtils.isNotBlank(param.getCzbz())) {
                    Predicate predicate2 = cb.equal(root.get("czbz"), param.getCzbz());
                    predicates.add(predicate2);
                }
                if (null != param.getStart()) {
                    Predicate predicate3 = cb.greaterThan(root.get("ywrq"), ContextUtil.getCurZero(param.getStart()));
                    predicates.add(predicate3);
                }
                if (null != param.getEnd()) {
                    Predicate predicate4 = cb.lessThan(root.get("ywrq"), ContextUtil.getNextZero(param.getEnd()));
                    predicates.add(predicate4);
                }
                return cb.and(predicates.toArray(new Predicate[0]));
            }
        };
        org.springframework.data.domain.Page<Api9201> japPage = api9201Rep.findAll(specification, pageable);
        page.setEntityCount((int) japPage.getTotalElements());
        page.setEntities(japPage.getContent());
    }
    /**
     * gDApi9201PR#updateSave
     *
     * @param entity
     */
    @DataResolver
    public void updateSave(Api9201 entity) {
        // æ‰‹åЍ将doradoEntity对象转换为标准Bean对象
        Api9201 data = new Api9201();
        BeanUtils.copyProperties(entity, data);
        data.setKqdm(data.getKqdm().trim());
        api9201Rep.save(data);
    }
    /**
     * gDApi9201PR#delData
     *
     * @param data
     */
    @Expose
    public String delData(Api9201 data) {
        api9201Rep.deleteById(data.getId());
        return null;
    }
    /**
     * æ›´æ–°åˆ é™¤æ ‡è®° gDApi9201PR#delUpdate
     *
     * @param entity
     */
    @Expose
    public String delUpdate(Api9201 entity) {
        entity.setCzbz(Constant.CZBZ_D);
        Api9201 data = new Api9201();
        BeanUtils.copyProperties(entity, data);
        api9201Rep.save(data);
        return null;
    }
    /**
     * gDApi9201PR#pushData
     *
     * @param items
     */
    @Expose
    public String pushData(List<Api9201> items) {
        //获取配置
        String kqdm = items.get(0).getKqdm();
        ApiConfs apiConf = apiCommonService.getConf(kqdm);
        if (null == apiConf) {
            return "系统没有获取到当前库区配置信息,执行失败";
        }
        //获取实现接口
        ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol());
        if (null == apiRemoteService) {
            return "系统没有当前推送协议配置,执行失败";
        }
        return pushDataSingle(items, apiRemoteService, apiConf);
    }
    /**
     * å•条数据json推送
     *
     * @param items
     * @param apiRemoteService
     * @param apiConf
     * @return
     */
    private String pushDataSingle(List<Api9201> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) {
        ResponseDto responseDto;
        String result = "";
        //封装参数
        ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_9201);
        Api9201 d;
        for (Api9201 data : items) {
            d = new Api9201();
            BeanUtils.copyProperties(data, d);
            param.setBizId(data.getBizId());
            responseDto = apiRemoteService.pushData(param, apiConf, d);
            result += responseDto.toString();
            if (responseDto.getSuccess() == 0) {
                if (Constant.CZBZ_I.equals(d.getCzbz())) {
                    api9201Rep.updateStatus(data.getDwdm(), Constant.CZBZ_U);
                }
            }
        }
        return result;
    }
    /**
     * é›†åˆå½¢å¼æŽ¨é€
     *
     * @param items
     * @param apiRemoteService
     * @param apiConf
     * @return
     */
    private String pushDataList(List<Api9201> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) {
        //封装参数
        ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_9201);
        //推送,数据为集合形式
        ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items);
        if (responseDto.getSuccess() == 0) {
            //推送成功,更新数据上传状态
            for (Api9201 data : items) {
                if (Constant.CZBZ_I.equals(data.getCzbz())) {
                    //更新状态
                    api9201Rep.updateStatus(data.getDwdm(), Constant.CZBZ_U);
                }
            }
        }
        return responseDto.toString();
    }
}
src/main/java/com/fzzy/push/gd2022/ApiCodeConstant.java
@@ -9,6 +9,7 @@
    public static String API_1023 = "1023";
    public static String API_2001 = "2001";
    public static String API_2002 = "2002";
    public static String API_9201 = "9201";
    /**
     * æŽ¥å£ç¼–码-1001 èº«ä»½è®¤è¯æŽ¥å£
     */
src/main/java/com/fzzy/web/TestController.java
@@ -1,4 +1,5 @@
package com.fzzy.web;
import com.bstek.dorado.util.DateUtils;
import com.fzzy.api.data.ApiParam;
import com.fzzy.async.fzzy30.Fzzy30SyncService12;
@@ -8,6 +9,21 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import ws.schild.jave.Encoder;
import ws.schild.jave.EncoderException;
import ws.schild.jave.MultimediaObject;
import ws.schild.jave.encode.AudioAttributes;
import ws.schild.jave.encode.EncodingAttributes;
import ws.schild.jave.encode.VideoAttributes;
import ws.schild.jave.info.AudioInfo;
import ws.schild.jave.info.VideoSize;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.math.BigDecimal;
/**
 * @author vince.xu
@@ -22,6 +38,7 @@
public class TestController {
    @Autowired
    private Fzzy30SyncService12 fzzySyncService12;
    /**
     *
     */
@@ -41,4 +58,171 @@
        }
        return "";
    }
    public static void main(String[] args) throws EncoderException {
        // åŽ‹ç¼©å‰æ–‡ä»¶è·¯å¾„
        File source = new File("D:\\IGDS\\FILE\\COMMON\\202412\\20241218100601.mp4");
        // åŽ‹ç¼©åŽçš„æ–‡ä»¶è·¯å¾„
        File target = new File("D:\\IGDS\\FILE\\COMMON\\202412\\202412181006.mp4");
        compre(source, target, 1);
    }
    /**
     * è§†é¢‘压缩
     *
     * @param source æºæ–‡ä»¶
     * @param target ç›®æ ‡æ–‡ä»¶
     * @param rate   åŽ‹ç¼©æ¯”
     */
    public static void compre(File source, File target, Integer rate) throws EncoderException {
        try {
            System.out.println("---------------开始压缩---------------");
            long start = System.currentTimeMillis();
            // éŸ³é¢‘编码属性配置
            AudioAttributes audio = new AudioAttributes();
            audio.setCodec("libmp3lame");
            // è®¾ç½®éŸ³é¢‘比特率,单位:b (比特率越高,清晰度/音质越好,当然文件也就越大 56000 = 56kb)
            // audio.setBitRate(new Integer(56_000));
            audio.setBitRate(new Integer(10));
            // è®¾ç½®é‡æ–°ç¼–码的音频流中使用的声道数(1 =单声道,2 = åŒå£°é“(立体声))
            audio.setChannels(1);
            // é‡‡æ ·çŽ‡è¶Šé«˜å£°éŸ³çš„è¿˜åŽŸåº¦è¶Šå¥½ï¼Œæ–‡ä»¶è¶Šå¤§
            // audio.setSamplingRate(new Integer(44100));
            audio.setSamplingRate(new Integer(22050));
            // è§†é¢‘编码属性配置
            VideoAttributes video = new VideoAttributes();
            // è®¾ç½®ç¼–码
            video.setCodec("mpeg4");
            //设置音频比特率,单位:b (比特率越高,清晰度/音质越好,当然文件也就越大 5600000 = 5600kb)
            // video.setBitRate(new Integer(5_600_000 / rate));
            video.setBitRate(new Integer(10 / rate));
            // è®¾ç½®è§†é¢‘帧率(帧率越低,视频会出现断层,越高让人感觉越连续),这里 é™¤1000是为了单位转换
            video.setFrameRate(new Integer(15));
            // ç¼–码设置
            EncodingAttributes attr = new EncodingAttributes();
            attr.setOutputFormat("mp4");
            attr.setAudioAttributes(audio);
            attr.setVideoAttributes(video);
            // è®¾ç½®å€¼ç¼–码
            Encoder ec = new Encoder();
            ec.encode(new MultimediaObject(source), target, attr);
            System.out.println("---------------结束压缩---------------");
            long end = System.currentTimeMillis();
            System.out.println("压缩前大小:" + source.length() + " åŽ‹ç¼©åŽå¤§å°ï¼š" + target.length());
            System.out.println("压缩耗时:" + (end - start));
        } catch (EncoderException e) {
            e.printStackTrace();
        } catch (IllegalArgumentException e) {
            e.printStackTrace();
        }
    }
    /**
     * ä¼ è§†é¢‘File对象(这是一个具体的文件),返回压缩后File对象信息
     *
     * @param source
     */
    public static File compressionVideo(File source, String picName) {
        if (source == null) {
            return null;
        }
        String newPath = source.getAbsolutePath().substring(0, source.getAbsolutePath().lastIndexOf(File.separator)).concat(File.separator).concat(picName);
        File target = new File(newPath);
        try {
            MultimediaObject object = new MultimediaObject(source);
            AudioInfo audioInfo = object.getInfo().getAudio();
            // æ ¹æ®è§†é¢‘大小来判断是否需要进行压缩,
            int maxSize = 5;
            double mb = Math.ceil(source.length() / 1048576);
            int second = (int) object.getInfo().getDuration() / 1000;
            BigDecimal bd = new BigDecimal(String.format("%.4f", mb / second));
            System.out.println("开始压缩视频了--> è§†é¢‘每秒平均 " + bd + " MB ");
            // è§†é¢‘ > 5MB, æˆ–者每秒 > 0.5 MB æ‰åšåŽ‹ç¼©ï¼Œ ä¸éœ€è¦çš„话可以把判断去掉
            boolean temp = mb > maxSize || bd.compareTo(new BigDecimal(0.5)) > 0;
//            if(temp){
            long time = System.currentTimeMillis();
            //TODO è§†é¢‘属性设置
            int maxBitRate = 128000;
            int maxSamplingRate = 44100;
            int bitRate = 800000;
            int maxFrameRate = 20;
            int maxWidth = 1280;
            AudioAttributes audio = new AudioAttributes();
            // è®¾ç½®é€šç”¨ç¼–码格式10                   audio.setCodec("aac");
            // è®¾ç½®æœ€å¤§å€¼ï¼šæ¯”特率越高,清晰度/音质越好
            // è®¾ç½®éŸ³é¢‘比特率,单位:b (比特率越高,清晰度/音质越好,当然文件也就越大 128000 = 182kb)
            if (audioInfo.getBitRate() > maxBitRate) {
                audio.setBitRate(new Integer(maxBitRate));
            }
            // è®¾ç½®é‡æ–°ç¼–码的音频流中使用的声道数(1 =单声道,2 = åŒå£°é“(立体声))。如果未设置任何声道值,则编码器将选择默认值 0。
            audio.setChannels(audioInfo.getChannels());
            // é‡‡æ ·çŽ‡è¶Šé«˜å£°éŸ³çš„è¿˜åŽŸåº¦è¶Šå¥½ï¼Œæ–‡ä»¶è¶Šå¤§
            // è®¾ç½®éŸ³é¢‘采样率,单位:赫兹 hz
            // è®¾ç½®ç¼–码时候的音量值,未设置为0,如果256,则音量值不会改变
            // audio.setVolume(256);
            if (audioInfo.getSamplingRate() > maxSamplingRate) {
                audio.setSamplingRate(maxSamplingRate);
            }
            //TODO è§†é¢‘编码属性配置
            ws.schild.jave.info.VideoInfo videoInfo = object.getInfo().getVideo();
            VideoAttributes video = new VideoAttributes();
            video.setCodec("h264");
            //设置音频比特率,单位:b (比特率越高,清晰度/音质越好,当然文件也就越大 800000 = 800kb)
            if (videoInfo.getBitRate() > bitRate) {
                video.setBitRate(bitRate);
            }
            // è§†é¢‘帧率:15 f / s  å¸§çŽ‡è¶Šä½Žï¼Œæ•ˆæžœè¶Šå·®
            // è®¾ç½®è§†é¢‘帧率(帧率越低,视频会出现断层,越高让人感觉越连续),视频帧率(Frame rate)是用于测量显示帧数的量度。所谓的测量单位为每秒显示帧数(Frames per Second,简:FPS)或“赫兹”(Hz)。
            if (videoInfo.getFrameRate() > maxFrameRate) {
                video.setFrameRate(maxFrameRate);
            }
            // é™åˆ¶è§†é¢‘宽高
            int width = videoInfo.getSize().getWidth();
            int height = videoInfo.getSize().getHeight();
            if (width > maxWidth) {
                float rat = (float) width / maxWidth;
                video.setSize(new VideoSize(maxWidth, (int) (height / rat)));
            }
            EncodingAttributes attr = new EncodingAttributes();
//                attr.setFormat("mp4");
            attr.setAudioAttributes(audio);
            attr.setVideoAttributes(video);
            // é€Ÿåº¦æœ€å¿«çš„压缩方式, åŽ‹ç¼©é€Ÿåº¦ ä»Žå¿«åˆ°æ…¢ï¼š ultrafast, superfast, veryfast, faster, fast, medium,  slow, slower, veryslow and placebo.
//                attr.setPreset(PresetUtil.VERYFAST);
//                attr.setCrf(27);
//                // è®¾ç½®çº¿ç¨‹æ•°
//                attr.setEncodingThreads(Runtime.getRuntime().availableProcessors()/2);
            Encoder encoder = new Encoder();
            encoder.encode(new MultimediaObject(source), target, attr);
            System.out.println("压缩总耗时:" + (System.currentTimeMillis() - time) / 1000);
            return target;
//            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (target.length() > 0) {
                source.delete();
            }
        }
        return source;
    }
}
src/main/resources/application.yml
@@ -1,7 +1,7 @@
##########################  Server   ##########################
spring:
  profiles:
    active: dev
    active: pro
  application:
    name: igds-api
  main:
src/main/resources/templates/home/home.html
@@ -340,6 +340,9 @@
                                    <dd>
                                        <a lay-href="com.fzzy.otherview.gd2022.GdApi1023.d">熏蒸备案</a>
                                    </dd>
                                    <dd>
                                        <a lay-href="com.fzzy.otherview.gd2022.GdApi9201.d">熏蒸备案新</a>
                                    </dd>
                                </dl>
                            </dd>
                            <dd>