Commit 69b7333d by 971729

fix():修改配置文件

parents 612ecbdc 8da5bfd8
......@@ -11,11 +11,11 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.baosight</groupId>
<artifactId>hp_smart</artifactId>
<artifactId>hpjx</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>hp_smart</name>
<name>hpjx</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
......@@ -207,7 +207,7 @@
<version>2.4</version>
<configuration>
<excludes>
<exclude>**/Iplat4jApplication.class</exclude>
<exclude>**/HpjxApplication.class</exclude>
<exclude>**/application.properties</exclude>
<exclude>**/quartz.properties</exclude>
<exclude>**/log4j2.xml</exclude>
......
package com.baosight.iplat4j;
package com.baosight.hpjx;
import com.baosight.iplat4j.config.ApplicationProperties;
import org.springframework.boot.SpringApplication;
......@@ -14,16 +14,16 @@ import org.springframework.context.annotation.ImportResource;
@ServletComponentScan("com.baosight.iplat4j.core.web.servlet")
@ImportResource(locations = {"classpath*:spring/framework/platApplicationContext*.xml","classpath*:spring/framework/applicationContext*.xml"})
@EnableConfigurationProperties({LiquibaseProperties.class, ApplicationProperties.class})
public class Iplat4jApplication extends SpringBootServletInitializer {
public class HpjxApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication app = new SpringApplication(Iplat4jApplication.class);
SpringApplication app = new SpringApplication(HpjxApplication.class);
app.run(args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Iplat4jApplication.class);
return application.sources(HpjxApplication.class);
}
}
package com.baosight.iplat4j.common;
package com.baosight.hpjx.common;
import com.baosight.iplat4j.core.ei.EiBlock;
......
package com.baosight.hpjx.common;
import com.baosight.iplat4j.core.ei.EiBlock;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Author wwl
* @Date 2024/1/9 19:25
*/
public enum CustomerTypeEnum {
SUPPLIER(1,"供应商"),
CUSTOMER(2,"客户");
private Integer code;
private String value;
CustomerTypeEnum(Integer code, String value) {
this.code = code;
this.value = value;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static EiBlock generatorEiBlock() {
EiBlock block = new EiBlock("customer_type_block_id");
List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>() {{
add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, SUPPLIER.code);
put(HPConstants.VALUE_FIELD, SUPPLIER.value);
}});
add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, CUSTOMER.code);
put(HPConstants.VALUE_FIELD, CUSTOMER.value);
}});
}};
block.setRows(rows);
return block;
}
}
package com.baosight.hpjx.common;
/**
* @Author wwl
* @Date 2024/1/9 19:35
* 将给定的查询条件用来查表 给结果集中添加block块 查询参数传入
*CommonMethod.initBlock(outInfo,
*Arrays.asList(DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
*DropDownBoxEnum.XXXXXXXX_BLOCK_ID,
*DropDownBoxEnum.XXXXXXXX_BLOCK_ID),
*new HashMap<String, String>(1){{
*put(HPConstants.SQL_FIELD_COMPANYCODE,companyCode);
*put(sqlQueryParamName,sqlQueryParamValue);
*}});
*/
public enum DdynamicEnum {
/**
* 模块:供应商档案
* 用途:供应商档案下拉框.
* 编写:wwl.
*/
SUPPLIER_RECORD_BLOCK_ID("supplier_record_block_id","CUST_CODE","CUST_NAME","HPPZ002.queryComboBox"),
/**
* 模块:客户档案
* 用途:客户档案下拉框.
* 编写:wwl.
*/
CUSTOMER_RECORD_BLOCK_ID("customer_record_block_id","CUST_CODE","CUST_NAME","HPPZ003.queryComboBox");
/** 将结果集放入的块名 */
private final String blockId;
/** 字段名 */
private final String value;
/** 字段描述 */
private final String text;
/** 数据源 */
private final String dbSource;
DdynamicEnum(String blockId, String value, String text, String dbSource){
this.blockId = blockId;
this.value = value;
this.text = text;
this.dbSource = dbSource;
}
public String getDbSource() {
return dbSource;
}
public String getBlockId() {
return blockId;
}
public String getValue() {
return value;
}
public String getText() {
return text;
}
}
package com.baosight.iplat4j.common;
package com.baosight.hpjx.common;
/**
* @author xuao
......@@ -24,8 +24,11 @@ public class HPConstants {
//代碼名字分隔符
public static final String SPLICING_SYMBOL = "-";
/** 前后台交互下拉框字段 字段名 dzg */
public static final String TEXT_FIELD = "textField";
/** 前后台交互下拉框字段 字段名 dzg */
public static final String VALUE_FIELD = "valueField";
}
package com.baosight.hpjx.common;
import com.baosight.iplat4j.core.ei.EiBlock;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Author wwl
* @Date 2024/1/9 19:16
*/
public enum InitiateModeEnum {
STOP(0,"停用"),
USING(1,"启用");
private Integer code;
private String value;
InitiateModeEnum(Integer code, String value) {
this.code = code;
this.value = value;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static EiBlock generatorEiBlock(){
EiBlock block = new EiBlock("initiate_mode_block_id");
List<Map<String,Object>> rows = new ArrayList<Map<String,Object>>(){{
add(new HashMap<String,Object>(){{
put(HPConstants.TEXT_FIELD,STOP.code);
put(HPConstants.VALUE_FIELD,STOP.value);
}});
add(new HashMap<String,Object>(){{
put(HPConstants.TEXT_FIELD,USING.code);
put(HPConstants.VALUE_FIELD,USING.value);
}});
}};
block.setRows(rows);
return block;
}
}
package com.baosight.iplat4j.demo;
package com.baosight.hpjx.demo;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
......
......@@ -2,7 +2,7 @@
* Generate time : 2024-01-08 18:33:20
* Version : 1.0
*/
package com.baosight.iplat4j.demo.domain;
package com.baosight.hpjx.demo.domain;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
......
package com.baosight.iplat4j.demo.service;
package com.baosight.hpjx.demo.service;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.demo.domain.Tveci002;
import com.baosight.hpjx.demo.domain.Tveci002;
import java.util.Map;
......
/**
* Generate time : 2024-01-09 18:54:54
* Version : 1.0
*/
package com.baosight.iplat4j.hp.kc.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Thpkc008
*
*/
public class Thpkc008 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private String datemonth = " "; /* 月份*/
private String statisticalNumber = " "; /* 统计单单号*/
private String materialCode = " "; /* 物料编码*/
private String materialName = " "; /* 物料名称*/
private String unit = " "; /* 单位*/
private BigDecimal amount = new BigDecimal("0"); /* 数量*/
private BigDecimal price = new BigDecimal("0"); /* 单价*/
private BigDecimal totalPrice = new BigDecimal("0"); /* 金额*/
private String notes = " "; /* 备注*/
private String createdBy = " "; /* 创建人*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime = " "; /* 更新时间*/
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("id");
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("companyCode");
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("datemonth");
eiColumn.setDescName("月份");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("statisticalNumber");
eiColumn.setDescName("统计单单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("materialCode");
eiColumn.setDescName("物料编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("materialName");
eiColumn.setDescName("物料名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("unit");
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("amount");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("price");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("totalPrice");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("notes");
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy");
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime");
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public Thpkc008() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the datemonth - 月份
* @return the datemonth
*/
public String getDatemonth() {
return this.datemonth;
}
/**
* set the datemonth - 月份
*/
public void setDatemonth(String datemonth) {
this.datemonth = datemonth;
}
/**
* get the statisticalNumber - 统计单单号
* @return the statisticalNumber
*/
public String getStatisticalNumber() {
return this.statisticalNumber;
}
/**
* set the statisticalNumber - 统计单单号
*/
public void setStatisticalNumber(String statisticalNumber) {
this.statisticalNumber = statisticalNumber;
}
/**
* get the materialCode - 物料编码
* @return the materialCode
*/
public String getMaterialCode() {
return this.materialCode;
}
/**
* set the materialCode - 物料编码
*/
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
/**
* get the materialName - 物料名称
* @return the materialName
*/
public String getMaterialName() {
return this.materialName;
}
/**
* set the materialName - 物料名称
*/
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
/**
* get the unit - 单位
* @return the unit
*/
public String getUnit() {
return this.unit;
}
/**
* set the unit - 单位
*/
public void setUnit(String unit) {
this.unit = unit;
}
/**
* get the amount - 数量
* @return the amount
*/
public BigDecimal getAmount() {
return this.amount;
}
/**
* set the amount - 数量
*/
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
/**
* get the price - 单价
* @return the price
*/
public BigDecimal getPrice() {
return this.price;
}
/**
* set the price - 单价
*/
public void setPrice(BigDecimal price) {
this.price = price;
}
/**
* get the totalPrice - 金额
* @return the totalPrice
*/
public BigDecimal getTotalPrice() {
return this.totalPrice;
}
/**
* set the totalPrice - 金额
*/
public void setTotalPrice(BigDecimal totalPrice) {
this.totalPrice = totalPrice;
}
/**
* get the notes - 备注
* @return the notes
*/
public String getNotes() {
return this.notes;
}
/**
* set the notes - 备注
*/
public void setNotes(String notes) {
this.notes = notes;
}
/**
* get the createdBy - 创建人
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedTime - 更新时间
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setDatemonth(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("datemonth")), datemonth));
setStatisticalNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("statisticalNumber")), statisticalNumber));
setMaterialCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("materialCode")), materialCode));
setMaterialName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("materialName")), materialName));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("unit")), unit));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get("amount")), amount));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get("price")), price));
setTotalPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get("totalPrice")), totalPrice));
setNotes(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("notes")), notes));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")), updatedTime));
}
/**
* set the value to Map
*/
public Map toMap() {
Map map = new HashMap();
map.put("id",StringUtils.toString(id, eiMetadata.getMeta("id")));
map.put("companyCode",StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode")));
map.put("datemonth",StringUtils.toString(datemonth, eiMetadata.getMeta("datemonth")));
map.put("statisticalNumber",StringUtils.toString(statisticalNumber, eiMetadata.getMeta("statisticalNumber")));
map.put("materialCode",StringUtils.toString(materialCode, eiMetadata.getMeta("materialCode")));
map.put("materialName",StringUtils.toString(materialName, eiMetadata.getMeta("materialName")));
map.put("unit",StringUtils.toString(unit, eiMetadata.getMeta("unit")));
map.put("amount",StringUtils.toString(amount, eiMetadata.getMeta("amount")));
map.put("price",StringUtils.toString(price, eiMetadata.getMeta("price")));
map.put("totalPrice",StringUtils.toString(totalPrice, eiMetadata.getMeta("totalPrice")));
map.put("notes",StringUtils.toString(notes, eiMetadata.getMeta("notes")));
map.put("createdBy",StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy",StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
return map;
}
}
\ No newline at end of file
package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.CompanyTypeEnum;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.hp.kc.domain.Thpkc008;
import com.baosight.hpjx.util.CommonMethod;
import java.util.Map;
/**
* @author xuao
* @date 2024年01月09日 10:18
*/
public class ServiceHPKC008 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
Thpkc008 HPKC008 = new Thpkc008();
EiInfo outInfo = super.initLoad(inInfo, HPKC008);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPKC008.eiMetadata);
outInfo.setBlock(CompanyTypeEnum.generatorEiBlock());
return outInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPKC008.query", new Thpkc008());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
super.insert(inInfo,"HPKC008.insert");
// Thpkc008 HPKC008 = new Thpkc008();
// EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
// for (int i = 0; i < eiBlock.getRowCount(); i++) {
// Map<?, ?> map = eiBlock.getRow(i);
// HPKC008.fromMap(map);
// this.dao.insertBatch()//insert("HPKC008.insert", HPKC008.toMap());
// }
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
try {
Thpkc008 HPKC008 = new Thpkc008();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPKC008.fromMap(map);
this.dao.update("HPKC008.update", HPKC008.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
Thpkc008 HPKC008 = new Thpkc008();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPKC008.fromMap(map);
this.dao.delete("HPKC008.delete", HPKC008.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
}
package com.baosight.hpjx.hp.kc.service;
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-09 18:54:54
Version : 1.0
tableName :hpjx.t_hpkc008
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DATEMONTH VARCHAR NOT NULL,
STATISTICAL_NUMBER VARCHAR NOT NULL,
MATERIAL_CODE VARCHAR NOT NULL,
MATERIAL_NAME VARCHAR NOT NULL,
UNIT VARCHAR,
AMOUNT DECIMAL NOT NULL,
PRICE DECIMAL NOT NULL,
TOTAL_PRICE DECIMAL NOT NULL,
NOTES VARCHAR,
CREATED_BY VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR
-->
<sqlMap namespace="HPKC008">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.kc.domain.Thpkc008">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DATEMONTH as "datemonth", <!-- 月份 -->
STATISTICAL_NUMBER as "statisticalNumber", <!-- 统计单单号 -->
MATERIAL_CODE as "materialCode", <!-- 物料编码 -->
MATERIAL_NAME as "materialName", <!-- 物料名称 -->
UNIT as "unit", <!-- 单位 -->
AMOUNT as "amount", <!-- 数量 -->
PRICE as "price", <!-- 单价 -->
TOTAL_PRICE as "totalPrice", <!-- 金额 -->
NOTES as "notes", <!-- 备注 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hpkc008 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="datemonth">
datemonth = #datemonth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="statisticalNumber">
statisticalNumber = #statisticalNumber#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpkc008 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="datemonth">
DATEMONTH = #datemonth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="statisticalNumber">
STATISTICAL_NUMBER = #statisticalNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialCode">
MATERIAL_CODE = #materialCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialName">
MATERIAL_NAME = #materialName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalPrice">
TOTAL_PRICE = #totalPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="notes">
NOTES = #notes#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO hpjx.t_hpkc008 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DATEMONTH, <!-- 月份 -->
STATISTICAL_NUMBER, <!-- 统计单单号 -->
MATERIAL_CODE, <!-- 物料编码 -->
MATERIAL_NAME, <!-- 物料名称 -->
UNIT, <!-- 单位 -->
AMOUNT, <!-- 数量 -->
PRICE, <!-- 单价 -->
TOTAL_PRICE, <!-- 金额 -->
NOTES, <!-- 备注 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME <!-- 更新时间 -->
)
VALUES (#companyCode#, #datemonth#, #statisticalNumber#, #materialCode#, #materialName#, #unit#, #amount#, #price#, #totalPrice#, #notes#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hpkc008 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hpkc008
SET
DATEMONTH = #datemonth#, <!-- 月份 -->
STATISTICAL_NUMBER = #statisticalNumber#, <!-- 统计单单号 -->
MATERIAL_CODE = #materialCode#, <!-- 物料编码 -->
MATERIAL_NAME = #materialName#, <!-- 物料名称 -->
UNIT = #unit#, <!-- 单位 -->
AMOUNT = #amount#, <!-- 数量 -->
PRICE = #price#, <!-- 单价 -->
TOTAL_PRICE = #totalPrice#, <!-- 金额 -->
NOTES = #notes#, <!-- 备注 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
\ No newline at end of file
package com.baosight.hpjx.hp.kc.sql;
\ No newline at end of file
......@@ -2,7 +2,7 @@
* Generate time : 2024-01-09 10:44:10
* Version : 1.0
*/
package com.baosight.iplat4j.hp.pz.domain;
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
......
......@@ -2,7 +2,7 @@
* Generate time : 2024-01-09 15:56:49
* Version : 1.0
*/
package com.baosight.iplat4j.hp.pz.domain;
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.DateUtils;
import java.sql.Timestamp;
......
/**
* Generate time : 2024-01-09 14:40:53
* Generate time : 2024-01-10 10:28:33
* Version : 1.0
*/
package com.baosight.iplat4j.hp.pz.domain;
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
......@@ -18,15 +18,16 @@ public class THppz002 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private Integer custType = 0; /* 供应商类型 1 国企 : 2 民营*/
private int custType; /* 供应商类型 1 国企 : 2 民营*/
private String custCode = " "; /* 供应商编码*/
private String custName = " "; /* 供应商名称*/
private String address = " "; /* 地址*/
private Boolean status; /* 状态 0禁用 1启用*/
private int status; /* 状态 0禁用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime = " "; /* 更新时间*/
private String depCode = " "; /* 部门编码*/
/**
* initialize the metadata
*/
......@@ -78,6 +79,10 @@ EiColumn eiColumn;
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("depCode");
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -119,14 +124,14 @@ initMetaData();
* get the custType - 供应商类型 1 国企 : 2 民营
* @return the custType
*/
public Integer getCustType() {
public int getCustType() {
return this.custType;
}
/**
* set the custType - 供应商类型 1 国企 : 2 民营
*/
public void setCustType(Integer custType) {
public void setCustType(int custType) {
this.custType = custType;
}
/**
......@@ -172,17 +177,17 @@ initMetaData();
this.address = address;
}
/**
* get the status - 状态 0禁用 1启用
* get the status - 状态 0未启用 1启用
* @return the status
*/
public Boolean getStatus() {
public int getStatus() {
return this.status;
}
/**
* set the status - 状态 0禁用 1启用
* set the status - 状态 0未启用 1启用
*/
public void setStatus(Boolean status) {
public void setStatus(int status) {
this.status = status;
}
/**
......@@ -241,6 +246,20 @@ initMetaData();
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the depCode - 部门编码
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the value from Map
*/
......@@ -248,15 +267,16 @@ public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setCustType(NumberUtils.toInteger(StringUtils.toString(map.get("custType")), custType));
setCustType(NumberUtils.toint(StringUtils.toString(map.get("custType")), custType));
setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custCode")), custCode));
setCustName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custName")), custName));
setAddress(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("address")), address));
setStatus(NumberUtils.toBoolean(StringUtils.toString(map.get("status")), status));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode));
}
/**
......@@ -276,6 +296,7 @@ Map map = new HashMap();
map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy",StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
map.put("depCode",StringUtils.toString(depCode, eiMetadata.getMeta("depCode")));
return map;
......
/**
* Generate time : 2024-01-09 17:46:33
* Version : 1.0
*/
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* THppz003
*
*/
public class THppz003 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private int custType; /* 客商类型 1:国企;2:民营;*/
private String custCode = " "; /* 客户编码*/
private String custCname = " "; /* 客户名称*/
private String custAddr = " "; /* 地址*/
private int status; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdTime; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime; /* 更新时间*/
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("id");
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("companyCode");
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custType");
eiColumn.setDescName("客商类型 1:国企;2:民营;");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custCode");
eiColumn.setDescName("客户编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custCname");
eiColumn.setDescName("客户名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custAddr");
eiColumn.setDescName("地址");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status");
eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy");
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime");
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public THppz003() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the custType - 客商类型 1:国企;2:民营;
* @return the custType
*/
public int getCustType() {
return this.custType;
}
/**
* set the custType - 客商类型 1:国企;2:民营;
*/
public void setCustType(int custType) {
this.custType = custType;
}
/**
* get the custCode - 客户编码
* @return the custCode
*/
public String getCustCode() {
return this.custCode;
}
/**
* set the custCode - 客户编码
*/
public void setCustCode(String custCode) {
this.custCode = custCode;
}
/**
* get the custCname - 客户名称
* @return the custCname
*/
public String getCustCname() {
return this.custCname;
}
/**
* set the custCname - 客户名称
*/
public void setCustCname(String custCname) {
this.custCname = custCname;
}
/**
* get the custAddr - 地址
* @return the custAddr
*/
public String getCustAddr() {
return this.custAddr;
}
/**
* set the custAddr - 地址
*/
public void setCustAddr(String custAddr) {
this.custAddr = custAddr;
}
/**
* get the status - 状态 0未启用 1启用
* @return the status
*/
public int getStatus() {
return this.status;
}
/**
* set the status - 状态 0未启用 1启用
*/
public void setStatus(int status) {
this.status = status;
}
/**
* get the createdBy - 创建人
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedTime - 更新时间
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setCustType(NumberUtils.toint(StringUtils.toString(map.get("custType")), custType));
setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custCode")), custCode));
setCustCname(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custCname")), custCname));
setCustAddr(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custAddr")), custAddr));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")), updatedTime));
}
/**
* set the value to Map
*/
public Map toMap() {
Map map = new HashMap();
map.put("id", StringUtils.toString(id, eiMetadata.getMeta("id")));
map.put("companyCode", StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode")));
map.put("custType", StringUtils.toString(custType, eiMetadata.getMeta("custType")));
map.put("custCode", StringUtils.toString(custCode, eiMetadata.getMeta("custCode")));
map.put("custCname", StringUtils.toString(custCname, eiMetadata.getMeta("custCname")));
map.put("custAddr", StringUtils.toString(custAddr, eiMetadata.getMeta("custAddr")));
map.put("status", StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("createdBy", StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("createdTime", StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy", StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime", StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
return map;
}
}
\ No newline at end of file
/**
* Generate time : 2024-01-09 11:10:02
* Generate time : 2024-01-10 14:11:21
* Version : 1.0
*/
package com.baosight.iplat4j.common.hp.domain;
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
......@@ -11,20 +11,22 @@ import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* THppz005
* THppz004
*
*/
public class THppz005 extends DaoEPBase {
public class THppz004 extends DaoEPBase {
private Integer id = 0;
private String companyCode = " "; /* 企业编码 预留*/
private String inventCode = " "; /* 类型编码*/
private String inventName = " "; /* 存货类型*/
private Boolean status; /* 状态 0未启用 1启用*/
private String createdTime = " "; /* 创建时间*/
private String inventName = " "; /* 存货名称*/
private String inventCode = " "; /* 存货编码*/
private int inventType; /* 存货类型*/
private int status; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/
private String updatedBy = " "; /* 修改人*/
private String updatedTime = " "; /* 修改时间*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime = " "; /* 更新时间*/
private String depCode = " "; /* 部门编码*/
/**
* initialize the metadata
*/
......@@ -40,11 +42,15 @@ EiColumn eiColumn;
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventName");
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventCode");
eiColumn.setDescName("类型编码");
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventName");
eiColumn = new EiColumn("inventType");
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
......@@ -52,20 +58,24 @@ EiColumn eiColumn;
eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy");
eiColumn.setDescName("修改人");
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime");
eiColumn.setDescName("修改时间");
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("depCode");
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
......@@ -73,7 +83,7 @@ EiColumn eiColumn;
/**
* the constructor
*/
public THppz005() {
public THppz004() {
initMetaData();
}
......@@ -106,7 +116,21 @@ initMetaData();
this.companyCode = companyCode;
}
/**
* get the inventCode - 类型编码
* get the inventName - 存货名称
* @return the inventName
*/
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
}
/**
* get the inventCode - 存货编码
* @return the inventCode
*/
public String getInventCode() {
......@@ -114,54 +138,40 @@ initMetaData();
}
/**
* set the inventCode - 类型编码
* set the inventCode - 存货编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventName - 存货类型
* @return the inventName
* get the inventType - 存货类型
* @return the inventType
*/
public String getInventName() {
return this.inventName;
public int getInventType() {
return this.inventType;
}
/**
* set the inventName - 存货类型
* set the inventType - 存货类型
*/
public void setInventName(String inventName) {
this.inventName = inventName;
public void setInventType(int inventType) {
this.inventType = inventType;
}
/**
* get the status - 状态 0未启用 1启用
* @return the status
*/
public Boolean getStatus() {
public int getStatus() {
return this.status;
}
/**
* set the status - 状态 0未启用 1启用
*/
public void setStatus(Boolean status) {
public void setStatus(int status) {
this.status = status;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the createdBy - 创建人
* @return the createdBy
*/
......@@ -176,7 +186,21 @@ initMetaData();
this.createdBy = createdBy;
}
/**
* get the updatedBy - 修改人
* get the createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人
* @return the updatedBy
*/
public String getUpdatedBy() {
......@@ -184,13 +208,13 @@ initMetaData();
}
/**
* set the updatedBy - 修改
* set the updatedBy - 更新
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedTime - 修改时间
* get the updatedTime - 更新时间
* @return the updatedTime
*/
public String getUpdatedTime() {
......@@ -198,11 +222,25 @@ initMetaData();
}
/**
* set the updatedTime - 修改时间
* set the updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the depCode - 部门编码
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the value from Map
*/
......@@ -210,13 +248,15 @@ public void fromMap(Map map) {
setId(NumberUtils.toInteger(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventCode")), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventName")), inventName));
setStatus(NumberUtils.toBoolean(StringUtils.toString(map.get("status")), status));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventCode")), inventCode));
setInventType(NumberUtils.toint(StringUtils.toString(map.get("inventType")), inventType));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode));
}
/**
......@@ -227,13 +267,15 @@ public Map toMap() {
Map map = new HashMap();
map.put("id",StringUtils.toString(id, eiMetadata.getMeta("id")));
map.put("companyCode",StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode")));
map.put("inventCode",StringUtils.toString(inventCode, eiMetadata.getMeta("inventCode")));
map.put("inventName",StringUtils.toString(inventName, eiMetadata.getMeta("inventName")));
map.put("inventCode",StringUtils.toString(inventCode, eiMetadata.getMeta("inventCode")));
map.put("inventType",StringUtils.toString(inventType, eiMetadata.getMeta("inventType")));
map.put("status",StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("createdBy",StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy",StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
map.put("depCode",StringUtils.toString(depCode, eiMetadata.getMeta("depCode")));
return map;
......
......@@ -2,7 +2,7 @@
* Generate time : 2024-01-09 10:04:30
* Version : 1.0
*/
package com.baosight.iplat4j.hp.pz.domain;
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
......@@ -26,9 +26,9 @@ public class Thppz001 extends DaoEPBase {
private int custType; /* 客商类型 1:国企;2:民营;*/
private int status; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdTime = " "; /* 创建时间*/
private String createdTime ; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime = " "; /* 更新时间*/
private String updatedTime ; /* 更新时间*/
/**
* initialize the metadata
......@@ -249,9 +249,9 @@ public class Thppz001 extends DaoEPBase {
setCustType(NumberUtils.toint(StringUtils.toString(map.get("custType")), custType));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")),createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")), updatedTime));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")),updatedTime));
}
/**
......
/**
* Generate time : 2024-01-09 16:02:58
* Version : 1.0
*/
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.DateUtils;
import java.sql.Timestamp;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* THppz008
*
*/
public class Thppz008 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private Integer whType = 0; /* 仓库类型*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private Integer inventType = 0; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private String spec = " "; /* 规格*/
private String mat = " "; /* 材质*/
private String uint = " "; /* 单位*/
private String alertValue = " "; /* 预警值*/
private String createdBy = " "; /* 创建人*/
private String createdTime ; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime ; /* 更新时间*/
private String depCode ; /* 部门编码*/
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("id");
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("companyCode");
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("whType");
eiColumn.setDescName("仓库类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("whCode");
eiColumn.setDescName("仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("whName");
eiColumn.setDescName("仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventType");
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventCode");
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventName");
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("spec");
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("mat");
eiColumn.setDescName("材质");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("uint");
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("alertValue");
eiColumn.setDescName("预警值");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy");
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime");
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("depCode");
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public Thppz008() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the whType - 仓库类型
* @return the whType
*/
public Integer getWhType() {
return this.whType;
}
/**
* set the whType - 仓库类型
*/
public void setWhType(Integer whType) {
this.whType = whType;
}
/**
* get the whCode - 仓库编码
* @return the whCode
*/
public String getWhCode() {
return this.whCode;
}
/**
* set the whCode - 仓库编码
*/
public void setWhCode(String whCode) {
this.whCode = whCode;
}
/**
* get the whName - 仓库名称
* @return the whName
*/
public String getWhName() {
return this.whName;
}
/**
* set the whName - 仓库名称
*/
public void setWhName(String whName) {
this.whName = whName;
}
/**
* get the inventType - 存货类型
* @return the inventType
*/
public Integer getInventType() {
return this.inventType;
}
/**
* set the inventType - 存货类型
*/
public void setInventType(Integer inventType) {
this.inventType = inventType;
}
/**
* get the inventCode - 存货编码
* @return the inventCode
*/
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 存货编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventName - 存货名称
* @return the inventName
*/
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
}
/**
* get the spec - 规格
* @return the spec
*/
public String getSpec() {
return this.spec;
}
/**
* set the spec - 规格
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the mat - 材质
* @return the mat
*/
public String getMat() {
return this.mat;
}
/**
* set the mat - 材质
*/
public void setMat(String mat) {
this.mat = mat;
}
/**
* get the uint - 单位
* @return the uint
*/
public String getUint() {
return this.uint;
}
/**
* set the uint - 单位
*/
public void setUint(String uint) {
this.uint = uint;
}
/**
* get the alertValue - 预警值
* @return the alertValue
*/
public String getAlertValue() {
return this.alertValue;
}
/**
* set the alertValue - 预警值
*/
public void setAlertValue(String alertValue) {
this.alertValue = alertValue;
}
/**
* get the createdBy - 创建人
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedTime - 更新时间
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the depCode - 部门编码
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setWhType(NumberUtils.toInteger(StringUtils.toString(map.get("whType")), whType));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("whCode")), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("whName")), whName));
setInventType(NumberUtils.toInteger(StringUtils.toString(map.get("inventType")), inventType));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventCode")), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventName")), inventName));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("spec")), spec));
setMat(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("mat")), mat));
setUint(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("uint")), uint));
setAlertValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("alertValue")), alertValue));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.toString(map.get("createdTime")));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.toString(map.get("updatedTime")));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode));
}
/**
* set the value to Map
*/
public Map toMap() {
Map map = new HashMap();
map.put("id",StringUtils.toString(id, eiMetadata.getMeta("id")));
map.put("companyCode",StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode")));
map.put("whType",StringUtils.toString(whType, eiMetadata.getMeta("whType")));
map.put("whCode",StringUtils.toString(whCode, eiMetadata.getMeta("whCode")));
map.put("whName",StringUtils.toString(whName, eiMetadata.getMeta("whName")));
map.put("inventType",StringUtils.toString(inventType, eiMetadata.getMeta("inventType")));
map.put("inventCode",StringUtils.toString(inventCode, eiMetadata.getMeta("inventCode")));
map.put("inventName",StringUtils.toString(inventName, eiMetadata.getMeta("inventName")));
map.put("spec",StringUtils.toString(spec, eiMetadata.getMeta("spec")));
map.put("mat",StringUtils.toString(mat, eiMetadata.getMeta("mat")));
map.put("uint",StringUtils.toString(uint, eiMetadata.getMeta("uint")));
map.put("alertValue",StringUtils.toString(alertValue, eiMetadata.getMeta("alertValue")));
map.put("createdBy",StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy",StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
map.put("depCode",StringUtils.toString(depCode, eiMetadata.getMeta("depCode")));
return map;
}
}
\ No newline at end of file
package com.baosight.iplat4j.hp.pz.service;
package com.baosight.hpjx.hp.pz.service;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -6,12 +6,10 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.hp.pz.domain.Thppz001;
import com.baosight.hpjx.hp.pz.domain.Thppz001;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
......@@ -52,13 +50,13 @@ public class ServiceHPPZ001 extends ServiceBase {
try {
Thppz001 hppz001 = new Thppz001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz001.fromMap(map);
hppz001.setCreatedBy(UserSession.getLoginName());
hppz001.setCreatedBy(UserSession.getUserId());
hppz001.setCreatedTime(sdf.format(new Date()));
hppz001.setUpdatedBy(null);
hppz001.setUpdatedTime(null);
this.dao.insert("HPPZ001.insert", hppz001.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
......@@ -72,7 +70,7 @@ public class ServiceHPPZ001 extends ServiceBase {
logError("新增失败", e.getMessage());
return inInfo;
}
return inInfo;
return query(inInfo);
}
/**
......@@ -86,7 +84,7 @@ public class ServiceHPPZ001 extends ServiceBase {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz001.fromMap(map);
hppz001.setUpdatedBy(UserSession.getLoginName());
hppz001.setUpdatedBy(UserSession.getUserId());
hppz001.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPPZ001.update", hppz001.toMap());
}
......
package com.baosight.iplat4j.hp.pz.service;
package com.baosight.hpjx.hp.pz.service;
import com.baosight.iplat4j.common.CompanyTypeEnum;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.hp.pz.domain.THppz002;
import com.baosight.iplat4j.util.CommonMethod;
import com.baosight.hpjx.hp.pz.domain.THppz002;
import java.util.Map;
......@@ -21,10 +20,10 @@ public class ServiceHPPZ002 extends ServiceBase {
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
THppz002 HPPZ002 = new THppz002();
EiInfo outInfo = super.initLoad(inInfo, HPPZ002);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPPZ002.eiMetadata);
outInfo.setBlock(CompanyTypeEnum.generatorEiBlock());
THppz002 hppz002 = new THppz002();
EiInfo outInfo = new EiInfo();
outInfo.addBlock(EiConstant.resultBlock);
outInfo.getBlock(EiConstant.resultBlock).addBlockMeta(hppz002.eiMetadata);
return outInfo;
}
......@@ -52,7 +51,8 @@ public class ServiceHPPZ002 extends ServiceBase {
// for (int i = 0; i < eiBlock.getRowCount(); i++) {
// Map<?, ?> map = eiBlock.getRow(i);
// hppz002.fromMap(map);
// this.dao.insertBatch()//insert("HPPZ002.insert", hppz002.toMap());
//
// this.dao.insert("HPPZ002.insert", hppz002.toMap());
// }
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
......
package com.baosight.hpjx.hp.pz.service;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.hpjx.hp.pz.domain.THppz003;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
/**
*
*/
public class ServiceHPPZ003 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
THppz003 hppz003 = new THppz003();
EiInfo outInfo = super.initLoad(inInfo, hppz003);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hppz003.eiMetadata);
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPPZ003.query", new THppz003());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
THppz003 hppz003 = new THppz003();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz003.fromMap(map);
hppz003.setCreatedBy(UserSession.getUserId());
hppz003.setCreatedTime(sdf.format(new Date()));
hppz003.setUpdatedBy(null);
hppz003.setUpdatedTime(null);
this.dao.insert("HPPZ003.insert", hppz003.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
THppz003 hppz003 = new THppz003();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz003.fromMap(map);
hppz003.setUpdatedBy(UserSession.getUserId());
hppz003.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPPZ003.update", hppz003.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
THppz003 hppz003 = new THppz003();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz003.fromMap(map);
this.dao.delete("HPPZ003.delete", hppz003.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
}
package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Map;
/**
* @author xuao
* @date 2024年01月09日 19:35
*/
public class ServiceHPPZ004 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
THppz004 hppz004 = new THppz004();
EiInfo outInfo = new EiInfo();
outInfo.addBlock(EiConstant.resultBlock);
outInfo.getBlock(EiConstant.resultBlock).addBlockMeta(hppz004.eiMetadata);
return outInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPPZ004.query", new THppz004());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
super.insert(inInfo,"HPPZ004.insert");
// THppz002 hppz002 = new THppz002();
// EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
// for (int i = 0; i < eiBlock.getRowCount(); i++) {
// Map<?, ?> map = eiBlock.getRow(i);
// hppz002.fromMap(map);
//
// this.dao.insert("HPPZ002.insert", hppz002.toMap());
// }
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
try {
THppz004 HPPZ004 = new THppz004();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPPZ004.fromMap(map);
this.dao.update("HPPZ004.update", HPPZ004.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
THppz004 HPPZ004 = new THppz004();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPPZ004.fromMap(map);
this.dao.delete("HPPZ004.delete", HPPZ004.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
}
package com.baosight.iplat4j.hp.pz.service;
package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.hp.pz.domain.HPPZ005;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.hp.pz.domain.HPPZ005;
import com.baosight.iplat4j.hp.pz.domain.HPPZ005;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
......
package com.baosight.iplat4j.hp.pz.service;
package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.hp.pz.domain.HPPZ007;
import com.baosight.iplat4j.hp.pz.domain.HPPZ007;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
......
package com.baosight.hpjx.hp.pz.service;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.hpjx.hp.pz.domain.Thppz008;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
/**
*
*/
public class ServiceHPPZ008 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
Thppz008 hppz008 = new Thppz008();
EiInfo outInfo = super.initLoad(inInfo, hppz008);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hppz008.eiMetadata);
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPPZ008.query", new Thppz008());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
Thppz008 hppz008 = new Thppz008();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz008.fromMap(map);
hppz008.setCreatedBy(UserSession.getLoginName());
hppz008.setCreatedTime(sdf.format(new Date()));
hppz008.setUpdatedBy(null);
hppz008.setUpdatedTime(null);
this.dao.insert("HPPZ008.insert", hppz008.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
Thppz008 hppz008 = new Thppz008();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz008.fromMap(map);
hppz008.setUpdatedBy(UserSession.getLoginName());
hppz008.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPPZ008.update", hppz008.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
Thppz008 hppz008 = new Thppz008();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz008.fromMap(map);
this.dao.delete("HPPZ008.delete", hppz008.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
}
......@@ -4,7 +4,7 @@
<sqlMap namespace="HPPZ001">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.pz.domain.Thppz001">
resultClass="com.baosight.hpjx.hp.pz.domain.Thppz001">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
......
......@@ -19,10 +19,9 @@
<sqlMap namespace="HPPZ002">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.pz.domain.THppz002">
resultClass="com.baosight.hpjx.hp.pz.domain.THppz002">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
CUST_TYPE as "custType", <!-- 供应商类型 1 国企 : 2 民营 -->
CUST_CODE as "custCode", <!-- 供应商编码 -->
......@@ -32,11 +31,18 @@
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
FROM hpjx.t_hppz002 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
......@@ -101,10 +107,9 @@
STATUS, <!-- 状态 0禁用 1启用 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME <!-- 更新时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#companyCode#, #custType#, #custCode#, #custName#, #address#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#)
VALUES ( #companyCode#, #custType#, #custCode#, #custName#, #address#, #status#, #createdBy#, #createdTime#, #depCode#)
</insert>
<delete id="delete">
......@@ -126,4 +131,20 @@
ID = #id#
</update>
<select id="queryComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
CUST_CODE as "custCode",
CUST_NAME as "custName"
FROM hpjx.t_hppz002 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType#
</isNotEmpty>
ORDER BY CUST_CODE
</select>
</sqlMap>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-09 17:46:33
Version : 1.0
tableName :hpjx.t_hppz003
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
CUST_TYPE TINYINT NOT NULL,
CUST_CODE VARCHAR NOT NULL,
CUST_CNAME VARCHAR NOT NULL,
CUST_ADDR VARCHAR NOT NULL,
STATUS TINYINT NOT NULL,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME
-->
<sqlMap namespace="HPPZ003">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.pz.domain.THppz003">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
CUST_TYPE as "custType", <!-- 客商类型 1:国企;2:民营; -->
CUST_CODE as "custCode", <!-- 客户编码 -->
CUST_CNAME as "custCname", <!-- 客户名称 -->
CUST_ADDR as "custAddr", <!-- 地址 -->
STATUS as "status", <!-- 状态 0未启用 1启用 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hppz003 WHERE 1=1
<isNotEmpty prepend=" AND " property="custCname">
CUST_CNAME LIKE CONCAT('%',CONCAT(#custCname#,'%'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz003 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custCode">
CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custCname">
CUST_CNAME = #custCname#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custAddr">
CUST_ADDR = #custAddr#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO hpjx.t_hppz003 (ID,
COMPANY_CODE, <!-- 企业编码 预留 -->
CUST_TYPE, <!-- 客商类型 1:国企;2:民营; -->
CUST_CODE, <!-- 客户编码 -->
CUST_CNAME, <!-- 客户名称 -->
CUST_ADDR, <!-- 地址 -->
STATUS, <!-- 状态 0未启用 1启用 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME <!-- 更新时间 -->
)
VALUES (#id#, #companyCode#, #custType#, #custCode#, #custCname#, #custAddr#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hppz003 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hppz003
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
CUST_TYPE = #custType#, <!-- 客商类型 1:国企;2:民营; -->
CUST_CODE = #custCode#, <!-- 客户编码 -->
CUST_CNAME = #custCname#, <!-- 客户名称 -->
CUST_ADDR = #custAddr#, <!-- 地址 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-09 11:10:02
Generate time : 2024-01-09 19:25:19
Version : 1.0
tableName :hpjx.t_hppz005
tableName :hpjx.t_hppz004
ID INTEGER NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
INVENT_CODE VARCHAR NOT NULL,
INVENT_NAME VARCHAR NOT NULL,
INVENT_CODE VARCHAR NOT NULL,
INVENT_FATHER_NAME VARCHAR NOT NULL,
INVENT_FATHER_CODE VARCHAR NOT NULL,
STATUS TINYINT NOT NULL,
CREATED_TIME VARCHAR,
CREATED_BY VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR
-->
<sqlMap namespace="tHppz005">
<sqlMap namespace="HPPZ004">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.common.hp.domain.THppz005">
resultClass="com.baosight.hpjx.hp.pz.domain.THppz004">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
INVENT_CODE as "inventCode", <!-- 类型编码 -->
INVENT_NAME as "inventName", <!-- 存货类型 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
STATUS as "status", <!-- 状态 0未启用 1启用 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_TIME as "updatedTime" <!-- 修改时间 -->
FROM hpjx.t_hppz005 WHERE 1=1
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
FROM hpjx.t_hppz004 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
......@@ -44,7 +54,7 @@
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz005 WHERE 1=1
SELECT COUNT(*) FROM hpjx.t_hppz004 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
......@@ -57,21 +67,27 @@
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
<isNotEmpty prepend=" AND " property="inventFatherName">
INVENT_FATHER_NAME = #inventFatherName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventFatherCode">
INVENT_FATHER_CODE = #inventFatherCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
......@@ -81,35 +97,33 @@
-->
<insert id="insert">
INSERT INTO hpjx.t_hppz005 (ID,
INSERT INTO hpjx.t_hppz004 (
COMPANY_CODE, <!-- 企业编码 预留 -->
INVENT_CODE, <!-- 类型编码 -->
INVENT_NAME, <!-- 存货类型 -->
INVENT_NAME, <!-- 存货名称 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_TYPE, <!-- 存货类型 -->
STATUS, <!-- 状态 0未启用 1启用 -->
CREATED_TIME, <!-- 创建时间 -->
CREATED_BY, <!-- 创建人 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_TIME <!-- 修改时间 -->
CREATED_TIME, <!-- 创建时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#id#, #companyCode#, #inventCode#, #inventName#, #status#, #createdTime#, #createdBy#, #updatedBy#, #updatedTime#)
VALUES ( #companyCode#, #inventName#, #inventCode#, #inventType#, #status#, #createdBy#, #createdTime#, #depCode#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hppz005 WHERE
DELETE FROM hpjx.t_hppz004 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hppz005
UPDATE hpjx.t_hppz004
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
INVENT_CODE = #inventCode#, <!-- 类型编码 -->
INVENT_NAME = #inventName#, <!-- 存货类型 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
WHERE
ID = #id#
</update>
......
......@@ -17,7 +17,7 @@
<sqlMap namespace="HPPZ005">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.pz.domain.HPPZ005">
resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ005">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
......
......@@ -19,7 +19,7 @@
<sqlMap namespace="HPPZ007">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.pz.domain.HPPZ007">
resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ007">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-09 16:02:58
Version : 1.0
tableName :hpjx.t_hppz008
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
WH_TYPE TINYINT,
WH_CODE VARCHAR,
WH_NAME VARCHAR,
INVENT_TYPE TINYINT,
INVENT_CODE VARCHAR,
INVENT_NAME VARCHAR,
SPEC VARCHAR,
MAT VARCHAR,
UINT VARCHAR,
ALERT_VALUE VARCHAR,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME
-->
<sqlMap namespace="HPPZ008">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.pz.domain.Thppz008">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
WH_TYPE as "whType", <!-- 仓库类型 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
MAT as "mat", <!-- 材质 -->
UINT as "uint", <!-- 单位 -->
ALERT_VALUE as "alertValue", <!-- 预警值 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hppz008 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whType">
WH_TYPE = #whType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
CREATED_TIME desc
</isNotEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz008 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whType">
WH_TYPE = #whType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="mat">
MAT = #mat#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="uint">
UINT = #uint#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="alertValue">
ALERT_VALUE = #alertValue#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO hpjx.t_hppz008 (ID,
COMPANY_CODE, <!-- 企业编码 预留 -->
WH_TYPE, <!-- 仓库类型 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
MAT, <!-- 材质 -->
UINT, <!-- 单位 -->
ALERT_VALUE, <!-- 预警值 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME <!-- 更新时间 -->
)
VALUES (#id#, #companyCode#, #whType#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #spec#, #mat#, #uint#, #alertValue#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hppz008 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hppz008
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
WH_TYPE = #whType#, <!-- 仓库类型 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec#, <!-- 规格 -->
MAT = #mat#, <!-- 材质 -->
UINT = #uint#, <!-- 单位 -->
ALERT_VALUE = #alertValue#, <!-- 预警值 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
\ No newline at end of file
package com.baosight.hpjx.hp.sc.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
public class THPSC001 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private Integer projType = 0; /* 项目类型*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String princ1 = " "; /* 本公司项目负责人*/
private String princ2 = " "; /* 客户项目负责人*/
private Integer status = 0; /* 状态 0-未审核,1-已审核*/
private String createdBy = " "; /* 创建人*/
private String createdTime ; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime ; /* 更新时间*/
private String depCode = " "; /* 部门编码*/
private String remark = " "; /* 备注*/
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("id");
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("companyCode");
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("projType");
eiColumn.setDescName("项目类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("projCode");
eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("projName");
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("princ1");
eiColumn.setDescName("本公司项目负责人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("princ2");
eiColumn.setDescName("客户项目负责人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status");
eiColumn.setDescName("状态 0-未审核,1-已审核");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy");
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime");
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("depCode");
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("remark");
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public THPSC001() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the projType - 项目类型
* @return the projType
*/
public Integer getProjType() {
return this.projType;
}
/**
* set the projType - 项目类型
*/
public void setProjType(Integer projType) {
this.projType = projType;
}
/**
* get the projCode - 项目编码
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编码
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the projName - 项目名称
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the princ1 - 本公司项目负责人
* @return the princ1
*/
public String getPrinc1() {
return this.princ1;
}
/**
* set the princ1 - 本公司项目负责人
*/
public void setPrinc1(String princ1) {
this.princ1 = princ1;
}
/**
* get the princ2 - 客户项目负责人
* @return the princ2
*/
public String getPrinc2() {
return this.princ2;
}
/**
* set the princ2 - 客户项目负责人
*/
public void setPrinc2(String princ2) {
this.princ2 = princ2;
}
/**
* get the status - 状态 0-未审核,1-已审核
* @return the status
*/
public Integer getStatus() {
return this.status;
}
/**
* set the status - 状态 0-未审核,1-已审核
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* get the createdBy - 创建人
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedTime - 更新时间
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the depCode - 部门编码
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the remark - 备注
* @return the remark
*/
public String getRemark() {
return this.remark;
}
/**
* set the remark - 备注
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setProjType(NumberUtils.toInteger(StringUtils.toString(map.get("projType")), projType));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("projCode")), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("projName")), projName));
setPrinc1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("princ1")), princ1));
setPrinc2(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("princ2")), princ2));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.toString(map.get("createdTime")));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.toString(map.get("updatedTime")));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("remark")), remark));
}
/**
* set the value to Map
*/
public Map toMap() {
Map map = new HashMap();
map.put("id",StringUtils.toString(id, eiMetadata.getMeta("id")));
map.put("companyCode",StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode")));
map.put("projType",StringUtils.toString(projType, eiMetadata.getMeta("projType")));
map.put("projCode",StringUtils.toString(projCode, eiMetadata.getMeta("projCode")));
map.put("projName",StringUtils.toString(projName, eiMetadata.getMeta("projName")));
map.put("princ1",StringUtils.toString(princ1, eiMetadata.getMeta("princ1")));
map.put("princ2",StringUtils.toString(princ2, eiMetadata.getMeta("princ2")));
map.put("status",StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("createdBy",StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy",StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
map.put("depCode",StringUtils.toString(depCode, eiMetadata.getMeta("depCode")));
map.put("remark",StringUtils.toString(remark, eiMetadata.getMeta("remark")));
return map;
}
}
package com.baosight.hpjx.hp.sc.domain;
\ No newline at end of file
package com.baosight.hpjx.hp.sc.service;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.hpjx.hp.sc.domain.THPSC001;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
/**
*
*/
public class ServiceHPSC001 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
THPSC001 hpsc001 = new THPSC001();
EiInfo outInfo = super.initLoad(inInfo, hpsc001);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hpsc001.eiMetadata);
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPSC001.query", new THPSC001());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
THPSC001 hpsc001 = new THPSC001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpsc001.fromMap(map);
hpsc001.setCreatedBy(UserSession.getUserId());
hpsc001.setCreatedTime(sdf.format(new Date()));
hpsc001.setUpdatedBy(null);
hpsc001.setUpdatedTime(null);
this.dao.insert("HPSC001.insert", hpsc001.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
THPSC001 hpsc001 = new THPSC001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpsc001.fromMap(map);
hpsc001.setUpdatedBy(UserSession.getUserId());
hpsc001.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC001.update", hpsc001.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
THPSC001 hpsc001 = new THPSC001();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpsc001.fromMap(map);
this.dao.delete("HPPZ001.delete", hpsc001.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
}
package com.baosight.hpjx.hp.sc.service;
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-10 9:33:44
Version : 1.0
tableName :hpjx.t_hpsc001
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
PROJ_TYPE TINYINT,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PRINC1 VARCHAR,
PRINC2 VARCHAR,
STATUS TINYINT,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME,
DEP_CODE VARCHAR
-->
<sqlMap namespace="HPSC001">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.THPSC001">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
PROJ_TYPE as "projType", <!-- 项目类型 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRINC1 as "princ1", <!-- 本公司项目负责人 -->
PRINC2 as "princ2", <!-- 客户项目负责人 -->
STATUS as "status", <!-- 状态 0-未审核,1-已审核 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
FROM hpjx.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projType">
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isEmpty property="orderBy">
CREATED_TIME desc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projType">
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ1">
PRINC1 = #princ1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ2">
PRINC2 = #princ2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO hpjx.t_hpsc001 (ID,
COMPANY_CODE, <!-- 企业编码 预留 -->
PROJ_TYPE, <!-- 项目类型 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
PRINC1, <!-- 本公司项目负责人 -->
PRINC2, <!-- 客户项目负责人 -->
STATUS, <!-- 状态 0-未审核,1-已审核 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #princ1#, #princ2#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hpsc001 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hpsc001
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
PROJ_TYPE = #projType#, <!-- 项目类型 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
PRINC1 = #princ1#, <!-- 本公司项目负责人 -->
PRINC2 = #princ2#, <!-- 客户项目负责人 -->
STATUS = #status#, <!-- 状态 0-未审核,1-已审核 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DEP_CODE = #depCode# <!-- 部门编码 -->
WHERE
ID = #id#
</update>
</sqlMap>
\ No newline at end of file
package com.baosight.hpjx.hp.sc.sql;
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-10 9:33:44
Version : 1.0
tableName :hpjx.t_hpsc001
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
PROJ_TYPE TINYINT,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PRINC1 VARCHAR,
PRINC2 VARCHAR,
STATUS TINYINT,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME,
DEP_CODE VARCHAR
-->
<sqlMap namespace="HPSC001">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.sc.domain.THPSC001">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
PROJ_TYPE as "projType", <!-- 项目类型 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRINC1 as "princ1", <!-- 本公司项目负责人 -->
PRINC2 as "princ2", <!-- 客户项目负责人 -->
STATUS as "status", <!-- 状态 0-未审核,1-已审核 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
FROM hpjx.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projType">
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isEmpty property="orderBy">
CREATED_TIME desc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projType">
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ1">
PRINC1 = #princ1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ2">
PRINC2 = #princ2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO hpjx.t_hpsc001 (ID,
COMPANY_CODE, <!-- 企业编码 预留 -->
PROJ_TYPE, <!-- 项目类型 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
PRINC1, <!-- 本公司项目负责人 -->
PRINC2, <!-- 客户项目负责人 -->
STATUS, <!-- 状态 0-未审核,1-已审核 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #princ1#, #princ2#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hpsc001 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hpsc001
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
PROJ_TYPE = #projType#, <!-- 项目类型 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
PRINC1 = #princ1#, <!-- 本公司项目负责人 -->
PRINC2 = #princ2#, <!-- 客户项目负责人 -->
STATUS = #status#, <!-- 状态 0-未审核,1-已审核 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DEP_CODE = #depCode# <!-- 部门编码 -->
WHERE
ID = #id#
</update>
</sqlMap>
\ No newline at end of file
package com.baosight.hpjx.hp.zl.domain;
\ No newline at end of file
package com.baosight.hpjx.hp.zl.service;
\ No newline at end of file
package com.baosight.hpjx.hp.zl.sql;
\ No newline at end of file
package com.baosight.hpjx.util;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.HPConstants;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.data.ibatis.dao.Dao;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext;
import com.baosight.iplat4j.core.util.DateUtils;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author xuao
* @date 2024年01月09日 14:50
*/
public class CommonMethod {
protected static Dao dao = (Dao) PlatApplicationContext.getBean( "dao" );
/**
* @param inInfo 前后台交互对象
* @param tableParams 表信息
* @param selectParams 筛选条件
* 公用下拉方法
*/
public static void initBlock(EiInfo inInfo, List<DdynamicEnum> tableParams, Map<String, String> selectParams){
initBlock(inInfo, tableParams, selectParams,true);
}
/**
* @param inInfo 前后台交互对象
* @param tableParams 表信息
* @param selectParams 筛选条件
* 公用下拉方法
*/
public static void initBlock(EiInfo inInfo, List<DdynamicEnum> tableParams, Map<String, String> selectParams, Boolean isSplicingSymbol){
/* 新建一个块 将每个表查询到的结果放入单独的块中 */
EiBlock eiBlock;
/* 行数据 将每个数据源查询到的数据放到每个模块的行数据中 */
Map<String,String> row;
/* 每个数据源查询到的结果暂存在这个变量中 */
List results;
/* 将结果集中的每个结果暂存然后 强转为map */
Map tryValue;
/* 如果数据源为空就抛异常 原则上不允许出现这个问题!!! */
if (tableParams.size() <= 0) {
throw new NullPointerException();
}
/* 遍历每个数据源 */
for (DdynamicEnum tableParam : tableParams) {
/* 编辑块名称 */
eiBlock = new EiBlock(tableParam.getBlockId());
/* 将所有查询到的结果放到暂存变量中 */
results = dao.query(tableParam.getDbSource(), selectParams, EiConstant.defaultOffset,-999999);
for (Object result : results) {
row = new HashMap<>(3);
try {
tryValue = (Map) result;
}catch (ClassCastException e){
tryValue = ((DaoEPBase)result).toMap();
}
row.put(HPConstants.VALUE_FIELD, String.valueOf(tryValue.get(tableParam.getValue())));
if(isSplicingSymbol) {
row.put(HPConstants.TEXT_FIELD, (tryValue.get(tableParam.getValue()) + HPConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getText())));
}else{
row.put(HPConstants.TEXT_FIELD, String.valueOf(tryValue.get(tableParam.getText())));
}
eiBlock.addRow(row);
}
inInfo.setBlock(eiBlock);
}
}
public static void creatorInfo(EiInfo eiInfo, String resultBlock){
EiBlock block=eiInfo.getBlock(resultBlock);
String userId = UserSession.getLoginName();
String userName = UserSession.getLoginCName();
String time = DateUtils.curDateTimeStr14();
for(int i=0; i < block.getRowCount(); i++){
//TODO 公司代码待补充
block.setCell(i, HPConstants.SQL_FIELD_COMPANYCODE, "");
block.setCell(i, HPConstants.SQL_FIELD_CREATED_BY, userId+ HPConstants.SPLICING_SYMBOL + userName);
block.setCell(i, HPConstants.SQL_FIELD_CREATED_TIME, time);
block.setCell(i, HPConstants.SQL_FIELD_UPDATED_BY, userId+ HPConstants.SPLICING_SYMBOL + userName);
block.setCell(i, HPConstants.SQL_FIELD_UPDATED_TIME, time);
}
}
}
package com.baosight.iplat4j.hp.sc.domain;
\ No newline at end of file
package com.baosight.iplat4j.hp.sc.service;
\ No newline at end of file
package com.baosight.iplat4j.hp.sc.sql;
\ No newline at end of file
package com.baosight.iplat4j.hp.zl.domain;
\ No newline at end of file
package com.baosight.iplat4j.hp.zl.service;
\ No newline at end of file
package com.baosight.iplat4j.hp.zl.sql;
\ No newline at end of file
package com.baosight.iplat4j.util;
import com.baosight.iplat4j.common.HPConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.util.DateUtils;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
/**
* @author xuao
* @date 2024年01月09日 14:50
*/
public class CommonMethod {
public static void creatorInfo(EiInfo eiInfo, String resultBlock){
EiBlock block=eiInfo.getBlock(resultBlock);
String userId = UserSession.getLoginName();
String userName = UserSession.getLoginCName();
String time = DateUtils.curDateTimeStr14();
for(int i=0; i < block.getRowCount(); i++){
//TODO 公司代码待补充
block.setCell(i, HPConstants.SQL_FIELD_COMPANYCODE, "");
block.setCell(i, HPConstants.SQL_FIELD_CREATED_BY, userId+ HPConstants.SPLICING_SYMBOL + userName);
block.setCell(i, HPConstants.SQL_FIELD_CREATED_TIME, time);
block.setCell(i, HPConstants.SQL_FIELD_UPDATED_BY, userId+ HPConstants.SPLICING_SYMBOL + userName);
block.setCell(i, HPConstants.SQL_FIELD_UPDATED_TIME, time);
}
}
}
......@@ -16,7 +16,7 @@ spring.servlet.multipart.file-size-threshold =0
#\u9879\u76EE\u540D\u79F0
projectName=iplat4j
projectName=hpjx
moduleName=ep
projectEnv=dev
platSchema=iplat
......
$(function() {
// 查询
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
});
IPLATUI.EFGrid = {
"result": {
loadComplete: function (grid) {
// 新增
$("#BTN_INSERT").on("click", function () {
var btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
IPLAT.submitNode($("#HPKC008"), "HPKC008", "insert", {
onSuccess: function (ei) {
if (ei["status"] == -1) {
NotificationUtil(ei, "error");
} else {
// 绑定grid
resultGrid.setEiInfo(ei);
NotificationUtil({
msg: '新增成功'
});
}
//释放禁用按钮
btnNode.attr("disabled", false);
resultGrid.dataSource.page(1);
},
onFail: function (ei) { // onFail 表示失败回调函数
// 发生异常
console.log(ei);
//释放禁用按钮
btnNode.attr("disabled", false);
}
});
});
// 修改
$("#UPDATE").on("click", function () {
var rowCount = resultGrid.getCheckedRows();
// 检验是否选中数据
if (rowCount == null || rowCount == "") {
NotificationUtil({
msg : '请选择一条或多条数据'
}, "warning");
return false;
}
var btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
IPLAT.submitNode($("#HPKC008"), "HPKC008", "update", {
onSuccess: function (ei) {
if (ei["status"] == -1) {
NotificationUtil(ei, "error");
} else {
NotificationUtil({
msg: '修改成功'
});
// 绑定grid
resultGrid.setEiInfo(ei);
}
//释放禁用按钮
btnNode.attr("disabled", false);
},
onFail: function (ei) { // onFail 表示失败回调函数
// 发生异常
console.log(ei);
//释放禁用按钮
btnNode.attr("disabled", false);
}
});
});
//删除
$("#DELETE").on("click", function () {
var btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
var dataItems = resultGrid.getCheckedRows();
if (dataItems == null || dataItems == "") {
NotificationUtil({
msg: '选择要删除的数据'
}, "warning");
//释放禁用按钮
btnNode.attr("disabled", false);
return false;
}
IPLAT.submitNode($("#HPKC008"), "HPKC008", "delete", {
onSuccess: function (ei) {
if (ei["status"] == -1) {
NotificationUtil(ei, "error");
} else {
NotificationUtil({
msg: '删除成功'
});
// 绑定grid
resultGrid.setEiInfo(ei);
}
//释放禁用按钮
btnNode.attr("disabled", false);
},
onFail: function (ei) {// onFail
// 表示失败回调函数
// 发生异常
console.log(ei);
//释放禁用按钮
btnNode.attr("disabled", false);
}
});
});
}
},
};
});
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="数据统计单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker ename="inqu_status-0-datemonth" cname="单据日期"
format="yyyy-MM" start="year" depth="year" required="true"/>
<EF:EFInput ename="inqu_status-0-statisticalNumber" cname="统计单单号" colWidth="4" readonly="false"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<%-- <EF:EFComboColumn ename="datemonth" cname="月份" align="center"
blockName="company_type_block_id"
columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="textField"
valueField="valueField" width="100">
</EF:EFComboColumn>--%>
<EF:EFColumn ename="datemonth" cname="月份" width="100" readonly="false" />
<EF:EFColumn ename="statisticalNumber" cname="统计单单号" width="100" readonly="false" />
<EF:EFColumn ename="materialCode" cname="物料编码" width="100" readonly="false"/>
<EF:EFColumn ename="materialName" cname="物料名称" width="100" readonly="false"/>
<EF:EFColumn ename="unit" cname="单位" width="100" readonly="false"/>
<EF:EFColumn ename="amount" cname="数量" width="100" readonly="false"/>
<EF:EFColumn ename="price" cname="单价" width="100" readonly="false"/>
<EF:EFColumn ename="totalPrice" cname="金额" width="100" readonly="false"/>
<EF:EFColumn ename="notes" cname="备注" width="100" readonly="false"/>
<EF:EFColumn ename="createdTime" cname="创建时间" readonly="true" width="150" align="center" enable="false" parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="createdBy" cname="创建人" readonly="true" width="150" align="center" enable="false"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" readonly="true" width="150" align="center" enable="false" parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="updatedBy" cname="更新人" readonly="true" width="150" align="center" enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......@@ -7,7 +7,7 @@
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="设备索赔">
<EF:EFPage title="客商类型">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
......@@ -28,23 +28,27 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn align="center" ename="custClassify" cname="分类">
<EF:EFComboColumn required="true" align="center" ename="custClassify" cname="分类">
<EF:EFOption label="供应商" value="1"/>
<EF:EFOption label="客户" value="2"/>
</EF:EFComboColumn>
<EF:EFColumn ename="custCode" cname="类型编码"/>
<EF:EFComboColumn align="center" ename="custType" cname="客商类型">
<EF:EFColumn required="true" ename="custCode" cname="类型编码"/>
<EF:EFComboColumn required="true" align="center" ename="custType" cname="客商类型">
<EF:EFOption label="民营" value="1"/>
<EF:EFOption label="国营" value="2"/>
</EF:EFComboColumn>
<EF:EFComboColumn align="center" ename="status" cname="状态">
<EF:EFOption label="启用" value="1"/>
<EF:EFOption label="停用" value="0"/>
<EF:EFComboColumn required="true" ename="status" cname="状态" align="center"
columnTemplate="#=valueField#-#=textField#" optionLabel=" "
itemTemplate="#=valueField#-#=textField#" textField="textField"
valueField="valueField" width="100">
<EF:EFOption label="--请选择--" value=""></EF:EFOption>
<EF:EFOption label="启用" value="1"></EF:EFOption>
<EF:EFOption label="禁用" value="0"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="createdBy" enable="false" cname="创建时间"/>
<EF:EFColumn ename="createdTime" enable="false" cname="创建人"/>
<EF:EFColumn ename="updatedBy" enable="false" cname="修改时间"/>
<EF:EFColumn ename="updatedTime" enable="false" cname="修改人"/>
<EF:EFColumn ename="createdBy" enable="false" cname="创建人"/>
<EF:EFColumn ename="createdTime" dateFormat="yyyy-MM-dd HH:mm:ss" enable="false" cname="创建时间"/>
<EF:EFColumn ename="updatedBy" enable="false" cname="修改"/>
<EF:EFColumn ename="updatedTime" dateFormat="yyyy-MM-dd HH:mm:ss" enable="false" cname="修改时间"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......
......@@ -6,6 +6,7 @@ $(function() {
});
IPLATUI.EFGrid = {
"result": {
loadComplete: function (grid) {
......@@ -39,7 +40,7 @@ $(function() {
});
// 修改
$("#UPDATE").on("click", function () {
$("#BTN_UPDATE").on("click", function () {
var rowCount = resultGrid.getCheckedRows();
// 检验是否选中数据
if (rowCount == null || rowCount == "") {
......
......@@ -10,6 +10,16 @@
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="inqu_status-0-custName" cname="供应商名称" colWidth="4" readonly="false"/>
<EF:EFSelect ename="inqu_status-0-custType" cname="供应商类型" colWidth="4">
<EF:EFOption label="--请选择--" value=""/>
<EF:EFOption label="国企" value="1"></EF:EFOption>
<EF:EFOption label="民营" value="2"></EF:EFOption>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="4">
<EF:EFOption label="--请选择--" value=""/>
<EF:EFOption label="启用" value="1"></EF:EFOption>
<EF:EFOption label="禁用" value="0"></EF:EFOption>
</EF:EFSelect>
</div>
</EF:EFRegion>
......@@ -18,27 +28,27 @@
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFComboColumn ename="custType" cname="供应商类型" align="center"
blockName="company_type_block_id"
columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="textField"
valueField="valueField" width="100">
valueField="valueField" width="100" required="true">
<EF:EFOption label="--请选择--" value=""></EF:EFOption>
<EF:EFOption label="国企" value="1"></EF:EFOption>
<EF:EFOption label="民营" value="2"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="custCode" cname="供应商编码" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="custName" cname="供应商名称" width="100" readonly="false"/>
<EF:EFColumn ename="address" cname="地址" width="100" readonly="false"/>
<EF:EFComboColumn ename="status" cname="状态" align="center"
columnTemplate="#=valueField#-#=textField#" optionLabel=" "
itemTemplate="#=valueField#-#=textField#" textField="textField"
valueField="valueField" width="100">
<EF:EFColumn ename="custCode" cname="供应商编码" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="custName" cname="供应商名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="address" cname="地址" width="100" readonly="false" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="textField"
valueField="valueField" width="100" required="true">
<EF:EFOption label="--请选择--" value=""></EF:EFOption>
<EF:EFOption label="启用" value="1"></EF:EFOption>
<EF:EFOption label="禁用" value="0"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="createdTime" cname="创建时间" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="createdBy" cname="创建人" width="100" readonly="false"/>
<EF:EFColumn ename="createdBy" cname="创建人" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="updatedBy" cname="更新人" width="100" readonly="false"/>
<EF:EFColumn ename="updatedBy" cname="更新人" width="100" readonly="true" disabled="true"/>
</EF:EFGrid>
</EF:EFRegion>
......
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
}
});
\ No newline at end of file
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="客户档案">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="custCname" cname="客户名称" row="0"/>
<EF:EFSelect cname="客户类型" optionLabel="全部" blockId="inqu_status" ename="custType" row="0">
<EF:EFOption label="民营" value="1"/>
<EF:EFOption label="国营" value="2"/>
</EF:EFSelect>
<EF:EFSelect cname="状态" optionLabel="全部" blockId="inqu_status" ename="status" row="0">
<EF:EFOption label="启用" value="1"/>
<EF:EFOption label="停用" value="0"/>
</EF:EFSelect>
</div>
<EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn required="true" align="center" ename="custType" cname="客户类型">
<EF:EFOption label="民营" value="1"/>
<EF:EFOption label="国营" value="2"/>
</EF:EFComboColumn>
<EF:EFColumn equired="true" ename="custCode" cname="客户编码"/>
<EF:EFColumn equired="true" ename="custCname" cname="客户名称"/>
<EF:EFColumn ename="custAddr" cname="地址"/>
<EF:EFComboColumn required="true" ename="status" cname="状态" align="center"
columnTemplate="#=valueField#-#=textField#" optionLabel=" "
itemTemplate="#=valueField#-#=textField#" textField="textField"
valueField="valueField" width="100">
<EF:EFOption label="--请选择--" value=""></EF:EFOption>
<EF:EFOption label="启用" value="1"></EF:EFOption>
<EF:EFOption label="禁用" value="0"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="createdBy" enable="false" cname="创建人"/>
<EF:EFColumn ename="createdTime" dateFormat="yyyy-MM-dd HH:mm:ss" enable="false" cname="创建时间"/>
<EF:EFColumn ename="updatedBy" enable="false" cname="修改人"/>
<EF:EFColumn ename="updatedTime" dateFormat="yyyy-MM-dd HH:mm:ss" enable="false" cname="修改时间"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/PZ/HPPZ003.js"></script>
\ No newline at end of file
$(function() {
// 查询
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
});
IPLATUI.EFGrid = {
"result": {
loadComplete: function (grid) {
// 新增
$("#BTN_INSERT").on("click", function () {
var btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
IPLAT.submitNode($("#HPPZ004"), "HPPZ004", "insert", {
onSuccess: function (ei) {
if (ei["status"] == -1) {
NotificationUtil(ei, "error");
} else {
// 绑定grid
resultGrid.setEiInfo(ei);
NotificationUtil({
msg: '新增成功'
});
}
//释放禁用按钮
btnNode.attr("disabled", false);
resultGrid.dataSource.page(1);
},
onFail: function (ei) { // onFail 表示失败回调函数
// 发生异常
console.log(ei);
//释放禁用按钮
btnNode.attr("disabled", false);
}
});
});
// 修改
$("#UPDATE").on("click", function () {
var rowCount = resultGrid.getCheckedRows();
// 检验是否选中数据
if (rowCount == null || rowCount == "") {
NotificationUtil({
msg : '请选择一条或多条数据'
}, "warning");
return false;
}
var btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
IPLAT.submitNode($("#HPPZ004"), "HPPZ004", "update", {
onSuccess: function (ei) {
if (ei["status"] == -1) {
NotificationUtil(ei, "error");
} else {
NotificationUtil({
msg: '修改成功'
});
// 绑定grid
resultGrid.setEiInfo(ei);
}
//释放禁用按钮
btnNode.attr("disabled", false);
},
onFail: function (ei) { // onFail 表示失败回调函数
// 发生异常
console.log(ei);
//释放禁用按钮
btnNode.attr("disabled", false);
}
});
});
//删除
$("#DELETE").on("click", function () {
var btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
var dataItems = resultGrid.getCheckedRows();
if (dataItems == null || dataItems == "") {
NotificationUtil({
msg: '选择要删除的数据'
}, "warning");
//释放禁用按钮
btnNode.attr("disabled", false);
return false;
}
IPLAT.submitNode($("#HPPZ004"), "HPPZ004", "delete", {
onSuccess: function (ei) {
if (ei["status"] == -1) {
NotificationUtil(ei, "error");
} else {
NotificationUtil({
msg: '删除成功'
});
// 绑定grid
resultGrid.setEiInfo(ei);
}
//释放禁用按钮
btnNode.attr("disabled", false);
},
onFail: function (ei) {// onFail
// 表示失败回调函数
// 发生异常
console.log(ei);
//释放禁用按钮
btnNode.attr("disabled", false);
}
});
});
}
},
};
});
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="存货类型">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="inqu_status-0-inventName" cname="存货类型" colWidth="4" readonly="false"/>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="4">
<EF:EFOption label="--请选择--" value=""/>
<EF:EFOption label="启用" value="1"></EF:EFOption>
<EF:EFOption label="未启用" value="0"></EF:EFOption>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="inventCode" cname="类型编码" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="inventType" cname="存货类型" width="100" readonly="false" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="textField"
valueField="valueField" width="100" required="true">
<EF:EFOption label="--请选择--" value=""></EF:EFOption>
<EF:EFOption label="启用" value="1"></EF:EFOption>
<EF:EFOption label="禁用" value="0"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="createdTime" cname="创建时间" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="createdBy" cname="创建人" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="updatedBy" cname="更新人" width="100" readonly="true" disabled="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
}
});
\ No newline at end of file
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="库存预警值档案">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="whName" cname="仓库名称:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="whType" cname="仓库类型:" row="0"/>
</div>
<EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="whType" required='true' cname="仓库类型"/>
<EF:EFColumn ename="whCode" required='true' cname="仓库编码"/>
<EF:EFColumn ename="whName" required='true' cname="仓库名称"/>
<EF:EFColumn ename="inventType" required='true' cname="存货类型"/>
<EF:EFColumn ename="inventCode" required='true' cname="存货编码"/>
<EF:EFColumn ename="inventName" required='true' cname="存货名称"/>
<EF:EFColumn ename="spec" cname="规格"/>
<EF:EFColumn ename="mat" cname="材质"/>
<EF:EFColumn ename="uint" cname="单位"/>
<EF:EFColumn ename="alertValue" required='true' cname="预警值"/>
<EF:EFColumn ename="createdBy" enable="false" cname="创建时间"/>
<EF:EFColumn ename="createdTime" enable="false" cname="创建人"/>
<EF:EFColumn ename="updatedBy" enable="false" cname="修改时间"/>
<EF:EFColumn ename="updatedTime" enable="false" cname="修改人"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/PZ/HPPZ008.js"></script>
\ No newline at end of file
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
}
});
\ No newline at end of file
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="项目档案">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="projType" cname="项目类型:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0"/>
<EF:EFSelect cname="单据状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0">
<EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="已审核" value="1"/>
</EF:EFSelect>
</div>
<EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projType" required='true' cname="项目类型"/>
<EF:EFColumn required="true" ename="projCode" cname="项目编码"/>
<EF:EFColumn required="true" ename="projName" cname="项目名称"/>
<EF:EFColumn required="true" ename="princ1" cname="本公司项目负责人"/>
<EF:EFColumn required="true" ename="princ2" cname="客户项目负责人"/>
<EF:EFComboColumn required="true" align="center" ename="status" cname="状态">
<EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="已审核" value="1"/>
</EF:EFComboColumn>
<EF:EFColumn ename="remark" cname="备注"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/PZ/HPSC001.js"></script>
\ No newline at end of file
......@@ -2,16 +2,16 @@
<licenses>
<license code="iPlat4J-Smart">
<LicenseCode desc="产品代码" type="fixed">iPlat4J-Smart</LicenseCode>
<ExpiringDate desc="过期时间" type="fixed">2024-04-05</ExpiringDate>
<ExpiringDate desc="过期时间" type="fixed">2024-04-09</ExpiringDate>
<AuthorizingCompany desc="签发单位" type="fixed">上海宝信软件股份有限公司</AuthorizingCompany>
<AuthorizingSoftware desc="产品名称" type="fixed">iPlat4J-Smart</AuthorizingSoftware>
<AuthorizedClient desc="授权部门名称" type="fixed">武汉宝信大数据事业部</AuthorizedClient>
<AuthorizedEnterprise desc="授权企业名称" type="fixed">武汉宝信大数据事业部</AuthorizedEnterprise>
<AuthorizedProject desc="项目名称" type="fixed">iplat_smart</AuthorizedProject>
<AuthorizedProject desc="项目名称" type="fixed">hpjx</AuthorizedProject>
<AuthorizedOS desc="授权操作系统" type="fixed">Linux</AuthorizedOS>
<SigningDate desc="签发时间" type="fixed">20240105</SigningDate>
<StartDate desc="开始时间" type="fixed">2024-01-05</StartDate>
<LicenseID desc="许可证编号" type="fixed">LIC20240105iplat_smart</LicenseID>
<SigningDate desc="签发时间" type="fixed">20240109</SigningDate>
<StartDate desc="开始时间" type="fixed">2024-01-09</StartDate>
<LicenseID desc="许可证编号" type="fixed">LIC20240109hpjx</LicenseID>
<LicenseMode desc="许可证模式" type="fixed">CheckHost</LicenseMode>
<HostMAC desc="主机MAC地址" type="fixed"></HostMAC>
<PluginXdatashow desc="报屏" type="customized">1</PluginXdatashow>
......@@ -19,14 +19,17 @@
<PluginUi desc="Vue UI" type="customized">1</PluginUi>
<PluginDoc desc="文档" type="customized">1</PluginDoc>
<PluginOrg desc="组织机构" type="customized">1</PluginOrg>
<PluginRedis desc="Redis缓存" type="customized">1</PluginRedis>
<PluginMessage desc="电文通信" type="customized">1</PluginMessage>
<PluginDatas desc="数据管理" type="customized">1</PluginDatas>
<PluginLog desc="日志" type="customized">1</PluginLog>
<PluginProtal desc="门户" type="customized">1</PluginProtal>
<PluginWidgetEco desc="微件" type="customized">1</PluginWidgetEco>
<PluginMail desc="邮件" type="customized">1</PluginMail>
<PluginNetty desc="高性能通信通信" type="customized">1</PluginNetty>
<PluginLowcode desc="低代码" type="customized">1</PluginLowcode>
<signature desc="防伪签名" type="fixed">
302c02146dab42fa53a41d2c01f7adbc9b5429811ae4773302142aaa63b072abad1fd65898ecfe25a0007f7a69c7
302d02150091439af39970c82694fd53189dcefd17c28fffc90214153ada7ee0a4c26c4b752c4cc0b1e4986f49178e
</signature>
</license>
</licenses>
<?xml version="1.0" encoding="UTF-8"?>
<licenses>
<license code="iPlat4J-Smart">
<LicenseCode desc="产品代码" type="fixed">iPlat4J-Smart</LicenseCode>
<ExpiringDate desc="过期时间" type="fixed">2024-04-05</ExpiringDate>
<AuthorizingCompany desc="签发单位" type="fixed">上海宝信软件股份有限公司</AuthorizingCompany>
<AuthorizingSoftware desc="产品名称" type="fixed">iPlat4J-Smart</AuthorizingSoftware>
<AuthorizedClient desc="授权部门名称" type="fixed">武汉宝信大数据事业部</AuthorizedClient>
<AuthorizedEnterprise desc="授权企业名称" type="fixed">武汉宝信大数据事业部</AuthorizedEnterprise>
<AuthorizedProject desc="项目名称" type="fixed">iplat_smart</AuthorizedProject>
<AuthorizedOS desc="授权操作系统" type="fixed">Linux</AuthorizedOS>
<SigningDate desc="签发时间" type="fixed">20240105</SigningDate>
<StartDate desc="开始时间" type="fixed">2024-01-05</StartDate>
<LicenseID desc="许可证编号" type="fixed">LIC20240105iplat_smart</LicenseID>
<LicenseMode desc="许可证模式" type="fixed">CheckHost</LicenseMode>
<HostMAC desc="主机MAC地址" type="fixed"></HostMAC>
<PluginXdatashow desc="报屏" type="customized">1</PluginXdatashow>
<PluginReport desc="报表" type="customized">1</PluginReport>
<PluginUi desc="Vue UI" type="customized">1</PluginUi>
<PluginDoc desc="文档" type="customized">1</PluginDoc>
<PluginOrg desc="组织机构" type="customized">1</PluginOrg>
<PluginMessage desc="电文通信" type="customized">1</PluginMessage>
<PluginDatas desc="数据管理" type="customized">1</PluginDatas>
<PluginLog desc="日志" type="customized">1</PluginLog>
<PluginProtal desc="门户" type="customized">1</PluginProtal>
<PluginWidgetEco desc="微件" type="customized">1</PluginWidgetEco>
<PluginMail desc="邮件" type="customized">1</PluginMail>
<signature desc="防伪签名" type="fixed">
302c02146dab42fa53a41d2c01f7adbc9b5429811ae4773302142aaa63b072abad1fd65898ecfe25a0007f7a69c7
</signature>
</license>
</licenses>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment