소스 검색

调整: 补齐住宿联动所需的基础对象与级联配置

1. 扩展 CdPo 并新增 CdsyPo、NbcdPo、CdU,补齐内务床位、宿舍统计及床位对象定义,支持住宿模块读取房间与床位状态。

2. 增加入学年度-班级-学员、宿舍楼-客房-床位等级联与查询服务,补充 DwServ、XyBaseInfoServ 以及 cd/dw/xy 相关 cb、ccp、sql、serv 配置。

3. 验证:已完成暂存差异复核;未执行完整编译与自动化测试,环境配置文件未纳入本次提交。
“gaohp” 4 달 전
부모
커밋
117e6c4c9a

+ 328 - 97
src/base/po/CdPo.java

@@ -1,99 +1,330 @@
 package base.po;
-import ss.db.Po;
-import ss.db.DbC;
-import java.sql.Date;
-import java.sql.Timestamp;
+
 import java.util.Map;
-public class CdPo extends Po{
-{super.fieldTypeMap = Map.<String, Integer>ofEntries(Map.entry("zdrnrs",DbC.PO_intType),Map.entry("dh",DbC.PO_StringType),Map.entry("ls",DbC.PO_intType),Map.entry("rnrs",DbC.PO_intType),Map.entry("fzbmid",DbC.PO_LongType),Map.entry("sltwj",DbC.PO_StringType),Map.entry("hs",DbC.PO_intType),Map.entry("jzwid",DbC.PO_LongType),Map.entry("snmj",DbC.PO_FloatType),Map.entry("fzryid",DbC.PO_LongType),Map.entry("cdztm",DbC.PO_intType),Map.entry("cdid",DbC.PO_longType),Map.entry("cdlbm",DbC.PO_intType),Map.entry("mc",DbC.PO_StringType),Map.entry("ksxzm",DbC.PO_IntegerType),Map.entry("sfbz",DbC.PO_intType),Map.entry("jzmj",DbC.PO_FloatType),Map.entry("lcid",DbC.PO_LongType),Map.entry("fjh",DbC.PO_StringType),Map.entry("cdh",DbC.PO_StringType),Map.entry("ms",DbC.PO_StringType),Map.entry("glbmid",DbC.PO_LongType),Map.entry("glryid",DbC.PO_LongType),Map.entry("pmtid",DbC.PO_LongType),Map.entry("fjid",DbC.PO_LongType),Map.entry("cjryid",DbC.PO_LongType),Map.entry("jlztm",DbC.PO_intType),Map.entry("yhj",DbC.PO_intType),Map.entry("sfyppt",DbC.PO_booleanType));}
-private int zdrnrs=0;
-private String dh;
-private int ls=0;
-private int rnrs=0;
-private Long fzbmid;
-private String sltwj;
-private int hs=0;
-private Long jzwid;
-private Float snmj=0F;
-private Long fzryid;
-private int cdztm=1;
-private long cdid;
-private int cdlbm;
-private String mc;
-private Integer ksxzm;
-private int sfbz=0;
-private Float jzmj=0F;
-private Long lcid;
-private String fjh;
-private String cdh;
-private String ms;
-private Long glbmid;
-private Long glryid;
-private Long pmtid;
-private Long fjid;
-private Long cjryid;
-private int jlztm=1;
-private int yhj=0;
-private int sfyppt=0;
-public CdPo(){super.tabName="cd";super.idName="cdid";}
-@Override public long rdIdVal(){return this.cdid;}
-@Override public void wrIdVal(long id){this.cdid=id;}
-public int getZdrnrs(){return this.zdrnrs;}
-public void setZdrnrs(int v){this.zdrnrs=v;}
-public String getDh(){return this.dh;}
-public void setDh(String v){this.dh=v;}
-public int getLs(){return this.ls;}
-public void setLs(int v){this.ls=v;}
-public int getRnrs(){return this.rnrs;}
-public void setRnrs(int v){this.rnrs=v;}
-public Long getFzbmid(){return this.fzbmid;}
-public void setFzbmid(Long v){this.fzbmid=v;}
-public String getSltwj(){return this.sltwj;}
-public void setSltwj(String v){this.sltwj=v;}
-public int getHs(){return this.hs;}
-public void setHs(int v){this.hs=v;}
-public Long getJzwid(){return this.jzwid;}
-public void setJzwid(Long v){this.jzwid=v;}
-public Float getSnmj(){return this.snmj;}
-public void setSnmj(Float v){this.snmj=v;}
-public Long getFzryid(){return this.fzryid;}
-public void setFzryid(Long v){this.fzryid=v;}
-public int getCdztm(){return this.cdztm;}
-public void setCdztm(int v){this.cdztm=v;}
-public long getCdid(){return this.cdid;}
-public void setCdid(long v){this.cdid=v;}
-public int getCdlbm(){return this.cdlbm;}
-public void setCdlbm(int v){this.cdlbm=v;}
-public String getMc(){return this.mc;}
-public void setMc(String v){this.mc=v;}
-public Integer getKsxzm(){return this.ksxzm;}
-public void setKsxzm(Integer v){this.ksxzm=v;}
-public int getSfbz(){return this.sfbz;}
-public void setSfbz(int v){this.sfbz=v;}
-public Float getJzmj(){return this.jzmj;}
-public void setJzmj(Float v){this.jzmj=v;}
-public Long getLcid(){return this.lcid;}
-public void setLcid(Long v){this.lcid=v;}
-public String getFjh(){return this.fjh;}
-public void setFjh(String v){this.fjh=v;}
-public String getCdh(){return this.cdh;}
-public void setCdh(String v){this.cdh=v;}
-public String getMs(){return this.ms;}
-public void setMs(String v){this.ms=v;}
-public Long getGlbmid(){return this.glbmid;}
-public void setGlbmid(Long v){this.glbmid=v;}
-public Long getGlryid(){return this.glryid;}
-public void setGlryid(Long v){this.glryid=v;}
-public Long getPmtid(){return this.pmtid;}
-public void setPmtid(Long v){this.pmtid=v;}
-public Long getFjid(){return this.fjid;}
-public void setFjid(Long v){this.fjid=v;}
-public Long getCjryid(){return this.cjryid;}
-public void setCjryid(Long v){this.cjryid=v;}
-public int getJlztm(){return this.jlztm;}
-public void setJlztm(int v){this.jlztm=v;}
-public int getYhj(){return this.yhj;}
-public void setYhj(int v){this.yhj=v;}
-public int getSfyppt(){return this.sfyppt;}
-public void setSfyppt(int v){this.sfyppt=v;}
-}
+
+import ss.db.DbC;
+import ss.db.Po;
+
+public class CdPo extends Po {
+
+	{
+		super.fieldTypeMap = Map.<String, Integer>ofEntries(
+				Map.entry("zdrnrs", DbC.PO_intType),
+				Map.entry("nbcds", DbC.PO_IntegerType),
+				Map.entry("dh", DbC.PO_StringType),
+				Map.entry("ls", DbC.PO_intType),
+				Map.entry("rnrs", DbC.PO_intType),
+				Map.entry("fzbmid", DbC.PO_LongType),
+				Map.entry("sltwj", DbC.PO_StringType),
+				Map.entry("hs", DbC.PO_intType),
+				Map.entry("jzwid", DbC.PO_LongType),
+				Map.entry("snmj", DbC.PO_FloatType),
+				Map.entry("fzryid", DbC.PO_LongType),
+				Map.entry("cdztm", DbC.PO_intType),
+				Map.entry("cdid", DbC.PO_longType),
+				Map.entry("cdlbm", DbC.PO_intType),
+				Map.entry("mc", DbC.PO_StringType),
+				Map.entry("ksxzm", DbC.PO_IntegerType),
+				Map.entry("sfbz", DbC.PO_intType),
+				Map.entry("jzmj", DbC.PO_FloatType),
+				Map.entry("lcid", DbC.PO_LongType),
+				Map.entry("fjh", DbC.PO_StringType),
+				Map.entry("cdh", DbC.PO_StringType),
+				Map.entry("ms", DbC.PO_StringType),
+				Map.entry("glbmid", DbC.PO_LongType),
+				Map.entry("glryid", DbC.PO_LongType),
+				Map.entry("pmtid", DbC.PO_LongType),
+				Map.entry("fjid", DbC.PO_LongType),
+				Map.entry("cjryid", DbC.PO_LongType),
+				Map.entry("jlztm", DbC.PO_intType),
+				Map.entry("yhj", DbC.PO_intType),
+				Map.entry("sfyppt", DbC.PO_booleanType)
+		);
+	}
+
+	private int zdrnrs = 0;
+	private Integer nbcds = 0;
+	private String dh;
+	private int ls = 0;
+	private int rnrs = 0;
+	private Long fzbmid;
+	private String sltwj;
+	private int hs = 0;
+	private Long jzwid;
+	private Float snmj = 0F;
+	private Long fzryid;
+	private int cdztm = 1;
+	private long cdid;
+	private int cdlbm;
+	private String mc;
+	private Integer ksxzm;
+	private int sfbz = 0;
+	private Float jzmj = 0F;
+	private Long lcid;
+	private String fjh;
+	private String cdh;
+	private String ms;
+	private Long glbmid;
+	private Long glryid;
+	private Long pmtid;
+	private Long fjid;
+	private Long cjryid;
+	private int jlztm = 1;
+	private int yhj = 0;
+	private int sfyppt = 0;
+
+	public CdPo() {
+		super.tabName = "cd";
+		super.idName = "cdid";
+	}
+
+	@Override
+	public long rdIdVal() {
+		return this.cdid;
+	}
+
+	@Override
+	public void wrIdVal(long id) {
+		this.cdid = id;
+	}
+
+	public int getZdrnrs() {
+		return this.zdrnrs;
+	}
+
+	public void setZdrnrs(int v) {
+		this.zdrnrs = v;
+	}
+
+	public Integer getNbcds() {
+		return this.nbcds;
+	}
+
+	public void setNbcds(Integer v) {
+		this.nbcds = v;
+	}
+
+	public String getDh() {
+		return this.dh;
+	}
+
+	public void setDh(String v) {
+		this.dh = v;
+	}
+
+	public int getLs() {
+		return this.ls;
+	}
+
+	public void setLs(int v) {
+		this.ls = v;
+	}
+
+	public int getRnrs() {
+		return this.rnrs;
+	}
+
+	public void setRnrs(int v) {
+		this.rnrs = v;
+	}
+
+	public Long getFzbmid() {
+		return this.fzbmid;
+	}
+
+	public void setFzbmid(Long v) {
+		this.fzbmid = v;
+	}
+
+	public String getSltwj() {
+		return this.sltwj;
+	}
+
+	public void setSltwj(String v) {
+		this.sltwj = v;
+	}
+
+	public int getHs() {
+		return this.hs;
+	}
+
+	public void setHs(int v) {
+		this.hs = v;
+	}
+
+	public Long getJzwid() {
+		return this.jzwid;
+	}
+
+	public void setJzwid(Long v) {
+		this.jzwid = v;
+	}
+
+	public Float getSnmj() {
+		return this.snmj;
+	}
+
+	public void setSnmj(Float v) {
+		this.snmj = v;
+	}
+
+	public Long getFzryid() {
+		return this.fzryid;
+	}
+
+	public void setFzryid(Long v) {
+		this.fzryid = v;
+	}
+
+	public int getCdztm() {
+		return this.cdztm;
+	}
+
+	public void setCdztm(int v) {
+		this.cdztm = v;
+	}
+
+	public long getCdid() {
+		return this.cdid;
+	}
+
+	public void setCdid(long v) {
+		this.cdid = v;
+	}
+
+	public int getCdlbm() {
+		return this.cdlbm;
+	}
+
+	public void setCdlbm(int v) {
+		this.cdlbm = v;
+	}
+
+	public String getMc() {
+		return this.mc;
+	}
+
+	public void setMc(String v) {
+		this.mc = v;
+	}
+
+	public Integer getKsxzm() {
+		return this.ksxzm;
+	}
+
+	public void setKsxzm(Integer v) {
+		this.ksxzm = v;
+	}
+
+	public int getSfbz() {
+		return this.sfbz;
+	}
+
+	public void setSfbz(int v) {
+		this.sfbz = v;
+	}
+
+	public Float getJzmj() {
+		return this.jzmj;
+	}
+
+	public void setJzmj(Float v) {
+		this.jzmj = v;
+	}
+
+	public Long getLcid() {
+		return this.lcid;
+	}
+
+	public void setLcid(Long v) {
+		this.lcid = v;
+	}
+
+	public String getFjh() {
+		return this.fjh;
+	}
+
+	public void setFjh(String v) {
+		this.fjh = v;
+	}
+
+	public String getCdh() {
+		return this.cdh;
+	}
+
+	public void setCdh(String v) {
+		this.cdh = v;
+	}
+
+	public String getMs() {
+		return this.ms;
+	}
+
+	public void setMs(String v) {
+		this.ms = v;
+	}
+
+	public Long getGlbmid() {
+		return this.glbmid;
+	}
+
+	public void setGlbmid(Long v) {
+		this.glbmid = v;
+	}
+
+	public Long getGlryid() {
+		return this.glryid;
+	}
+
+	public void setGlryid(Long v) {
+		this.glryid = v;
+	}
+
+	public Long getPmtid() {
+		return this.pmtid;
+	}
+
+	public void setPmtid(Long v) {
+		this.pmtid = v;
+	}
+
+	public Long getFjid() {
+		return this.fjid;
+	}
+
+	public void setFjid(Long v) {
+		this.fjid = v;
+	}
+
+	public Long getCjryid() {
+		return this.cjryid;
+	}
+
+	public void setCjryid(Long v) {
+		this.cjryid = v;
+	}
+
+	public int getJlztm() {
+		return this.jlztm;
+	}
+
+	public void setJlztm(int v) {
+		this.jlztm = v;
+	}
+
+	public int getYhj() {
+		return this.yhj;
+	}
+
+	public void setYhj(int v) {
+		this.yhj = v;
+	}
+
+	public int getSfyppt() {
+		return this.sfyppt;
+	}
+
+	public void setSfyppt(int v) {
+		this.sfyppt = v;
+	}
+}

+ 78 - 0
src/base/po/CdsyPo.java

@@ -0,0 +1,78 @@
+package base.po;
+import ss.db.Po;
+import ss.db.DbC;
+import java.sql.Date;
+import java.sql.Timestamp;
+import java.util.Map;
+public class CdsyPo extends Po{
+{super.fieldTypeMap = Map.<String, Integer>ofEntries(Map.entry("cdsyid",DbC.PO_longType),Map.entry("ms",DbC.PO_StringType),Map.entry("syyq",DbC.PO_StringType),Map.entry("glbmid",DbC.PO_LongType),Map.entry("rxnd",DbC.PO_DateType),Map.entry("kssj",DbC.PO_TimestampType),Map.entry("syr",DbC.PO_StringType),Map.entry("glryid",DbC.PO_LongType),Map.entry("cdydid",DbC.PO_LongType),Map.entry("syrs",DbC.PO_IntegerType),Map.entry("jssj",DbC.PO_TimestampType),Map.entry("yj",DbC.PO_IntegerType),Map.entry("cdid",DbC.PO_longType),Map.entry("cjryid",DbC.PO_LongType),Map.entry("syryid",DbC.PO_LongType),Map.entry("zktdid",DbC.PO_LongType),Map.entry("zkid",DbC.PO_LongType),Map.entry("jsje",DbC.PO_FloatType),Map.entry("sybmid",DbC.PO_LongType),Map.entry("nbcdid",DbC.PO_LongType),Map.entry("jlztm",DbC.PO_intType),Map.entry("sybjid",DbC.PO_LongType));}
+private long cdsyid;
+private String ms;
+private String syyq;
+private Long glbmid;
+private Date rxnd;
+private Timestamp kssj;
+private String syr;
+private Long glryid;
+private Long cdydid;
+private Integer syrs=0;
+private Timestamp jssj;
+private Integer yj=0;
+private long cdid;
+private Long cjryid;
+private Long syryid;
+private Long zktdid;
+private Long zkid;
+private Float jsje=0F;
+private Long sybmid;
+private Long nbcdid;
+private int jlztm=1;
+private Long sybjid;
+public CdsyPo(){super.tabName="cdsy";super.idName="cdsyid";}
+@Override public long rdIdVal(){return this.cdsyid;}
+@Override public void wrIdVal(long id){this.cdsyid=id;}
+public long getCdsyid(){return this.cdsyid;}
+public void setCdsyid(long v){this.cdsyid=v;}
+public String getMs(){return this.ms;}
+public void setMs(String v){this.ms=v;}
+public String getSyyq(){return this.syyq;}
+public void setSyyq(String v){this.syyq=v;}
+public Long getGlbmid(){return this.glbmid;}
+public void setGlbmid(Long v){this.glbmid=v;}
+public Date getRxnd(){return this.rxnd;}
+public void setRxnd(Date v){this.rxnd=v;}
+public Timestamp getKssj(){return this.kssj;}
+public void setKssj(Timestamp v){this.kssj=v;}
+public String getSyr(){return this.syr;}
+public void setSyr(String v){this.syr=v;}
+public Long getGlryid(){return this.glryid;}
+public void setGlryid(Long v){this.glryid=v;}
+public Long getCdydid(){return this.cdydid;}
+public void setCdydid(Long v){this.cdydid=v;}
+public Integer getSyrs(){return this.syrs;}
+public void setSyrs(Integer v){this.syrs=v;}
+public Timestamp getJssj(){return this.jssj;}
+public void setJssj(Timestamp v){this.jssj=v;}
+public Integer getYj(){return this.yj;}
+public void setYj(Integer v){this.yj=v;}
+public long getCdid(){return this.cdid;}
+public void setCdid(long v){this.cdid=v;}
+public Long getCjryid(){return this.cjryid;}
+public void setCjryid(Long v){this.cjryid=v;}
+public Long getSyryid(){return this.syryid;}
+public void setSyryid(Long v){this.syryid=v;}
+public Long getZktdid(){return this.zktdid;}
+public void setZktdid(Long v){this.zktdid=v;}
+public Long getZkid(){return this.zkid;}
+public void setZkid(Long v){this.zkid=v;}
+public Float getJsje(){return this.jsje;}
+public void setJsje(Float v){this.jsje=v;}
+public Long getSybmid(){return this.sybmid;}
+public void setSybmid(Long v){this.sybmid=v;}
+public Long getNbcdid(){return this.nbcdid;}
+public void setNbcdid(Long v){this.nbcdid=v;}
+public int getJlztm(){return this.jlztm;}
+public void setJlztm(int v){this.jlztm=v;}
+public Long getSybjid(){return this.sybjid;}
+public void setSybjid(Long v){this.sybjid=v;}
+}

