From 688fd8243286b342bfdeb3ee0b4ee45be4c005cc Mon Sep 17 00:00:00 2001 From: czt <czt18638530771@163.com> Date: 星期三, 04 六月 2025 11:38:08 +0800 Subject: [PATCH] 增加货位卡设备配置 --- igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/ScreenSerRepository.java | 28 ++ igds-dzhwk-web/src/main/java/com/fzzy/igds/dzhwk/controller/WebController.java | 30 - igds-dzhwk-view/src/main/java/com/fzzy/igds/dzhwk/pr/ScreenSerPR.java | 57 ++++ igds-dzhwk-view/src/main/java/com/fzzy/igds/dzhwk/ScreenSer.view.xml | 220 +++++++++++++++ igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/ScreenSer.java | 57 ++++ igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/GasKey.java | 20 + igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/ScreenSerService.java | 58 ++++ igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Gas.java | 144 ++++++++++ igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/DepotConf.view.xml | 168 +++++------ 9 files changed, 679 insertions(+), 103 deletions(-) diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Gas.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Gas.java new file mode 100644 index 0000000..c729ce8 --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Gas.java @@ -0,0 +1,144 @@ +package com.fzzy.igds.dzhwk.domain; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +import javax.persistence.*; +import java.io.Serializable; +import java.util.Date; + +/** + * 姘斾綋涓氬姟鏁版嵁淇℃伅鍖呮嫭娴撳害锛屾爱姘旓紝鍘嬪姏淇℃伅 姘斾綋妯″潡锛氬寘鎷皵浣撴祿搴� + * + * @author Andy + * + */ +@Data +@Entity +@Table(name = "D_GAS") +@IdClass(GasKey.class) +public class Gas implements Serializable { + + public static String SORT_PROP = "batchId"; + + @Id + @Column(name = "BATCH_ID_", length = 40) + @PropertyDef(label = "鎵规ID") + private String batchId; + + @Id + @Column(name = "COMPANY_ID_", length = 10) + @PropertyDef(label = "缁勭粐缂栫爜", description = "") + private String companyId; + + @Id + @Column(name = "DEPOT_ID_", length = 50) + @PropertyDef(label = "浠撳簱ID", description = "浠撳簱缂栧彿") + private String depotId; + + @Column(name = "TYPE_", length = 1) + @PropertyDef(label = "绫诲瀷", description = "0-甯歌妫�娴嬶紝1-鐔忚捀妫�娴�") + private String type; + + @Column(name = "PER_CO2_") + @PropertyDef(label = "浜屾哀鍖栫⒊娴撳害", description = "骞冲潎浜屾哀鍖栫⒊娴撳害(PPM)") + private Double perCo2 = 0.0; + + @Column(name = "PER_O2_") + @PropertyDef(label = "姘ф皵娴撳害", description = "骞冲潎姘ф皵娴撳害(%)") + private Double perO2 = 0.0; + + @Column(name = "PER_PH3_") + @PropertyDef(label = "纾峰寲姘㈡祿搴�", description = "骞冲潎纾峰寲姘㈡祿搴�(PPM)") + private Double perPh3 = 0.0; + + @Column(name = "PER_N2_") + @PropertyDef(label = "姘皵娴撳害", description = "姘皵娴撳害(%)") + private Double perN2 = 0.0; + + @Column(name = "PER_CO2_MAX_") + @PropertyDef(label = "浜屾哀鍖栫⒊娴撳害-鏈�澶�", description = "浜屾哀鍖栫⒊娴撳害(PPM)") + private Double perCo2Max = 0.0; + + @Column(name = "PER_O2_MAX_") + @PropertyDef(label = "姘ф皵娴撳害-鏈�澶�", description = "姘ф皵娴撳害(%)") + private Double perO2Max = 0.0; + + @Column(name = "PER_PH3_MAX_") + @PropertyDef(label = "纾峰寲姘㈡祿搴�-鏈�澶�", description = "纾峰寲姘㈡祿搴�(PPM)") + private Double perPh3Max = 0.0; + + @Column(name = "PER_N2_MAX_") + @PropertyDef(label = "姘皵娴撳害-鏈�澶�") + private Double perN2Max = 0.0; + + @Column(name = "PER_CO2_MIN_") + @PropertyDef(label = "浜屾哀鍖栫⒊娴撳害-鏈�灏�", description = "浜屾哀鍖栫⒊娴撳害(PPM)") + private Double perCo2Min = 0.0; + + @Column(name = "PER_O2_MIN_") + @PropertyDef(label = "姘ф皵娴撳害-鏈�灏�", description = "姘ф皵娴撳害(%)") + private Double perO2Min = 0.0; + + @Column(name = "PER_PH3_MIN_") + @PropertyDef(label = "纾峰寲姘㈡祿搴�-鏈�灏�", description = "纾峰寲姘㈡祿搴�(PPM)") + private Double perPh3Min = 0.0; + + @Column(name = "PER_N2_MIN_") + @PropertyDef(label = "姘皵娴撳害-鏈�灏�") + private Double perN2Min = 0.0; + + @Column(name = "RECEIVE_DATE_") + @PropertyDef(label = "妫�娴嬫椂闂�") + private Date receiveDate; + + @Column(name = "GAS_START_") + @PropertyDef(label = "姘斾綋閲囬泦鐐瑰紑濮�", description = "姘斾綋閰嶇疆淇℃伅") + private int gasStart; + + @Column(name = "GAS_END_") + @PropertyDef(label = "姘斾綋閲囬泦鐐规埅鑷�", description = "姘斾綋閰嶇疆淇℃伅") + private int gasEnd; + + @Column(name = "CHECK_NUM_") + @PropertyDef(label = "閲囬泦閫氶亾涓暟") + private int checkNum = 0; + + @Column(name = "POINTS_", length = 2000) + @PropertyDef(label = "閲囬泦鐐逛俊鎭�", description = "鍥哄畾涓猴細passCode,co2,o2,ph3,n2;passCode,co2,o2,ph3,n2;") + private String points; + + @Column(name = "CHECK_USER_", length = 30) + @PropertyDef(label = "妫�娴嬩汉") + private String checkUser; + + @Column(name = "BATCH_TAG_", length = 2) + @PropertyDef(label = "鐢熸垚鏂瑰紡", description = "01-璁惧閲囬泦锛�02-鎵嬪姩琛ュ綍") + private String batchTag = "01"; + + @Column(name = "REMARK_", length = 200) + @PropertyDef(label = "澶囨敞淇℃伅") + private String remark; + + public Gas() { + super(); + } + + public Gas(String batchId, String companyId, String depotId, + Date receiveDate) { + super(); + this.batchId = batchId; + this.companyId = companyId; + this.depotId = depotId; + this.perCo2Max = 0.0; + this.perO2Max = 0.0; + this.perPh3Max = 0.0; + this.perCo2Min = 0.0; + this.perO2Min = 0.0; + this.perPh3Min = 0.0; + this.perCo2 = 0.0; + this.perO2 = 0.0; + this.perPh3 = 0.0; + this.receiveDate = receiveDate; + } +} diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/GasKey.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/GasKey.java new file mode 100644 index 0000000..f9d983d --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/GasKey.java @@ -0,0 +1,20 @@ +package com.fzzy.igds.dzhwk.domain; + +import lombok.AllArgsConstructor; +import lombok.Data; + +import java.io.Serializable; + +@Data +@AllArgsConstructor +public class GasKey implements Serializable { + private String batchId; + + private String companyId; + + private String depotId; + + public GasKey() { + super(); + } +} \ No newline at end of file diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/ScreenSer.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/ScreenSer.java new file mode 100644 index 0000000..250ca35 --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/ScreenSer.java @@ -0,0 +1,57 @@ +package com.fzzy.igds.dzhwk.domain; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import java.io.Serializable; +import java.util.Date; + +/** + * @Description 鐢靛瓙璐т綅鍗¤澶囧疄浣� + * @Author CZT + * @Date 2025/06/03 17:24 + */ +@Data +@Entity +@Table(name = "H_SCREEN_SER") +public class ScreenSer implements Serializable { + + public static String SORT_PROP = "id"; + + @Id + @PropertyDef(label = "涓婚敭ID") + @Column(name = "ID_", length = 40) + private String id; + + @Column(name = "COMPANY_ID_", length = 10) + @PropertyDef(label = "缁勭粐缂栫爜") + private String companyId; + + @Column(name = "DEPT_ID_", length = 40) + @PropertyDef(label = "鎵�灞炲垎搴�") + private String deptId; + + @PropertyDef(label = "璐т綅鍗N") + @Column(name = "SN_", length = 100) + private String sn; + + @PropertyDef(label = "璁惧鍚嶇О") + @Column(name = "NAME_", length = 100) + private String name; + + @PropertyDef(label = "鎵�灞炲粧闂�") + @Column(name = "ajdh", length = 25) + private String ajdh; + + @Column(name = "REMARK_", length = 200) + @PropertyDef(label = "澶囨敞", description = "澶囨敞淇℃伅") + private String remark; + + @Column(name = "UPDATE_TIME_") + @PropertyDef(label = "鏇存柊鏃堕棿") + private Date updateTime; + +} diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/ScreenSerService.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/ScreenSerService.java new file mode 100644 index 0000000..b1c1774 --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/ScreenSerService.java @@ -0,0 +1,58 @@ +package com.fzzy.igds.dzhwk.service; + +import com.fzzy.igds.dzhwk.domain.Granary; +import com.fzzy.igds.dzhwk.domain.ScreenSer; +import com.fzzy.igds.dzhwk.service.repository.ScreenSerRepository; +import com.fzzy.igds.sys.repository.GranaryRepository; +import com.fzzy.igds.util.ContextUtil; +import com.ruoyi.common.utils.StringUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +/** + * @Description + * @Author CZT + * @Date 2025/06/03 17:44 + */ +@Slf4j +@Service("dzhwk.ScreenSerService") +public class ScreenSerService { + + @Resource + private ScreenSerRepository screenSerRepository; + + public List<ScreenSer> listData(String companyId, String deptId) { + + if (StringUtils.isEmpty(companyId)) { + companyId = ContextUtil.getCompanyId(); + } + if (StringUtils.isEmpty(deptId)) { + deptId = ContextUtil.subDeptId(null); + } + return screenSerRepository.listData(companyId, deptId); + } + + public void saveOrUpdate(ScreenSer data) { + if (StringUtils.isEmpty(data.getCompanyId())) { + data.setCompanyId(ContextUtil.getCompanyId()); + } + if (StringUtils.isEmpty(data.getDeptId())) { + data.setDeptId(ContextUtil.subDeptId(null)); + } + if (StringUtils.isEmpty(data.getId())) { + data.setDeptId(ContextUtil.getUUID()); + } + data.setUpdateTime(new Date()); + screenSerRepository.save(data); + } + + public String delData(ScreenSer data) { + screenSerRepository.delete(data); + return null; + } + +} diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/ScreenSerRepository.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/ScreenSerRepository.java new file mode 100644 index 0000000..1923d78 --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/ScreenSerRepository.java @@ -0,0 +1,28 @@ +package com.fzzy.igds.dzhwk.service.repository; + +import com.fzzy.igds.dzhwk.domain.ScreenSer; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Service; +import java.util.List; + +/** + * @Description + * @Author CZT + * @Date 2025/06/03 17:45 + */ +@Service +public interface ScreenSerRepository extends JpaRepository<ScreenSer, String> { + + /** + * 鏍规嵁缁勭粐缂栫爜鍜屽簱鍖虹紪鐮佽幏鍙栧粧闂翠俊鎭� + * + * @param companyId + * @param deptId + * @return + */ + @Query("from ScreenSer where companyId =:companyId and deptId =:deptId order by ajdh") + List<ScreenSer> listData(@Param("companyId") String companyId, @Param("deptId") String deptId); + +} diff --git a/igds-dzhwk-view/src/main/java/com/fzzy/igds/dzhwk/ScreenSer.view.xml b/igds-dzhwk-view/src/main/java/com/fzzy/igds/dzhwk/ScreenSer.view.xml new file mode 100644 index 0000000..5cbfdc6 --- /dev/null +++ b/igds-dzhwk-view/src/main/java/com/fzzy/igds/dzhwk/ScreenSer.view.xml @@ -0,0 +1,220 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ViewConfig> + <Arguments/> + <Context/> + <Model> + <DataType name="dtMain"> + <Property name="creationType">com.fzzy.igds.dzhwk.domain.ScreenSer</Property> + <PropertyDef name="id"> + <Property></Property> + <Property name="label">涓婚敭ID</Property> + </PropertyDef> + <PropertyDef name="companyId"> + <Property></Property> + <Property name="label">缁勭粐缂栫爜</Property> + </PropertyDef> + <PropertyDef name="deptId"> + <Property></Property> + <Property name="label">鎵�灞炲垎搴�</Property> + <Property name="mapping"> + <Property name="mapValues">${dorado.getDataProvider("deptPR#loadParents").getResult()}</Property> + <Property name="keyProperty">deptId</Property> + <Property name="valueProperty">deptName</Property> + </Property> + <Property name="required">true</Property> + </PropertyDef> + <PropertyDef name="sn"> + <Property></Property> + <Property name="label">璁惧SN</Property> + <Property name="required">true</Property> + </PropertyDef> + <PropertyDef name="name"> + <Property></Property> + <Property name="label">璁惧鍚嶇О</Property> + <Property name="required">true</Property> + </PropertyDef> + <PropertyDef name="ajdh"> + <Property></Property> + <Property name="label">鎵�灞炲粧闂�</Property> + <Property name="mapping"> + <Property name="mapValues">${dorado.getDataProvider("granaryPR#getGranary").getResult()}</Property> + <Property name="keyProperty">ajdh</Property> + <Property name="valueProperty">ajmc</Property> + </Property> + <Property name="required">true</Property> + </PropertyDef> + <PropertyDef name="remark"> + <Property></Property> + <Property name="label">澶囨敞</Property> + </PropertyDef> + <PropertyDef name="updateTime"> + <Property name="dataType">DateTime</Property> + <Property name="label">鏇存柊鏃堕棿</Property> + </PropertyDef> + </DataType> + </Model> + <View> + <Property name="packages">font-awesome,css-common</Property> + <DataSet id="dsMain"> + <Property name="dataProvider">screenSerPR#listData</Property> + <Property name="dataType">[dtMain]</Property> + </DataSet> + <Container> + <Property name="exClassName">c-data</Property> + <ToolBar> + <ToolBarLabel> + <Property name="text">鑿滃崟鏍忥細</Property> + <Property name="exClassName">menu-bar-caption</Property> + </ToolBarLabel> + <ToolBarButton> + <ClientEvent name="onClick">view.get("#dsMain").insert();
 +view.get("#dialogMain").show();</ClientEvent> + <Property name="caption">鏂板</Property> + <Property name="exClassName">btn1</Property> + <Property name="iconClass">fa fa-plus</Property> + </ToolBarButton> + <ToolBarButton> + <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 +if(select){
 + view.get("#dialogMain").show();;
 +}else{
 + $notify("璇烽�夋嫨闇�瑕佷慨鏀圭殑鏁版嵁鈥︹��");
 +}</ClientEvent> + <Property name="caption">缂栬緫</Property> + <Property name="exClassName">btn2</Property> + <Property name="iconClass">fa fa-pencil</Property> + </ToolBarButton> + <ToolBarButton> + <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 +if(select){
 + view.get("#ajaxDel").set("parameter",select).execute(function(){
 + select.remove();
 + });
 +}else{
 + $notify("璇烽�夋嫨闇�瑕佸垹闄ょ殑鏁版嵁鈥︹��");
 +}</ClientEvent> + <Property name="caption">鍒犻櫎</Property> + <Property name="exClassName">btn3</Property> + <Property name="iconClass">fa fa-trash-o</Property> + </ToolBarButton> + </ToolBar> + <DataGrid id="dgMain" layoutConstraint="padding:15px 0px 0px 0px"> + <ClientEvent name="onDataRowClick">view.get("#dgMain").set("selection",arg.data);</ClientEvent> + <Property name="dataSet">dsMain</Property> + <Property name="readOnly">true</Property> + <Property name="selectionMode">singleRow</Property> + <RowSelectorColumn/> + <RowNumColumn/> + <DataColumn name="name"> + <Property name="property">name</Property> + <Property name="align">center</Property> + </DataColumn> + <DataColumn name="sn"> + <Property name="property">sn</Property> + <Property name="align">center</Property> + </DataColumn> + <DataColumn name="ajdh"> + <Property name="property">ajdh</Property> + <Property name="align">center</Property> + </DataColumn> + <DataColumn name="remark"> + <Property name="property">remark</Property> + <Property name="align">center</Property> + </DataColumn> + <DataColumn name="updateTime"> + <Property name="property">updateTime</Property> + <Property name="align">center</Property> + </DataColumn> + </DataGrid> + </Container> + <Dialog id="dialogMain" layout="regionPadding:10"> + <Property name="iconClass">fa fa-pencil-square-o</Property> + <Property name="closeable">false</Property> + <Property name="caption">鐢靛瓙璐т綅鍗¤澶囦俊鎭�</Property> + <Property name="width">60%</Property> + <Property name="iconClass">fa fa-tasks</Property> + <Buttons> + <Button id="btnOk"> + <ClientEvent name="onClick">view.get("#uaSave").execute(function(result){
 + if(result){
 + $alert(result);
 + }else{
 + $notify("淇濆瓨鎴愬姛锛侊紒");
 + view.get("#dialogMain").hide();
 + }
 +});</ClientEvent> + <Property name="caption">纭畾</Property> + <Property name="exClassName">btn1</Property> + <Property name="iconClass">fa fa-check</Property> + </Button> + <Button> + <ClientEvent name="onClick">view.get("#dsMain.data:#").cancel();
 +self.get("parent").hide();</ClientEvent> + <Property name="caption">鍙栨秷</Property> + <Property name="exClassName">btn3</Property> + <Property name="iconClass">fa fa-times</Property> + </Button> + </Buttons> + <Children> + <FieldSet layout="padding:5"> + <Property name="caption">鍩烘湰淇℃伅</Property> + <Buttons/> + <Children> + <AutoForm> + <Property name="dataSet">dsMain</Property> + <Property name="cols">*,*</Property> + <Property name="labelAlign">right</Property> + <Property name="labelSeparator">锛�</Property> + <Property name="labelWidth">150</Property> + <AutoFormElement> + <Property name="name">name</Property> + <Property name="property">name</Property> + <Editor/> + </AutoFormElement> + <AutoFormElement> + <Property name="name">deptId</Property> + <Property name="property">deptId</Property> + <Editor/> + </AutoFormElement> + <AutoFormElement> + <Property name="name">sn</Property> + <Property name="property">sn</Property> + <Editor/> + </AutoFormElement> + <AutoFormElement> + <Property name="name">ajdh</Property> + <Property name="property">ajdh</Property> + <Editor/> + </AutoFormElement> + <AutoFormElement layoutConstraint="colSpan:2"> + <Property name="name">remark</Property> + <Property name="property">remark</Property> + <Editor/> + </AutoFormElement> + <AutoFormElement> + <Property name="name">updateTime</Property> + <Property name="property">updateTime</Property> + <Property name="readOnly">true</Property> + <Editor/> + </AutoFormElement> + </AutoForm> + </Children> + </FieldSet> + </Children> + <Tools/> + </Dialog> + <UpdateAction id="uaSave"> + <Property name="dataResolver">screenSerPR#saveData</Property> + <Property name="successMessage">鏁版嵁淇濆瓨瀹屾垚锛�</Property> + <UpdateItem> + <Property name="dataSet">dsMain</Property> + <Property name="dataPath">[#current]</Property> + <Property name="validateData">false</Property> + </UpdateItem> + </UpdateAction> + <AjaxAction id="ajaxDel"> + <Property name="service">screenSerPR#delData</Property> + <Property name="confirmMessage">纭畾瑕佹墽琛屽垹闄や箞锛�</Property> + </AjaxAction> + </View> +</ViewConfig> diff --git a/igds-dzhwk-view/src/main/java/com/fzzy/igds/dzhwk/pr/ScreenSerPR.java b/igds-dzhwk-view/src/main/java/com/fzzy/igds/dzhwk/pr/ScreenSerPR.java new file mode 100644 index 0000000..e4d5cd6 --- /dev/null +++ b/igds-dzhwk-view/src/main/java/com/fzzy/igds/dzhwk/pr/ScreenSerPR.java @@ -0,0 +1,57 @@ +package com.fzzy.igds.dzhwk.pr; + +import com.bstek.dorado.annotation.DataProvider; +import com.bstek.dorado.annotation.DataResolver; +import com.bstek.dorado.annotation.Expose; +import com.fzzy.igds.dzhwk.domain.ScreenSer; +import com.fzzy.igds.dzhwk.service.ScreenSerService; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Component; +import javax.annotation.Resource; +import java.util.List; + +/** + * @Description + * @Author CZT + * @Date 2025/06/03 17:42 + */ +@Component +public class ScreenSerPR { + + @Resource + private ScreenSerService screenSerService; + + /** + * screenSerPR#listData + * @return + */ + @DataProvider + public List<ScreenSer> listData() { + return screenSerService.listData(null, null); + } + + /** + * screenSerPR#saveData 鏂板鎴栬�呬慨鏀� + * + * @param data + */ + @DataResolver + public void saveData(ScreenSer data) { + ScreenSer item = new ScreenSer(); + BeanUtils.copyProperties(data, item); + screenSerService.saveOrUpdate(item); + } + + /** + * granaryPR#delData + * + * @param data + */ + @Expose + public String delData(ScreenSer data){ + ScreenSer item = new ScreenSer(); + BeanUtils.copyProperties(data, item); + return screenSerService.delData(item); + } + +} diff --git a/igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/DepotConf.view.xml b/igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/DepotConf.view.xml index 0b63371..7bfe099 100644 --- a/igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/DepotConf.view.xml +++ b/igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/DepotConf.view.xml @@ -3,7 +3,7 @@ <Arguments/> <Context/> <Model/> - <View layout="padding:5;regionPadding:5"> + <View> <ClientEvent name="onReady">var depotList = null;
 </ClientEvent> <Property name="packages">font-awesome,css-common</Property> @@ -11,106 +11,104 @@ <Property name="dataProvider">depotConfPR#getConfList</Property> <Property name="dataType">[dtDepotConf]</Property> </DataSet> - <Container layout="regionPadding:10" layoutConstraint="top"> - <Property name="exClassName">bg-color</Property> - <Property name="height">55</Property> - <Property name="contentOverflow">hidden</Property> - <Label layoutConstraint="left"> - <Property name="text">鑿滃崟鏍忥細</Property> - </Label> - <Button layoutConstraint="left"> - <ClientEvent name="onClick">view.get("#dsMain").insert();
 + <Container> + <Property name="exClassName">c-data</Property> + <ToolBar> + <ToolBarLabel> + <Property name="text">鑿滃崟鏍忥細</Property> + <Property name="exClassName">menu-bar-caption</Property> + </ToolBarLabel> + <ToolBarButton layoutConstraint="left"> + <ClientEvent name="onClick">view.get("#dsMain").insert();
 view.get("#depotId").set("readOnly",false);
 view.get("#dgMain").show();</ClientEvent> - <Property name="caption">鏂板</Property> - <Property name="exClassName">btn1</Property> - <Property name="iconClass">fa fa-plus</Property> - </Button> - <Button layoutConstraint="left"> - <ClientEvent name="onClick">var select = view.get("#dataGridMain").get("selection");
 + <Property name="caption">鏂板</Property> + <Property name="exClassName">btn1</Property> + <Property name="iconClass">fa fa-plus</Property> + </ToolBarButton> + <ToolBarButton layoutConstraint="left"> + <ClientEvent name="onClick">var select = view.get("#dataGridMain").get("selection");
 if(select){
 view.get("#dgMain").show();
 view.get("#depotId").set("readOnly",true);
 }else{
 $notify("璇烽�夋嫨闇�瑕佷慨鏀圭殑鏁版嵁鈥︹��");
 }</ClientEvent> - <Property name="caption">淇敼</Property> - <Property name="exClassName">btn2</Property> - <Property name="iconClass">fa fa-pencil</Property> - </Button> - <Button layoutConstraint="left"> - <ClientEvent name="onClick">
 + <Property name="caption">淇敼</Property> + <Property name="exClassName">btn2</Property> + <Property name="iconClass">fa fa-pencil</Property> + </ToolBarButton> + <ToolBarButton layoutConstraint="left"> + <ClientEvent name="onClick">
 
 var select = view.get("#dataGridMain").get("selection");
 if(select){
 view.get("#ajaxDel2").set("parameter",select).execute(function(result){
 - if(result){
 - $alert(result);
 - }else{
 - entity.remove();
 - }
 - });
 + if(result){
 + $alert(result);
 + }else{
 + entity.remove();
 + }
 + });
 }else{
 $notify("璇烽�夋嫨闇�瑕佸垹闄ょ殑鏁版嵁鈥︹��");
 }</ClientEvent> - <Property name="caption">鍒犻櫎</Property> - <Property name="exClassName">btn3</Property> - <Property name="iconClass">fa fa-trash-o</Property> - </Button> - <Button layoutConstraint="left"> - <Property name="caption">鍒锋柊缂撳瓨</Property> - <Property name="exClassName">btn-flush</Property> - <Property name="iconClass">fa fa-refresh</Property> - <Property name="action">ajaxRefreshCache</Property> - </Button> + <Property name="caption">鍒犻櫎</Property> + <Property name="exClassName">btn3</Property> + <Property name="iconClass">fa fa-trash-o</Property> + </ToolBarButton> + <ToolBarButton layoutConstraint="left"> + <Property name="caption">鍒锋柊缂撳瓨</Property> + <Property name="exClassName">btn-flush</Property> + <Property name="iconClass">fa fa-refresh</Property> + <Property name="action">ajaxRefreshCache</Property> + </ToolBarButton> + </ToolBar> + <DataGrid id="dataGridMain" layoutConstraint="padding:15px 0px 0px 0px"> + <ClientEvent name="onDataRowClick">view.get("#dataGridMain").set("selection",arg.data);</ClientEvent> + <Property name="dataSet">dsMain</Property> + <Property name="readOnly">true</Property> + <Property name="selectionMode">singleRow</Property> + <RowSelectorColumn/> + <RowNumColumn/> + <DataColumn name="depotId"> + <Property name="property">depotId</Property> + <Property name="align">center</Property> + </DataColumn> + <DataColumn name="grainSer"> + <Property name="property">grainSer</Property> + <Property name="align">center</Property> + </DataColumn> + <DataColumn> + <Property name="property">cableRule</Property> + <Property name="align">center</Property> + <Property name="name">cableRule</Property> + </DataColumn> + <DataColumn name="cableCir"> + <Property name="property">cableCir</Property> + <Property name="align">center</Property> + </DataColumn> + <DataColumn name="tempMax"> + <Property name="property">tempMax</Property> + <Property name="align">center</Property> + </DataColumn> + <DataColumn name="grainFreq"> + <Property name="property">grainFreq</Property> + </DataColumn> + <DataColumn name="n2Max"> + <Property name="property">n2Max</Property> + </DataColumn> + <DataColumn name="co2Max"> + <Property name="property">co2Max</Property> + </DataColumn> + <DataColumn name="o2Max"> + <Property name="property">o2Max</Property> + </DataColumn> + <DataColumn name="ph3Max"> + <Property name="property">ph3Max</Property> + </DataColumn> + </DataGrid> </Container> - <DataGrid id="dataGridMain" layoutConstraint="center "> - <ClientEvent name="onDataRowDoubleClick">var cur = view.get("#dsMain.data:#");
 -if(!cur) return ;
 -view.get("#depotId").set("readOnly",true);
 -view.get("#dgMain").show();</ClientEvent> - <Property name="dataSet">dsMain</Property> - <Property name="readOnly">true</Property> - <Property name="selectionMode">singleRow</Property> - <RowSelectorColumn/> - <RowNumColumn/> - <DataColumn name="depotId"> - <Property name="property">depotId</Property> - <Property name="align">center</Property> - </DataColumn> - <DataColumn name="grainSer"> - <Property name="property">grainSer</Property> - <Property name="align">center</Property> - </DataColumn> - <DataColumn> - <Property name="property">cableRule</Property> - <Property name="align">center</Property> - <Property name="name">cableRule</Property> - </DataColumn> - <DataColumn name="cableCir"> - <Property name="property">cableCir</Property> - <Property name="align">center</Property> - </DataColumn> - <DataColumn name="tempMax"> - <Property name="property">tempMax</Property> - <Property name="align">center</Property> - </DataColumn> - <DataColumn name="grainFreq"> - <Property name="property">grainFreq</Property> - </DataColumn> - <DataColumn name="n2Max"> - <Property name="property">n2Max</Property> - </DataColumn> - <DataColumn name="co2Max"> - <Property name="property">co2Max</Property> - </DataColumn> - <DataColumn name="o2Max"> - <Property name="property">o2Max</Property> - </DataColumn> - <DataColumn name="ph3Max"> - <Property name="property">ph3Max</Property> - </DataColumn> - </DataGrid> <UpdateAction id="uaMain"> <Property name="dataResolver">depotConfPR#saveConf</Property> <UpdateItem> diff --git a/igds-dzhwk-web/src/main/java/com/fzzy/igds/dzhwk/controller/WebController.java b/igds-dzhwk-web/src/main/java/com/fzzy/igds/dzhwk/controller/WebController.java index a84f9ea..24533a2 100644 --- a/igds-dzhwk-web/src/main/java/com/fzzy/igds/dzhwk/controller/WebController.java +++ b/igds-dzhwk-web/src/main/java/com/fzzy/igds/dzhwk/controller/WebController.java @@ -7,12 +7,9 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; - import javax.annotation.Resource; -import java.util.List; /** * @Description @@ -30,24 +27,13 @@ private WebManager webManager; /** - * 閿佸睆 - * @param view - * @return - */ - @RequestMapping("/lock") - public String lock(@RequestParam(value = "flag", required = true) String flag, ModelMap view) { - view.put("flag", flag); - return prefix + "lock"; - } - - /** * 棣栭〉 + * @param gid 寤掗棿id * @param view * @return */ @RequestMapping("/index") - public String index(ModelMap view) { - view.put("flag", "index"); + public String index(@RequestParam(value = "gid", required = false) String gid, ModelMap view) { String videoUrl = dzhwkConfigData.getDzhwkVideo().replace(dzhwkConfigData.getProfile(),"/profile/"); view.put("videoUrl", videoUrl); @@ -267,8 +253,16 @@ return prefix + "sys"; } - - + /** + * 閿佸睆 + * @param view + * @return + */ + @RequestMapping("/lock") + public String lock(@RequestParam(value = "flag", required = true) String flag, ModelMap view) { + view.put("flag", flag); + return prefix + "lock"; + } /** * 瑙嗛棰勮椤甸潰 -- Gitblit v1.9.3