| | |
| | | public class Fz40DrugLogApply implements Serializable { |
| | | |
| | | @Id |
| | | @Column(name = "xzbm", length = 4) |
| | | @Column(name = "xzbm", length = 12) |
| | | @PropertyDef(label = "熏蒸备案编号", description = "4位顺序号") |
| | | private String xzbm; |
| | | |
| | |
| | | @PropertyDef(label = "dtlId") |
| | | private String dtlId; |
| | | |
| | | @Column(name = "DRUG_LOG_ID_", length = 4) |
| | | @Column(name = "DRUG_LOG_ID_", length = 12) |
| | | @PropertyDef(label = "熏蒸备案编号", description = "填报日期yyyyMMdd+4位顺序号") |
| | | @JSONField |
| | | private String drugLogId; |
| | | |
| | | @Column(name = "tbrq") |
| | | @PropertyDef(label = "填报日期") |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date tbrq; |
| | | |
| | | @Column(name = "DEPOT_ID_", length = 50) |
| | | @PropertyDef(label = "仓房/油罐代码") |
| | |
| | | @PropertyDef(label = "propleId") |
| | | private String propleId; |
| | | |
| | | |
| | | @Column(name = "DRUG_LOG_ID_", length = 12) |
| | | @PropertyDef(label = "熏蒸备案编号", description = "填报日期yyyyMMdd+4位顺序号") |
| | | private String drugLogId; |
| | |
| | | private String wayId; |
| | | |
| | | @Column(name = "DRUG_LOG_ID_", length = 12) |
| | | @PropertyDef(label = "熏蒸备案编号", description = "4位顺序号") |
| | | @PropertyDef(label = "熏蒸备案编号", description = "填报日期yyyyMMdd+4位顺序号") |
| | | private String drugLogId; |
| | | |
| | | @Column(name = "tbrq") |
| | | @PropertyDef(label = "填报日期") |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date tbrq; |
| | | |
| | | @Column(name = "xznd", precision = 20, scale = 3) |
| | | @PropertyDef(label = "设定熏蒸浓度", description = "单位:ml/m³") |
| | |
| | | gdApi1023.setDwdm(kqdm.substring(0, 18)); |
| | | gdApi1023.setYjmc(data.getDrugName()); |
| | | gdApi1023.setYjlx(data.getDrugType()); |
| | | gdApi1023.setLqrq(data.getLqsj()); |
| | | gdApi1023.setZhgxsj(data.getUpdateTime()); |
| | | |
| | | //储粮粮情明细表 |
| | |
| | | for (Fz40DrugLogPeople people : peoples) { |
| | | gdApi1023People = new GdApi1023People(); |
| | | BeanUtils.copyProperties(people, gdApi1023People); |
| | | gdApi1023People.setXm(people.getMx()); |
| | | peopleList.add(gdApi1023People); |
| | | } |
| | | gdApi1023.setPeoples(peopleList); |
| | | } |
| | | //持久化保存,单独存入非国标接口表 |
| | | infoData = new ApiInfoData(); |
| | | infoData.setId(ContextUtil.getUUID()); |
| | | |
| | | infoData.setKqdm(kqdm); |
| | | infoData.setInteType(Constant.API_CATEGORY_13); |
| | | infoData.setInteId(ApiCodeConstant.API_1023); |
| | |
| | | if (null == apiInfoList || apiInfoList.isEmpty()) { |
| | | gdApi1023.setCzbz(Constant.CZBZ_I); |
| | | infoData.setCzbz(Constant.CZBZ_I); |
| | | infoData.setId(ContextUtil.getUUID()); |
| | | } else { |
| | | gdApi1023.setCzbz(apiInfoList.get(0).getCzbz()); |
| | | infoData.setCzbz(apiInfoList.get(0).getCzbz()); |
| | | infoData.setId(apiInfoList.get(0).getId()); |
| | | } |
| | | |
| | | infoData.setData(JSON.toJSONString(gdApi1023)); |
| | |
| | | public interface Fzzy40SyncDrugLogDtlRep extends JpaRepository<Fz40DrugLogDtl, String> { |
| | | |
| | | |
| | | @Query("from Fz40DrugLogDtl where id =:id") |
| | | @Query("from Fz40DrugLogDtl where drugLogId =:id") |
| | | List<Fz40DrugLogDtl> listDrugLogDtl(@Param("id") String id ); |
| | | |
| | | } |
| | |
| | | */ |
| | | public interface Fzzy40SyncDrugLogPeopleRep extends JpaRepository<Fz40DrugLogPeople, String> { |
| | | |
| | | @Query("from Fz40DrugLogPeople where id =:id") |
| | | @Query("from Fz40DrugLogPeople where drugLogId =:id") |
| | | List<Fz40DrugLogPeople> listDrugLogPeople(@Param("id") String id ); |
| | | } |
| | |
| | | */ |
| | | public interface Fzzy40SyncDrugLogWayRep extends JpaRepository<Fz40DrugLogWay, String> { |
| | | |
| | | @Query("from Fz40DrugLogWay where id =:id") |
| | | @Query("from Fz40DrugLogWay where drugLogId =:id") |
| | | List<Fz40DrugLogWay> listDrugLogWay(@Param("id") String id ); |
| | | } |
| | |
| | | <Property name="label">最后更新时间</Property> |
| | | <Property name="dataType">DateTime</Property> |
| | | </PropertyDef> |
| | | <Reference name="peoples"> |
| | | <Property name="dataType">[dtPeople]</Property> |
| | | <Property name="dataProvider">gDApi1023PR#peopleList</Property> |
| | | <Property name="parameter">$${this.peopleList}</Property> |
| | | </Reference> |
| | | <Reference name="ways"> |
| | | <Property name="dataProvider">gDApi1023PR#wayList</Property> |
| | | <Property name="dataType">[dtWay]</Property> |
| | | <Property name="parameter">$${this.wayList}</Property> |
| | | </Reference> |
| | | <Reference name="dtls"> |
| | | <Property name="dataProvider">gDApi1023PR#dtlList</Property> |
| | | <PropertyDef name="dtls"> |
| | | <Property name="dataType">[dtDtl]</Property> |
| | | <Property name="parameter">$${this.dtlList}</Property> |
| | | </Reference> |
| | | <PropertyDef name="dtlList"/> |
| | | <PropertyDef name="peopleList"> |
| | | <Property></Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="wayList"> |
| | | <PropertyDef name="peoples"> |
| | | <Property></Property> |
| | | <Property name="dataType">[dtPeople]</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="ways"> |
| | | <Property></Property> |
| | | <Property name="dataType">[dtWay]</Property> |
| | | </PropertyDef> |
| | | </DataType> |
| | | <DataType name="dtPeople"> |
| | |
| | | <Property name="text">菜单栏:</Property> |
| | | </Label> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">var list = view.get("#dsMain.data:#").get("dtls");
 |