+ 42 - 0
src/base/po/NbcdPo.java

@@ -0,0 +1,42 @@
+package base.po;
+import ss.db.Po;
+import ss.db.DbC;
+import java.sql.Date;
+import java.sql.Timestamp;
+import java.util.Map;
+public class NbcdPo extends Po{
+{super.fieldTypeMap = Map.<String, Integer>ofEntries(Map.entry("cdztm",DbC.PO_intType),Map.entry("cdid",DbC.PO_longType),Map.entry("cjryid",DbC.PO_LongType),Map.entry("mc",DbC.PO_StringType),Map.entry("ms",DbC.PO_StringType),Map.entry("nbcdid",DbC.PO_longType),Map.entry("rnrs",DbC.PO_IntegerType),Map.entry("glbmid",DbC.PO_LongType),Map.entry("jlztm",DbC.PO_intType),Map.entry("glryid",DbC.PO_LongType));}
+private int cdztm=1;
+private long cdid;
+private Long cjryid;
+private String mc;
+private String ms;
+private long nbcdid;
+private Integer rnrs=0;
+private Long glbmid;
+private int jlztm=1;
+private Long glryid;
+public NbcdPo(){super.tabName="nbcd";super.idName="nbcdid";}
+@Override public long rdIdVal(){return this.nbcdid;}
+@Override public void wrIdVal(long id){this.nbcdid=id;}
+public int getCdztm(){return this.cdztm;}
+public void setCdztm(int v){this.cdztm=v;}
+public long getCdid(){return this.cdid;}
+public void setCdid(long v){this.cdid=v;}
+public Long getCjryid(){return this.cjryid;}
+public void setCjryid(Long v){this.cjryid=v;}
+public String getMc(){return this.mc;}
+public void setMc(String v){this.mc=v;}
+public String getMs(){return this.ms;}
+public void setMs(String v){this.ms=v;}
+public long getNbcdid(){return this.nbcdid;}
+public void setNbcdid(long v){this.nbcdid=v;}
+public Integer getRnrs(){return this.rnrs;}
+public void setRnrs(Integer v){this.rnrs=v;}
+public Long getGlbmid(){return this.glbmid;}
+public void setGlbmid(Long v){this.glbmid=v;}
+public int getJlztm(){return this.jlztm;}
+public void setJlztm(int v){this.jlztm=v;}
+public Long getGlryid(){return this.glryid;}
+public void setGlryid(Long v){this.glryid=v;}
+}

