Commit 0107dc8e by liuyang

Merge branch 'dev' of http://git.pseer.com/platform/hp-smart into dev-ly

parents 4bac6ab9 5822a918
......@@ -267,6 +267,12 @@ public enum DdynamicEnum {
USER_ID1_BLOCK_ID("user_id1_block_id","userId","userName","factoryCode","groupCode", "HPSC008.queryUserId"),
/**
* 模块:维修人员
* 用途:用户查询
* 编写:w
*/
REP_USER_ID_BLOCK_ID("rep_user_id_block_id","userId","userName", "HPXS006.queryUserId"),
/**
* 模块:系统管理
* 用途:生产组查询
* 编写:ly
......
......@@ -9,35 +9,46 @@ import com.baosight.hpjx.equipment.hp.domain.CutterbarWarningBase;
import com.baosight.hpjx.hp.sb.domain.HPSB001;
import com.baosight.hpjx.hp.sb.domain.HPSB002;
import com.baosight.hpjx.hp.sb.domain.HPSB00A;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.hpjx.xml.XmlUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.service.soa.XLocalManager;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RestController
@CrossOrigin
@RequestMapping({"/log/information"})
public class LogInformationController extends ServiceBase {
@RequestMapping({"/log"})
public class LogInformationController {
@RequestMapping({"/analysis"})
public String logAnalysis(@PathVariable HPSB00A hpsb00A) {
@RequestMapping(value = "/information", method = RequestMethod.POST)
public Map logAnalysis(@RequestBody HPSB00A hpsb00A) {
HPSB002 hpsb002 = new HPSB002();
HPSB001 hpsb001 = new HPSB001();
List<HPSB002> hpsb002List = new ArrayList<>();
List<HPSB001> hpsb001List = new ArrayList<>();
//Map<String,String> resultMap = new HashMap<>();
Map resultMap = new HashMap();
EiInfo outInfo = new EiInfo();
//TODO 根据TYPE来判断内容属于哪一种,然后再进行解析
//TODO TYPE = STARUS_TYPE --- 设备状态
//TODO TYPE = TIME_TYPE --- 开机时间
//TODO TYPE = WARNING_TYPE --- 报警内容
String equipmentType = hpsb00A.getEquipmentType();
if (StringUtils.isEmpty(equipmentType)) {
if (StringUtils.isNotEmpty(equipmentType)) {
if (equipmentType.equals(HPConstants.STARUS_TYPE)) {
//解析设备状态
List<CutterbarStatus> cutterbarStatusList = XmlUtils.readXml(hpsb00A.getDataContent(), CutterbarStatus.class);
......@@ -45,8 +56,14 @@ public class LogInformationController extends ServiceBase {
hpsb002.setEquipmentCode(hpsb00A.getEquipmentCode());
hpsb002.setEquipmentType(hpsb00A.getEquipmentType());
hpsb002.setLogValue(cutterbarStatusList.get(0).getStatus().toString());
DaoUtils.insert("HPSB002.insert", hpsb002);
return "设备日志记录成功";
hpsb002List.add(hpsb002);
outInfo.addBlock(EiConstant.resultBlock).setRows(hpsb002List);
outInfo.set(EiConstant.serviceName, "HPSB002");
outInfo.set(EiConstant.methodName, "insert");
outInfo = XLocalManager.call(outInfo);
resultMap.put("status", EiConstant.STATUS_SUCCESS);
resultMap.put("message", outInfo.getMsg());
return resultMap;
}
if (equipmentType.equals(HPConstants.TIME_TYPE)) {
//解析开机时间
......@@ -55,8 +72,14 @@ public class LogInformationController extends ServiceBase {
hpsb002.setEquipmentCode(hpsb00A.getEquipmentCode());
hpsb002.setEquipmentType(hpsb00A.getEquipmentType());
hpsb002.setLogValue(cutterbarTimeList.get(0).getTime());
DaoUtils.insert("HPSB002.insert", hpsb002);
return "设备日志记录成功";
hpsb002List.add(hpsb002);
outInfo.addBlock(EiConstant.resultBlock).setRows(hpsb002List);
outInfo.set(EiConstant.serviceName, "HPSB002");
outInfo.set(EiConstant.methodName, "insert");
outInfo = XLocalManager.call(outInfo);
resultMap.put("status", EiConstant.STATUS_SUCCESS);
resultMap.put("message", outInfo.getMsg());
return resultMap;
}
if (equipmentType.equals(HPConstants.WARNING_TYPE)) {
//解析报警内容
......@@ -74,10 +97,19 @@ public class LogInformationController extends ServiceBase {
hpsb001.setFileName(cutterbarWarning.getFileName());
hpsb001.setEquipmentCode(hpsb00A.getEquipmentCode());
hpsb001.setEquipmentType(hpsb00A.getEquipmentType());
DaoUtils.insert("HPSB001.insert", hpsb001);
return "设备异常日志记录成功";
hpsb001List.add(hpsb001);
outInfo.addBlock(EiConstant.resultBlock).setRows(hpsb001List);
outInfo.set(EiConstant.serviceName, "HPSB001");
outInfo.set(EiConstant.methodName, "insert");
outInfo = XLocalManager.call(outInfo);
resultMap.put("status", EiConstant.STATUS_SUCCESS);
resultMap.put("message", outInfo.getMsg());
return resultMap;
}
}
return "未解析到日志类型";
resultMap.put("status", 500);
resultMap.put("message", "未解析到数据类型");
return resultMap;
}
}
......@@ -58,7 +58,8 @@ public class HPConstant {
public static final String HPSC005_PROD_NO = "HPSC005_PROD_NO";
//生产任务订单
public static final String PROD_TASK_NO = "PROD_TASK_NO";
//售后维修单号
public static final String HPXS006_PROD_NO = "HPXS006_NUMBER";
}
/**
......
......@@ -55,6 +55,7 @@ public class ServiceHPKC002 extends ServiceBase {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC002().eiMetadata);
inInfo.setBlock(InventTypeEnum.generatorEiBlock());
} catch (PlatException e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
......@@ -77,6 +78,7 @@ public class ServiceHPKC002 extends ServiceBase {
queryRow.put("inventTypes", DEFAULT_INVENT_CODE);
inInfo = super.query(inInfo, HPKC002.QUERY, new HPKC002());
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
......@@ -121,6 +123,7 @@ public class ServiceHPKC002 extends ServiceBase {
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
......
......@@ -73,6 +73,7 @@ public class ServiceHPKC002A extends ServiceEPBase {
}
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC010().eiMetadata);
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
......@@ -92,6 +93,7 @@ public class ServiceHPKC002A extends ServiceEPBase {
queryRow.put("inventTypes", DEFAULT_INVENT_CODE);
inInfo = super.query(inInfo, HPKC010.QUERY, new HPKC010());
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
......@@ -119,6 +121,7 @@ public class ServiceHPKC002A extends ServiceEPBase {
// 生成销售库单
this.saveData(resultRows, dbKc010Map, hpsc006Id);
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setMsg(inInfo, e, "生成领料单失败");
}
return inInfo;
......
......@@ -53,6 +53,7 @@ public class ServiceHPKC003 extends ServiceBase {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC003().eiMetadata);
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
......@@ -74,6 +75,7 @@ public class ServiceHPKC003 extends ServiceBase {
StringUtil.DEFAULT_CHARACTER_TO_BE_REMOVED));
inInfo = super.query(inInfo, "HPKC003.query", new HPKC003());
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
......@@ -121,6 +123,7 @@ public class ServiceHPKC003 extends ServiceBase {
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
} catch (Exception e) {
eiInfo.setStatus(500);
LogUtils.setDetailMsg(eiInfo, e, "删除失败");
}
return eiInfo;
......
......@@ -61,6 +61,7 @@ public class ServiceHPKC003A extends ServiceEPBase {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata);
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
......@@ -80,6 +81,7 @@ public class ServiceHPKC003A extends ServiceEPBase {
queryMap.put("isComplete", CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPSC005B.QUERY, new HPSC005B());
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
......@@ -154,6 +156,7 @@ public class ServiceHPKC003A extends ServiceEPBase {
newKc003.getAmount(), newKc003.getWeight(),fSc005b.getFactoryCode());
}
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "生成入库单失败");
}
return inInfo;
......
......@@ -78,6 +78,7 @@ public class ServiceHPSB002 extends ServiceBase {
return query(inInfo);
}
/**
* 修改操作.
*/
......
......@@ -45,6 +45,7 @@ public class ServiceHPSC002B extends ServiceEPBase {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002A().eiMetadata);
}
} catch (PlatException e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
......@@ -68,6 +69,7 @@ public class ServiceHPSC002B extends ServiceEPBase {
inInfo = super.query(inInfo, "HPSC002B.queryDev", new HPSC002B());
}
} catch (Throwable e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
......
......@@ -35,6 +35,7 @@ public class ServiceHPSC005 extends ServiceBase {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005().eiMetadata);
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
......@@ -56,6 +57,7 @@ public class ServiceHPSC005 extends ServiceBase {
DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC003.FIELD_PLAN_COMPLETION_DATE)));
inInfo = super.query(inInfo, HPSC005.QUERY, new HPSC005());
} catch (Throwable e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
......
......@@ -50,6 +50,7 @@ public class ServiceHPSC005A extends ServiceBase {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005A().eiMetadata);
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
......@@ -67,6 +68,7 @@ public class ServiceHPSC005A extends ServiceBase {
try {
inInfo = super.query(inInfo, HPSC005A.QUERY, new HPSC005A());
} catch (Throwable e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
......@@ -111,6 +113,7 @@ public class ServiceHPSC005A extends ServiceBase {
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据操作成功!");
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setMsg(inInfo, e, "新增失败");
}
return inInfo;
......@@ -190,6 +193,7 @@ public class ServiceHPSC005A extends ServiceBase {
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setMsg(inInfo, e, "删除失败");
}
return inInfo;
......
......@@ -32,6 +32,7 @@ public class ServiceHPSC005B extends ServiceBase {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata);
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
......@@ -49,6 +50,7 @@ public class ServiceHPSC005B extends ServiceBase {
try {
inInfo = super.query(inInfo, HPSC005B.QUERY, new HPSC005B());
} catch (Throwable e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
......
......@@ -46,6 +46,7 @@ public class ServiceHPSC005C extends ServiceBase {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUB_INVENT_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005C().eiMetadata);
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
......@@ -64,6 +65,7 @@ public class ServiceHPSC005C extends ServiceBase {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
inInfo = super.query(inInfo, HPSC005C.QUERY, new HPSC005C());
} catch (Throwable e) {
inInfo.setStatus(500);
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
......
......@@ -177,7 +177,7 @@
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
......
package com.baosight.hpjx.hp.xs.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.CompanyTypeEnum;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.HPConstants;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ003;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC008;
import com.baosight.hpjx.hp.xs.domain.HPXS006;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.contants.ACConstants;
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.service.soa.XLocalManager;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.*;
/**
*
*/
public class ServiceHPXS006 extends ServiceBase {
/**
* 画面初始化.
*/
@OperationLogAnnotation(operModul = "售后维修",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
/*inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0, "userId",UserSessionUtils.getFactoryCode().get(0));*/
inInfo = super.query(inInfo, HPXS006.QUERY, new HPSC001());
Map map = new HashMap();
map.put("companyCode", UserSessionUtils.getCompanyCode());
map.put("factoryCodes", UserSessionUtils.getFactoryCode());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.REP_USER_ID_BLOCK_ID), map,true);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*/
@Override
@OperationLogAnnotation(operModul = "售后维修",operType = "查询")
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPXS006.FIELD_REP_DATE,
DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPXS006.FIELD_REP_DATE)));
EiInfo outInfo = super.query(inInfo, HPXS006.QUERY, new HPXS006());
return outInfo;
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "售后维修",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HPXS006 hpsc006 = new HPXS006();
hpsc006.fromMap(resultRows.get(i));
hpsc006.setRepDate(DateUtils.formatShort(hpsc006.getRepDate()));
/* HPPZ003 fPz003 = new HPPZ003();
if (hpsc001.getPrinc2().trim().isEmpty()) {
fPz003.setCustCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPPZ003_CUST_CODE));
fPz003.setCustType(CompanyTypeEnum.GQ.getCode());
fPz003.setCustName(resultRows.get(i).get("princ2Name").toString());
fPz003.setCompanyName(resultRows.get(i).get("princ2Name").toString());
DaoUtils.insert("HPPZ003.insert", fPz003);
hpsc001.setPrinc2(fPz003.getCustCode());
}*/
if (hpsc006.getId() == null || hpsc006.getId() == 0) {
this.add(hpsc006);
} else {
this.modify(hpsc006);
}
}
//inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增
*
* @param hpxs006
* @throws Exception
*/
private void add(HPXS006 hpxs006) throws Exception {
hpxs006.setRepOrderNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPXS006_PROD_NO));
DaoUtils.insert(HPXS006.INSERT, hpxs006);
}
/**
* 修改数据
*
* @param hpxs006
*/
private void modify(HPXS006 hpxs006) {
DaoUtils.update(HPXS006.UPDATE, hpxs006);
}
/**
* 删除操作.
*/
@OperationLogAnnotation(operModul = "售后维修",operType = "删除")
public EiInfo delete(EiInfo eiInfo) {
HPXS006 hpxs006 = new HPXS006();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpxs006.fromMap(map);
this.dao.delete(HPXS006.DELETE, hpxs006.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 query(eiInfo);
}
/**
*审核
*/
@OperationLogAnnotation(operModul = "售后维修",operType = "审核")
public EiInfo check(EiInfo eiInfo) {
HPXS006 hpxs006 = new HPXS006();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpxs006.fromMap(map);
DaoUtils.update(HPXS006.CHECK, hpxs006.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;
}
public void buildHPSC002(EiInfo eiInfo) {
HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
List rows = new ArrayList();
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpsc001.fromMap(map);
Map hpsc002 = new HashMap();
hpsc002.put("companyCode", hpsc001.getCompanyCode());
hpsc002.put("depCode", hpsc001.getDepCode());
hpsc002.put("projCode", hpsc001.getProjCode());
hpsc002.put("projName", hpsc001.getProjName());
hpsc002.put("parentId", "root"); //固定写死
hpsc002.put("parentPrdtName", hpsc001.getProjName());
hpsc002.put("deliveryDate",hpsc001.getDeliveryDate());
hpsc002.put("type", "");
hpsc002.put("leaf", "0");
hpsc002.put("sort", "");
hpsc002.put("icon", "");
hpsc002.put("prdtCode", hpsc001.getProjCode());
hpsc002.put("prdtName", hpsc001.getProjName());
hpsc002.put("depCode", hpsc001.getDepCode());
rows.add(hpsc002);
}
eiBlock.setRows(rows);
eiInfo.set(EiConstant.serviceName, "HPSC002");
eiInfo.set(EiConstant.methodName, "insert");
EiInfo outInfo = XLocalManager.call(eiInfo);
if (outInfo.getStatus() < 0) {
throw new PlatException(outInfo.getMsg());
}
}
/**
* 项目下拉框
*
* @param inInfo
* @return
*/
public EiInfo queryComboBox(EiInfo inInfo) {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.PROJ_RECORD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo));
return inInfo;
}
}
<?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-04-18 8:37:45
Version : 1.0
tableName :hpjx.t_hpxs006
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
REP_DATE VARCHAR,
REP_ORDER_NO VARCHAR,
REP_CUSTOM_ID VARCHAR,
REP_USER_ID VARCHAR,
REP_STATUS TINYINT
-->
<sqlMap namespace="HPXS006">
<sql id="authCondition">
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="repDate">
REP_DATE = #repDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="repOrderNo">
REP_ORDER_NO LIKE CONCAT('%', #repOrderNo#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="repCustomId">
REP_CUSTOM_ID = #repCustomId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="repUserId">
REP_USER_ID = #repUserId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="repStatus">
REP_STATUS = #repStatus#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.xs.domain.HPXS006">
SELECT
ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除 0-否1-是 -->
REP_DATE as "repDate", <!-- 维修日期 -->
REP_ORDER_NO as "repOrderNo", <!-- 维修单号 -->
REP_CUSTOM_ID as "repCustomId", <!-- 客户人员 -->
REP_USER_ID as "repUserId", <!-- 维修人员 -->
REP_STATUS as "repStatus" <!-- 维修状态 0-待维修 1-已维修 -->
FROM hpjx.t_hpxs006 WHERE 1=1
<include refid="authCondition"/>
<include refid="condition"/>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpxs006 WHERE 1=1
<include refid="authCondition"/>
<include refid="condition"/>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="repDate">
REP_DATE = #repDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="repOrderNo">
REP_ORDER_NO = #repOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="repCustomId">
REP_CUSTOM_ID = #repCustomId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="repUserId">
REP_USER_ID = #repUserId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="repStatus">
REP_STATUS = #repStatus#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO hpjx.t_hpxs006 (ID, <!-- ID -->
COMPANY_CODE, <!-- 公司编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 -->
DELETE_FLAG, <!-- 是否删除 0-否1-是 -->
REP_DATE, <!-- 维修日期 -->
REP_ORDER_NO, <!-- 维修单号 -->
REP_CUSTOM_ID, <!-- 客户人员 -->
REP_USER_ID, <!-- 维修人员 -->
REP_STATUS <!-- 维修状态 0-待维修 1-已维修 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #repDate#, #repOrderNo#, #repCustomId#, #repUserId#, #repStatus#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hpxs006 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hpxs006
SET
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除 0-否1-是 -->
REP_DATE = #repDate#, <!-- 维修日期 -->
REP_ORDER_NO = #repOrderNo#, <!-- 维修单号 -->
REP_CUSTOM_ID = #repCustomId#, <!-- 客户人员 -->
REP_USER_ID = #repUserId#, <!-- 维修人员 -->
REP_STATUS = #repStatus# <!-- 维修状态 0-待维修 1-已维修 -->
WHERE
ID = #id#
</update>
<update id="check">
UPDATE hpjx.t_hpxs006
SET
REP_STATUS = #repStatus# <!-- 维修状态 0-待维修 1-已维修 -->
WHERE
ID = #id#
</update>
<select id="queryUserId" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select b.USER_ID as "userId",b.USER_NAME as "userName"
from iplat.txsog02 a
join iplat.xs_user b on a.USER_ID=b.USER_ID
join iplat.txsog01 c on c.ORG_ID = a.ORG_ID and c.IS_DELETED = 0
where 1=1
<isNotEmpty prepend=" AND " property="companyCode">
c.COMPANY_CODE = #companyCode#
</isNotEmpty>
<!-- <isNotEmpty prepend=" AND " property="factoryCodes">
c.FACTORY_CODE = #factoryCode#
</isNotEmpty>-->
<isNotEmpty prepend=" AND " property="factoryCodes">
c.FACTORY_CODE IN <iterate close=")" open="(" conjunction="," property="factoryCodes">#factoryCodes[]#</iterate>
</isNotEmpty>
</select>
</sqlMap>
\ No newline at end of file
......@@ -35,7 +35,7 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFInput ename="inqu_result-0-hpsc006Id" type="hidden"/>
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="库存ID" enable="false" width="60" align="center" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
......
......@@ -29,7 +29,7 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFInput ename="inqu_result-0-hpsc006Id" type="hidden"/>
<EF:EFGrid blockId="result" autoDraw="override" autoFit="true" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" autoFit="true" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="库存ID" enable="false" width="60" align="center" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="10" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
......
......@@ -30,7 +30,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="生产订单ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="childId" cname="生产任务ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
......
......@@ -21,7 +21,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="库存ID" enable="false" width="60" align="center" hidden="true"/>
<EF:EFComboColumn ename="factoryCode" enable="false" cname="厂区" width="110" align="center" defaultValue=""
filter="contains" readonly="true">
......
......@@ -28,7 +28,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="库存ID" enable="false" width="60" align="center" hidden="true"/>
<EF:EFComboColumn ename="factoryCode" enable="false" cname="厂区" width="110" align="center" defaultValue=""
filter="contains" readonly="true">
......
......@@ -28,7 +28,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="库存ID" enable="false" width="60" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
......
......@@ -47,7 +47,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="otherEnterNo" cname="入库单号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd"
......
......@@ -47,7 +47,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="otherOuterNo" cname="出库单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" enable="false" editType="date" dateFormat="yyyy-MM-dd"
......
......@@ -34,7 +34,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="库存ID" enable="false" width="60" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
......
......@@ -32,7 +32,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="dateProc" cname="日期" enable="false" width="90" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="90" align="center">
......
......@@ -28,7 +28,7 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目号" />
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
......
......@@ -26,7 +26,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn required="true" align="center" ename="custClassify" cname="分类">
<EF:EFOption label="供应商" value="1"/>
......
......@@ -24,7 +24,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="custCode" cname="客户编码" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="custType" cname="客户类型" width="100" align="center" defaultValue="1" required="true">
......
......@@ -21,7 +21,7 @@
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集" >
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="inventCode" cname="类型编码"/>
<EF:EFColumn ename="inventName" cname="存货类型"/>
......
......@@ -25,7 +25,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="factoryCode" cname="厂区" width="110" align="center" defaultValue="" required="true"
filter="contains">
......
......@@ -20,7 +20,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" >
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="whType" required='true' cname="仓库类型"/>
<EF:EFColumn ename="whCode" required='true' cname="仓库编码"/>
......
......@@ -13,7 +13,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="single">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="single" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<%--<EF:EFColumn ename="docIdPc" cname="主键" hidden="true"/>
<EF:EFColumn ename="docIdApp" cname="主键" hidden="true"/>--%>
......
......@@ -19,7 +19,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="userId" cname="登录名" enable="false" width="120" align="center"/>
<EF:EFColumn ename="userName" cname="用户姓名" enable="false" width="140" align="center"/>
......
......@@ -17,7 +17,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="factoryName" cname="工厂" width="120" align="center" required="true"/>
......
......@@ -37,7 +37,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true"
readonly="true">
......
......@@ -37,7 +37,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="userId" cname="工号" enable="false" width="120" align="center"/>
<EF:EFColumn ename="userName" cname="姓名" width="120" align="center" required="true" readonly="true"/>
......
......@@ -37,7 +37,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="regDate" cname="登记日期" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
......
......@@ -17,7 +17,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="120" align="center"/>
......
......@@ -32,7 +32,7 @@
<div id="right-pane" class="i-fit-height" style="width: 80%;float: right">
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="level" cname="层级" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" hidden="true"/>
......
......@@ -17,7 +17,7 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="主键id" hidden="true"/>
<EF:EFColumn ename="createdName" cname="操作人" enable="false" readonly="true" width="150" align="center"/>
<EF:EFColumn ename="createdBy" cname="操作人" enable="false" readonly="true" width="150" align="center"/>
<EF:EFColumn ename="errorCode" cname="异常编码" enable="false" readonly="true" width="100" align="center"/>
<EF:EFColumn ename="programNo" cname="程序号" enable="false" readonly="true" width="80" align="center"/>
<EF:EFColumn ename="equipmentType" cname="设备状态" enable="false" readonly="true" width="100" align="center"/>
......
......@@ -16,7 +16,7 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="主键id" hidden="true"/>
<EF:EFColumn ename="createdName" cname="操作人" enable="false" readonly="true" width="150" align="center"/>
<EF:EFColumn ename="createdBy" cname="操作人" enable="false" readonly="true" width="150" align="center"/>
<EF:EFColumn ename="equipmentType" cname="设备状态" enable="false" readonly="true" width="100" align="center"/>
<EF:EFColumn ename="equipmentCode" cname="设备编码" enable="false" readonly="true" width="100" align="center"/>
<EF:EFColumn ename="logValue" cname="数据内容" enable="false" readonly="true" width="100" align="center"/>
......
......@@ -41,7 +41,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<%--blockName="factoryCodeBox_block_id"--%>
......
......@@ -36,7 +36,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="100" align="center"/>
......@@ -68,7 +68,7 @@
</EF:EFRegion>
<EF:EFRegion id="detail" title="明细信息">
<EF:EFGrid blockId="detail" autoDraw="no">
<EF:EFGrid blockId="detail" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="lv" cname="层级" defaultValue="2" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" hidden="true"/>
......
......@@ -40,7 +40,7 @@
<div id="right-pane" class="i-fit-height" style="width: 80%;float: right">
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="lv" cname="层级" hidden="true"/>
<EF:EFColumn enable="false" ename="pgStatus" hidden="true" cname="派工状态"/>
......
......@@ -15,7 +15,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
......
......@@ -14,7 +14,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<%-- <EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>--%>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
......
......@@ -26,7 +26,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="基本信息">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目号" readonly="true" hidden="true"/>
......@@ -53,7 +53,7 @@
<EF:EFRegion id="detail" title="明细信息">
<EF:EFGrid blockId="detail" autoDraw="no">
<EF:EFGrid blockId="detail" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" hidden="true"/>
......
......@@ -8,7 +8,7 @@
<EF:EFPage title="生产任务">
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
......
......@@ -27,7 +27,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="170" locked="true" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
......
......@@ -35,7 +35,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="任务ID" enable="false" width="80" align="center"/>
<EF:EFColumn ename="prodTaskNo" cname="任务单号" enable="false" hidden="true"/>
<EF:EFComboColumn ename="factoryCode" cname="厂区" width="110" align="center" defaultValue="" required="true"
......
......@@ -27,7 +27,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="childId" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="110" align="center"/>
......
......@@ -28,7 +28,7 @@
<EF:EFRegion id="result" title="生产任务集">
<EF:EFGrid blockId="result" autoDraw="no" height="30vh" checkMode="row,single" >
<EF:EFGrid blockId="result" autoDraw="no" height="30vh" checkMode="row,single" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目号" />
......
......@@ -32,7 +32,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn enable="false" ename="reqNum" cname="领料记录" width="80" align="center" readonly="true"/>
......
......@@ -43,7 +43,7 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFInput ename="productionOrderNo" type="hidden"/>
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="actualCompletionDate" editType="date" required="true" align="center" cname="完成日期" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" />
<EF:EFColumn ename="hpsc006Id" cname="生产下料ID" hidden="true"/>
......
......@@ -42,7 +42,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="120" align="center"/>
......
$(function () {
$("#QUERY").on("click", query);
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 30, 50, 100, 200],
},
columns: [{
field: "operator",
template: function (item) {
let auditStatus = item.repStatus;
let template = '';
if (auditStatus) {
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',1)" >审核</a>';
}
}
return template;
}
}],
loadComplete: function(grid) {
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
//let btnNode = $(this);
//禁用按钮
//btnNode.attr("disabled", true);
//saveResult(btnNode);
save();
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save') {
query();
}
},
onRowClick: function (e) {
},
}
}
});
let query = function () { resultGrid.dataSource.page(1);}
function check(id, auditStatus) {
const inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-repStatus", auditStatus);
EiCommunicator.send('HPXS006', 'check', inEiInfo, {
onSuccess(response) {
//NotificationUtil(response.msg);
message("审核成功");
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
},
{
async: false
}
);
}
/**
* 删除
*/
/*function deleteFunc() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPSC002A", "delete", true);
}
})
}*/
function save() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
for (let i = 0; i < rows.length; i++) {
if (rows[i]['repStatus']==1) {
message("勾选的第" + (i + 1) + "行已维修不允许修改!");
return;
}
if (isBlank(rows[i]['repDate'])) {
message("勾选的第" + (i + 1) + "行维修日期不能为空");
return;
}
if (isBlank(rows[i]['repCustomId'])) {
message("勾选的第" + (i + 1) + "行客户名称不能为空");
return;
}
if (isBlank(rows[i]['repUserId'])) {
message("勾选的第" + (i + 1) + "行维修人员不能为空");
return;
}
if (isBlank(rows[i]['repStatus'])) {
message("勾选的第" + (i + 1) + "行维修状态不能为空");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPXS006", "save", true);
}
})
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/3/25
Time: 16:17
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ 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 cname="维修日期" ename="repDate" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="维修单号" ename="inqu_status-0-repOrderNo" colWidth="3"/>
<EF:EFSelect cname="客户名称" ename="inqu_status-0-repCustomId" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="维修人员" ename="inqu_status-0-repUserId" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="rep_user_id_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="repStatus" cname="维修状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpxs.repStatus"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" primaryKey="true" cname="主键" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="公司编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="repDate" cname="维修日期" width="100" align="center" editType="date" readonly="false"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="repOrderNo" cname="维修单号" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="repCustomId" cname="客户名称" width="120" align="center" required="true"
blockName="customer_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="repUserId" cname="维修人员" blockName="rep_user_id_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="160" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFComboColumn ename="repStatus" cname="维修状态" width="80" align="center" readonly="true" required="true" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpxs.repStatus"/>
</EF:EFComboColumn>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="150" readonly="true" required="false" enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="150" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="修改人" ename="updatedName" align="center" width="150" readonly="true" required="false" enable="false"/>
<EF:EFColumn cname="修改时间" ename="updatedTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="150" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......@@ -19,7 +19,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
......
......@@ -21,7 +21,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="生产订单ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="childId" cname="生产任务ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
......
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