| | | <ClientEvent name="onClick">var list = view.get("#dsMain.data:#").get("dtlList");
 |
| | | list.insert({});
 |
| | | view.get("#addDtl").show();</ClientEvent> |
| | | <Property name="caption">新增</Property> |
| | |
| | | @JSONField(format = "yyyy-MM-dd HH:mm:ss") |
| | | private Date zhgxsj; //最后更新时间 |
| | | |
| | | private String dtlList; |
| | | private String peopleList; |
| | | private String wayList; |
| | | |
| | | private List<GdApi1023Dtl> dtls; //实施熏蒸作业的储粮粮情明细 |
| | | private List<GdApi1023People> peoples; //熏蒸作业人员信息 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取熏蒸作业人员信息表 |
| | | * gDApi1023PR#peopleList |
| | | */ |
| | | @DataProvider |
| | | public List<GdApi1023People> peopleList(String code) { |
| | | return JSON.parseArray(code, GdApi1023People.class); |
| | | } |
| | | |
| | | /** |
| | | * 获取熏蒸备案方式表表信息 |
| | | * gDApi1023PR#wayList |
| | | */ |
| | | @DataProvider |
| | | public List<GdApi1023Way> wayList(String code) { |
| | | return JSON.parseArray(code, GdApi1023Way.class); |
| | | } |
| | | |
| | | /** |
| | | * 实施熏蒸作业的储粮粮情明细表 |
| | | * gDApi1023PR#dtlList |
| | | */ |
| | | @DataProvider |
| | | public List<GdApi1023Dtl> dtlList(String code) { |
| | | return JSON.parseArray(code, GdApi1023Dtl.class); |
| | | } |
| | | |
| | | /** |
| | | * gDApi1023PR#saveData |
| | | */ |
| | | @DataResolver |
| | | public void saveData(GdApi1023 data) { |
| | | data.setDtlList(JSON.toJSONString(data.getDtls())); |
| | | data.setWayList(JSON.toJSONString(data.getWays())); |
| | | data.setPeopleList(JSON.toJSONString(data.getPeoples())); |
| | | ApiInfoData infoData; |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(ApiCodeConstant.API_1023, data.getXzbm(), data.getKqdm()); |
| | | if (apiInfoList.size() != 0) { |