+ 3 - 0
src/biz/cd/CdC.java

@@ -13,6 +13,9 @@ public class CdC {
 
 
 	// 场地状态。Lin
+	public static final int CDZT_kx = 1;	// 空闲。Lin
+	public static final int CDZT_syz = 151;	// 使用中。Lin
+	public static final int CDZT_bfsyz = 155;	// 部分使用中。Lin
 	public static final int CDZT_bf = 81;	// 报废。Lin
 
 

+ 37 - 0
src/biz/cd/CdU.java

@@ -0,0 +1,37 @@
+package biz.cd;
+
+import java.sql.SQLException;
+
+import ss.db.Db;
+import ss.db.SqlCmd;
+import ss.obj.ObjC;
+
+public class CdU {
+
+	public static void refreshCdCdztm(long cdid, Db gdba) throws SQLException {
+		SqlCmd cmd = new SqlCmd("select NBCDS,CDZTM from CD where CDID=:cdid");
+		cmd.wrLongParm("cdid", cdid);
+		gdba.doSelByC(cmd);
+		int nbcds = gdba.rdIntCol("nbcds");
+		if (nbcds > 0) {
+			int curCdztm = gdba.rdIntCol("cdztm");
+			cmd = new SqlCmd("select count(*) rowcnt from CDSY where CDID=:cdid and JSSJ is null and " + ObjC.JLZT_useStr);
+			cmd.wrLongParm("cdid", cdid);
+			gdba.doSelByC(cmd);
+			int inUseNbcds = gdba.rdIntCol("rowcnt");
+			int newCdztm;
+			if (inUseNbcds == 0)
+				newCdztm = CdC.CDZT_kx;
+			else if (inUseNbcds >= nbcds)
+				newCdztm = CdC.CDZT_syz;
+			else
+				newCdztm = CdC.CDZT_bfsyz;
+			if (newCdztm != curCdztm) {
+				cmd = new SqlCmd("update CD set CDZTM=:cdztm where CDID=:cdid");
+				cmd.wrIntParm("cdztm", newCdztm);
+				cmd.wrLongParm("cdid", cdid);
+				gdba.doModByC(cmd);
+			}
+		}
+	}
+}

+ 6 - 0
src/biz/ry/DwC.java

@@ -21,4 +21,10 @@ public class DwC {
 	public static final String XIAOQ_hdSn = "hd";	// 花都。Lin
 	public static final String XIAOQ_ssSn = "ss";	// 三水。Lin
 
+
+	// 就读方式。Lin
+	public static final int JDFS_zd = 1;	// 走读。Lin
+	public static final int JDFS_zx = 2;	// 住校。Lin
+	public static final int JDFS_tings = 52;	// 停宿。Lin
+
 }

+ 42 - 0
src/biz/ry/DwServ.java

@@ -0,0 +1,42 @@
+package biz.ry;
+
+import java.time.LocalDate;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import ss.cb.CbC;
+import ss.serv.Serv;
+
+
+public class DwServ extends Serv {
+
+	String transCode;	// 值来自 CbU.transCbByC(。Lin
+
+
+// === 码本
+
+	@SuppressWarnings("unused")
+	public Map<Integer, Map<String, String>> rxnd() {
+		Map<Integer, Map<String, String>> result = new HashMap<>();
+
+		Map<String, String> map = new LinkedHashMap<>();
+		LocalDate today = LocalDate.now();
+		int year = today.getYear();
+		for (int i = 0; i < 8; i++, year--) {
+			String yearStr = String.valueOf(year);
+			map.put(yearStr + "-01-01", yearStr + "年");
+		}
+
+		result.put(CbC.MAP_optKeyVal, map);
+		return result;
+	}
+
+	public String transRxnd() {
+		if (this.transCode == null)
+			return "*** 没有code值 ***";
+		String code = this.transCode.substring(0, 4);
+		return code + "年";
+	}
+
+}

+ 44 - 0
src/biz/xy/XyBaseInfoServ.java

@@ -0,0 +1,44 @@
+package biz.xy;
+
+import java.io.Writer;
+import java.util.Map;
+
+import com.google.gson.Gson;
+import jakarta.servlet.http.HttpServletRequest;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import ss.db.Db;
+import ss.db.SqlCmd;
+import ss.serv.Serv;
+import ss.serv.ServU;
+
+public class XyBaseInfoServ extends Serv {
+
+	private static final Logger log4j = LogManager.getLogger(XyBaseInfoServ.class);
+
+	@SuppressWarnings("unused")
+	public void selBaseInfoByXyidByA() throws Exception {
+		HttpServletRequest request = super.req;
+		Writer writer = super.resp.getWriter();
+		Gson gson = new Gson();
+
+		try (Db gdba = Db.makeConn()) {
+			String ryid = request.getParameter("ryid");
+			if (StringUtils.isBlank(ryid)) {
+				ServU.wrErrMsgByWriter(null, "参数异常", writer, gson);
+				return;
+			}
+
+			SqlCmd sqlCmd = new SqlCmd("select bjcy.BJID,to_char(bj.RXND,'yyyy-MM-dd') rxnd from BJCY,BJ"
+					+ " where bjcy.BJID=bj.BJID(+) and bjcy.RYID=:ryid");
+			sqlCmd.wrLongParm("ryid", ryid);
+			Map<String, Object> data = gdba.doSelMapByC(sqlCmd);
+			if (!data.isEmpty())
+				ServU.wrOkDataByWriter(data, writer, gson);
+		} catch (Exception e) {
+			log4j.error("XyBaseInfoServ.selBaseInfoByXyidByA() 异常", e);
+			throw e;
+		}
+	}
+}

+ 3 - 0
web/cfg/biz/cd/cd.cb.xml

@@ -3,10 +3,13 @@
 
 <cbs biz="hq">
 	<cb name="cd" desc="场地" obj="cd"/>
+	<cb name="nbcd" desc="内部场地" obj="nbcd"/>
 	<cb name="cdzt" desc="场地状态" obj="cdzt"/>
 
 	<cb name="cdlbNoKf" desc="非客房场地类别" sql="cdlbNoKf" cache="true" transSql="this" codeField="cdlbm" descField="mc"/> <!-- 原 cdlb_wkf("非客房场地类别")。Lin -->
 	<cb name="jzwNoKf" desc="非客房建筑物" sql="jzwNoKf" cache="true" transSql="this" codeField="jzwid" descField="mc"/> <!-- 原 jzw_wkf("非客房建筑物")。Lin -->
+	<cb name="kxkfByJzw" desc="空闲客房By建筑物" sql="kxkfByJzw" transObj="cd"/>
+	<cb name="kxcwByKf" desc="空闲床位By客房" sql="kxcwByKf" transObj="nbcd"/>
 
 	<cb name="ksxz" desc="课室形状" obj="ksxz"/>
 

+ 7 - 0
web/cfg/biz/cd/cd.ccp.xml

@@ -16,4 +16,11 @@
 			<field name="lcid" cb="lcByJzw"/>  <!-- 原 jzw_lc -->
 		</combField>
 	</ccp>
+	<ccp name="xyssl_kxkf_kxcw">
+		<combField name="jzwid_kfid_cwid">
+			<field name="jzwid" cb="xyssl"/>
+			<field name="kfid" cb="kxkfByJzw"/>
+			<field name="cwid" cb="kxcwByKf"/>
+		</combField>
+	</ccp>
 </ccps>

+ 18 - 0
web/cfg/biz/cd/cd.sql.xml

@@ -12,6 +12,24 @@
 			select JZWID,MC from JZW where JZWLBM not between 40 and 49
 		]]></stmt>
 	</sql>
+	<sql name="xyssl" desc="学员宿舍楼">
+		<stmt><![CDATA[
+			select JZWID,MC from JZW where JZWLBM in(41,42) order by JZWID desc
+		]]></stmt>
+	</sql>
+
+	<sql name="kxkfByJzw" desc="空闲客房By建筑物">
+		<stmt><![CDATA[
+			select CDID,MC from CD where JZWID=:jzwid and CDZTM in(1,155)
+		]]></stmt>
+		<parm name="jzwid" type="long"/>
+	</sql>
+	<sql name="kxcwByKf" desc="空闲床位By房间">
+		<stmt><![CDATA[
+			select NBCDID,MC from NBCD where CDID=:kfid and CDZTM=1
+		]]></stmt>
+		<parm name="kfid" type="long"/>
+	</sql>
 
 	<!-- 跨表翻译,使用 yyyJoinXxx 表述。原 env.codebook.xml: cdid_jzw。Lin
 					原 select cd.cdid,jzw.mc from cd left join jzw on jzw.jzwid=cd.jzwid -->

+ 1 - 0
web/cfg/biz/cd/jzw.cb.xml

@@ -4,4 +4,5 @@
 <cbs biz="hq">
 	<cb name="jzw" desc="建筑物" obj="jzw"/>
 	<cb name="jzwlb" desc="建筑物类别" obj="jzwlb" cache="true"/>
+	<cb name="xyssl" desc="学员宿舍楼" sql="xyssl" transObj="jzw"/>
 </cbs>

+ 9 - 0
web/cfg/biz/cd/nbcd.obj.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE xml>
+
+<objs biz="hq">
+<!-- 仅用于码本:menu="false"、fts="false",只保留名称字段用于翻译。 -->
+<obj name="nbcd" desc="内部场地" po="base.po.NbcdPo" child="chgInfo" menu="false" fts="false">
+	<field name="mc" desc="名称" title="true"/>
+</obj>
+</objs>

+ 2 - 0
web/cfg/biz/dw/dw.cb.xml

@@ -9,4 +9,6 @@
 		 可以加 transCb=,意义不大(只少了本单位)。码本名(dwlb) 搞复杂了
 	<cb name="dwlb" desc="单位类别" obj="dwlb" cache="true"/> -->
 	<cb name="dwlb" desc="单位类别" sql="dwlb" transObj="dwlb" cache="true"/>
+
+	<cb name="rxnd" desc="入学年度" serv="rxnd" transServ="transRxnd" codeField="name" descField="desc"/>
 </cbs>

+ 3 - 0
web/cfg/biz/dw/dw.serv.xml

@@ -12,5 +12,8 @@
  		 临时增加,测试 点击个人统计表列表 用。最终在 .formp.zip 里的 dwStat_demo.serv.xml 定义 -->
 		<serv name="dwStat_demo" desc="Demo个人统计表" clazz="biz.ry.DwStatServ" func="dwStat_demo" auth="true"/>
 <!-- -->
+
+		<serv name="rxnd" desc="入学年度" clazz="biz.ry.DwServ" func="rxnd" pub="true"/>
+		<serv name="transRxnd" desc="翻译入学年度" clazz="biz.ry.DwServ" func="transRxnd" pub="true"/>
 	</serv>
 </servs>

+ 2 - 0
web/cfg/biz/xy/xy.cb.xml

@@ -5,6 +5,8 @@
 	<cb name="jdfs" desc="就读方式" obj="jdfs" cache="true"/>
 	<cb name="xyzllb" desc="学员资料类别" obj="xyzllb" cache="true"/>
 
+	<!-- 入学年度 > 班级 -->
+	<cb name="bjByRxnd" desc="班级By入学年度" sql="bjByRxnd" transObj="bj"/>
 	<!-- 班级 > 学员 -->
 	<cb name="xyByBj" desc="学员" sql="xyByBj" transObj="ry"/>
 </cbs>

+ 9 - 0
web/cfg/biz/xy/xy.ccp.xml

@@ -3,6 +3,15 @@
 
 <ccps biz="xy">
 
+	<!-- 入学年度 > 班级 > 学员 -->
+	<ccp name="rxnd_bj_xy">
+		<combField name="rxnd_bjid_ryid">
+			<field name="rxnd" cb="rxnd"/>
+			<field name="bjid" cb="bjByRxnd"/>
+			<field name="ryid" cb="xyByBj"/>
+		</combField>
+	</ccp>
+
 	<!-- 班级 > 学员 -->
 	<ccp name="bj_xy">
 		<combField name="bjid_ryid">

+ 1 - 0
web/cfg/biz/xy/xy.serv.xml

@@ -27,5 +27,6 @@
 		<serv name="xy_sh_bd_ty" clazz="biz.xy.XyServ" func="agrChg"/>
 
 		<serv name="xy_selBjidByXyid" desc="获取学员的班级ID" clazz="biz.xy.XyServ" func="selBjidByXyidByA" pub="true"/>
+		<serv name="xy_selBaseInfoByXyid" desc="获取学员的基本信息" clazz="biz.xy.XyBaseInfoServ" func="selBaseInfoByXyidByA" pub="true"/>
 	</serv>
 </servs>

+ 8 - 0
web/cfg/biz/xy/xy.sql.xml

@@ -3,6 +3,14 @@
 
 <sqls biz="xy">
 
+	<!-- 入学年度 > 班级。班级状态码:81 = 结束 -->
+	<sql name="bjByRxnd" desc="班级By入学年度">
+		<stmt><![CDATA[
+			select BJID,MC from BJ where BJZTM!=81 and trunc(RXND,'YYYY')=trunc(:rxnd,'YYYY')
+		]]></stmt>
+		<parm name="rxnd" type="date"/>
+	</sql>
+
 	<!-- 班级 > 学员 -->
 	<sql name="xyByBj" desc="学员">
 		<stmt><![CDATA[