Commit 45ba1827 by liuyang

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

parents a0f136fe 319bb65c
......@@ -95,7 +95,7 @@
<select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC010">
SELECT <include refid="column"/>
FROM hpjx.T_HPKC010
WHERE 1=1
WHERE 1=1 AND AMOUNT!=0
<include refid="condition"/>
<include refid="customCondition"/>
<dynamic prepend="ORDER BY">
......
......@@ -44,11 +44,15 @@ public class ServiceHPMT001 extends ServiceBase {
* @param inInfo
* @return
*/
public EiInfo pmOverview(EiInfo inInfo) {
public Map pmOverview(EiInfo inInfo) {
Map resultMap = new HashMap();
try {
String queryMonth = inInfo.getString("queryMonth");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
inInfo.setMsg("账号异常");
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap();
sqlMap.put("queryMonth", queryMonth);
......@@ -56,9 +60,7 @@ public class ServiceHPMT001 extends ServiceBase {
List<Map> row1 = this.dao.query("HPMT001.pmOverview1", sqlMap);//目标
List<Map> row2 = this.dao.query("HPMT001.pmOverview2", sqlMap);//实际
List<Map> rows = new ArrayList<>();
Map resultMap = new HashMap();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMM");
try {
Date parse = sdf.parse(queryMonth);
Calendar instance = Calendar.getInstance();
instance.setTime(parse);
......@@ -132,15 +134,13 @@ public class ServiceHPMT001 extends ServiceBase {
resultMap.put("actualWt_h_yoy", actualWt.subtract(actualWt2).divide(actualWt2,BigDecimal.ROUND_UP).
multiply(new BigDecimal(100)).doubleValue());
}
rows.add(resultMap);
EiInfo outInfo = new EiInfo();
EiBlock eiBlock = new EiBlock(EiConstant.resultBlock);
eiBlock.setRows(rows);
outInfo.setBlock(eiBlock);
return outInfo;
} catch (ParseException e) {
e.printStackTrace();
return inInfo;
resultMap.put("status",EiConstant.STATUS_SUCCESS);
resultMap.put("message","SUCCESS");
return resultMap;
} catch (Exception e) {
resultMap.put("status", 500);
resultMap.put("message",LogUtils.getMsg(e));
return resultMap;
}
}
......@@ -151,24 +151,31 @@ public class ServiceHPMT001 extends ServiceBase {
* @param inInfo
* @return
*/
public EiInfo pmBenchmarking(EiInfo inInfo) {
public Map pmBenchmarking(EiInfo inInfo) {
Map resultMap = new HashMap();
try {
String queryMonth = inInfo.getString("queryMonth");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
inInfo.setMsg("账号异常");
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap();
sqlMap.put("queryMonth", queryMonth);
sqlMap.put("companyCode", companyCode);
List<Map> rows = this.dao.query("HPMT001.pmBenchmarking", sqlMap);
List<Map> rows2 = this.dao.query("HPMT001.pmBenchmarking2", sqlMap);
EiInfo outInfo = new EiInfo();
EiBlock eiBlock = new EiBlock(EiConstant.resultBlock);
eiBlock.setRows(rows);
outInfo.setBlock(eiBlock);
outInfo.set("cout",rows2);
return outInfo;
resultMap.put("result",rows);
resultMap.put("result2",rows2);
resultMap.put("status",EiConstant.STATUS_SUCCESS);
resultMap.put("message","SUCCESS");
return resultMap;
} catch (Exception e) {
resultMap.put("status", 500);
resultMap.put("message",LogUtils.getMsg(e));
return resultMap;
}
}
}
......@@ -4,6 +4,7 @@ import cn.hutool.core.util.PageUtil;
import cn.hutool.core.util.StrUtil;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
......@@ -64,13 +65,17 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @return
*/
public EiInfo pmProject(EiInfo inInfo) {
public Map pmProject(EiInfo inInfo) {
Map resultMap = new HashMap();
try {
String projName = inInfo.getString("projName");
int offset = inInfo.getInt("offset");//当前页
int pageSize = inInfo.getInt("pageSize");//每页条数
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
inInfo.setMsg("账号异常");
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
......@@ -86,12 +91,16 @@ public class ServiceHPMT002 extends ServiceBase {
maps.add(row);
}
}
EiInfo outInfo = new EiInfo();
EiBlock eiBlock = new EiBlock(EiConstant.resultBlock);
eiBlock.setRows(maps);
outInfo.setBlock(eiBlock);
outInfo.set("count",count.get(0));
return outInfo;
resultMap.put("result",maps);
resultMap.put("count",count.get(0));
resultMap.put("status",EiConstant.STATUS_SUCCESS);
resultMap.put("message","SUCCESS");
return resultMap;
} catch (Exception e) {
resultMap.put("status", 500);
resultMap.put("message",LogUtils.getMsg(e));
return resultMap;
}
}
/**
......@@ -100,18 +109,29 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @return
*/
public EiInfo pmProjectCount(EiInfo inInfo) {
public Map pmProjectCount(EiInfo inInfo) {
Map resultMap = new HashMap();
try {
String projName = inInfo.getString("projName");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
inInfo.setMsg("账号异常");
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
sqlMap.put("projName", projName);
int count = this.dao.count("HPMT002.pmProjectCount", sqlMap);
inInfo.set("count", count);
return inInfo;
resultMap.put("count",count);
resultMap.put("status",EiConstant.STATUS_SUCCESS);
resultMap.put("message","SUCCESS");
return resultMap;
} catch (Exception e) {
resultMap.put("status", 500);
resultMap.put("message",LogUtils.getMsg(e));
return resultMap;
}
}
/**
......@@ -120,20 +140,29 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @return
*/
public EiInfo pmQuality(EiInfo inInfo) {
public Map pmQuality(EiInfo inInfo) {
Map resultMap = new HashMap();
try {
String queryMonth = inInfo.getString("queryMonth");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
inInfo.setMsg("账号异常");
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
sqlMap.put("queryMonth", queryMonth);
List<Map> rows = this.dao.query("HPMT002.pmQuality", sqlMap);
EiInfo outInfo = new EiInfo();
EiBlock eiBlock = new EiBlock(EiConstant.resultBlock);
eiBlock.setRows(rows);
outInfo.setBlock(eiBlock);
return outInfo;
resultMap.put("result",rows);
resultMap.put("status",EiConstant.STATUS_SUCCESS);
resultMap.put("message","SUCCESS");
return resultMap;
} catch (Exception e) {
resultMap.put("status", 500);
resultMap.put("message",LogUtils.getMsg(e));
return resultMap;
}
}
/**
......@@ -142,14 +171,18 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @return
*/
public EiInfo pmQualityList(EiInfo inInfo) {
public Map pmQualityList(EiInfo inInfo) {
Map resultMap = new HashMap();
try {
String status = inInfo.getString("status");
String projName = inInfo.getString("projName");
int offset = inInfo.getInt("offset");//当前页
int pageSize = inInfo.getInt("pageSize");//每页条数
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
inInfo.setMsg("账号异常");
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
......@@ -160,12 +193,16 @@ public class ServiceHPMT002 extends ServiceBase {
sqlMap.put("offset", offset);
sqlMap.put("pageSize", pageSize);
List<Map> rows = this.dao.query("HPMT002.pmQualityList", sqlMap);
EiInfo outInfo = new EiInfo();
EiBlock eiBlock = new EiBlock(EiConstant.resultBlock);
eiBlock.setRows(rows);
outInfo.setBlock(eiBlock);
outInfo.set("count", count.get(0));
return outInfo;
resultMap.put("result",rows);
resultMap.put("count",count.get(0));
resultMap.put("status",EiConstant.STATUS_SUCCESS);
resultMap.put("message","SUCCESS");
return resultMap;
} catch (Exception e) {
resultMap.put("status", 500);
resultMap.put("message",LogUtils.getMsg(e));
return resultMap;
}
}
......@@ -175,13 +212,22 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @return
*/
public EiInfo pmQualityDetail(EiInfo inInfo) {
EiInfo outInfo = new EiInfo();
public Map pmQualityDetail(EiInfo inInfo) {
Map resultMap = new HashMap();
try {
String id = inInfo.getString("id");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
outInfo.setMsg("账号异常");
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
String ROOT_PATH= "";
Map hashMap = new HashMap();
hashMap.put("fkey","docRootDir");
List<Map> queryPath = DaoBase.getInstance().query("EDCC03.query",hashMap);
if (queryPath.get(0).get("fvalue")!=null) {
ROOT_PATH= (String) queryPath.get(0).get("fvalue");
}
Map Map = new HashMap();
Map.put("checkId", id);
......@@ -194,7 +240,7 @@ public class ServiceHPMT002 extends ServiceBase {
String docId = hpzl001A.getDocId();
dirId.put("docId", docId);
List<Map> query = this.dao.query("HPMT002.queryFile", dirId);
File file = new File(UploadUtils.ROOT_PATH + "/A/" + query.get(0).get("CHG_NAME"));
File file = new File(ROOT_PATH + "/A/" + query.get(0).get("CHG_NAME"));
BufferedImage bf = ImageIO.read(file);
String imgBase64 = UploadUtils.imageToBase64(bf);
imgList.add(imgBase64);
......@@ -211,7 +257,7 @@ public class ServiceHPMT002 extends ServiceBase {
String docId = hpzl001A.getDocId();
dirId.put("docId", docId);
List<Map> query = this.dao.query("HPMT002.queryFile", dirId);
File file = new File(UploadUtils.ROOT_PATH + "/A/" + query.get(0).get("CHG_NAME"));
File file = new File(ROOT_PATH+ "/A/" + query.get(0).get("CHG_NAME"));
BufferedImage bf = ImageIO.read(file);
String imgBase64 = UploadUtils.imageToBase64(bf);
imgList2.add(imgBase64);
......@@ -222,13 +268,17 @@ public class ServiceHPMT002 extends ServiceBase {
List<Map> rows = this.dao.query("HPMT002.pmQualityDetail", sqlMap);
EiBlock eiBlock = new EiBlock(EiConstant.resultBlock);
eiBlock.setRows(rows);
outInfo.setBlock(eiBlock);
outInfo.set("img",imgList);
outInfo.set("img2",imgList2);
} catch (Exception e){
outInfo.setMsg("账号异常");
resultMap.put("result",rows);
resultMap.put("img",imgList);
resultMap.put("img2",imgList2);
resultMap.put("status",EiConstant.STATUS_SUCCESS);
resultMap.put("message","SUCCESS");
return resultMap;
} catch (Exception e) {
resultMap.put("status", 500);
resultMap.put("message",LogUtils.getMsg(e));
return resultMap;
}
return outInfo;
}
/**
......@@ -237,7 +287,9 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @return
*/
public EiInfo pmQualityXl(EiInfo inInfo) {
public Map pmQualityXl(EiInfo inInfo) {
Map resultMap = new HashMap();
try {
String factoryId= inInfo.getString("factoryId");//工厂id
String prodCode = inInfo.getString("projCode");//项目id
String orgNo = inInfo.getString("orgNo");//生产组id
......@@ -245,7 +297,9 @@ public class ServiceHPMT002 extends ServiceBase {
String subInventCode = inInfo.getString("subInventCode");//零件id
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
inInfo.setMsg("账号异常");
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
......@@ -256,16 +310,30 @@ public class ServiceHPMT002 extends ServiceBase {
sqlMap.put("subInventCode", subInventCode);
EiInfo outInfo = new EiInfo();
TEDCM01 tedcm01 = new TEDCM01();
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.APP_MAP_BLOCK_FACTORY), null, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.APP_MAP_BLOCK_PROJCODE), sqlMap, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.APP_MAP_BLOCK_PRDTCODE), sqlMap, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.APP_MAP_BLOCK_ORG_NO), sqlMap, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.APP_MAP_BLOCK_PARTCODE), sqlMap, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.POOR_TYPE_BLOCK_ID), null, false);
List<Map> queryFactory = this.dao.query("HPMT002.queryFactory", sqlMap);
List<Map> queryProjCode = this.dao.query("HPMT002.queryProjCode", sqlMap);
List<Map> queryPrdtCode = this.dao.query("HPMT002.queryPrdtCode", sqlMap);
List<Map> queryOrgNo = this.dao.query("HPMT002.queryOrgNo", sqlMap);
List<Map> queryPartCode = this.dao.query("HPMT002.queryPartCode", sqlMap);
List<Map> queryTedcm01 = this.dao.query("HPXSOrg.queryTedcm01",tedcm01);
if(subInventCode!=null&&!subInventCode.equals("")){
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.APP_MAP_BLOCK_PRODTASKNO), sqlMap, false);
List<Map> queryProdTaskNo = this.dao.query("HPMT002.queryProdTaskNo");
resultMap.put("ProdTaskNo",queryProdTaskNo);
}
resultMap.put("Factory",queryFactory);
resultMap.put("ProjCode",queryProjCode);
resultMap.put("PrdtCode",queryPrdtCode);
resultMap.put("OrgNo",queryOrgNo);
resultMap.put("PartCode",queryPartCode);
resultMap.put("Tedcm01",queryTedcm01);
resultMap.put("status",EiConstant.STATUS_SUCCESS);
resultMap.put("message","SUCCESS");
return resultMap;
} catch (Exception e) {
resultMap.put("status", 500);
resultMap.put("message",LogUtils.getMsg(e));
return resultMap;
}
return outInfo;
}
/**
......@@ -274,13 +342,16 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @return
*/
public EiInfo pmInsertQuality(EiInfo inInfo) {
public Map pmInsertQuality(EiInfo inInfo) {
Map resultMap = new HashMap();
try {
String docId = inInfo.getString("docId");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
inInfo.setMsg("账号异常");
resultMap.put("status", 403);
resultMap.put("message", "票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
try {
HPZL001 fZl001 = new HPZL001();
Map attr = inInfo.getAttr();
fZl001.fromMap(attr);
......@@ -298,10 +369,10 @@ public class ServiceHPMT002 extends ServiceBase {
fZl001.setStatus(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPZL001.INSERT, fZl001);
//处理文件
if(!docId.equals("")) {
if (!docId.equals("")) {
Map fZl0012 = new HashMap();
fZl0012.put("checkNo", fZl001.getCheckNo());
List<HPZL001> HPZL001 =dao.query("HPZL001.query", fZl0012);
List<HPZL001> HPZL001 = dao.query("HPZL001.query", fZl0012);
//绑定文件
String[] docIds = docId.split(",");
int num = 0;
......@@ -317,28 +388,34 @@ public class ServiceHPMT002 extends ServiceBase {
num++;
}
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
resultMap.put("status", EiConstant.STATUS_SUCCESS);
resultMap.put("message", "SUCCESS");
return resultMap;
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
resultMap.put("status", 500);
resultMap.put("message", LogUtils.getMsg(e));
return resultMap;
}
return inInfo;
}
/**
* 生产管理-质量巡检处理
*
* @param inInfo
* @return
*/
public EiInfo pmModifyQuality(EiInfo inInfo) {
public Map pmModifyQuality(EiInfo inInfo) {
Map resultMap = new HashMap();
try {
String docId = inInfo.getString("docId");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
inInfo.setMsg("账号异常");
resultMap.put("status", 403);
resultMap.put("message", "票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
try {
HPZL001 fZl001 = new HPZL001();
Map attr = inInfo.getAttr();
fZl001.fromMap(attr);
......@@ -366,11 +443,14 @@ public class ServiceHPMT002 extends ServiceBase {
num++;
}
}
inInfo.setMsg("处理成功!");
resultMap.put("status", EiConstant.STATUS_SUCCESS);
resultMap.put("message", "SUCCESS");
return resultMap;
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "处理失败");
resultMap.put("status", 500);
resultMap.put("message", LogUtils.getMsg(e));
return resultMap;
}
return inInfo;
}
......@@ -380,23 +460,28 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @return
*/
public EiInfo pmUploadFile(EiInfo inInfo) {
public Map pmUploadFile(EiInfo inInfo) {
Map resultMap = new HashMap();
try {
String files = inInfo.getString("files");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
inInfo.setMsg("账号异常");
resultMap.put("status", 403);
resultMap.put("message", "票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
try {
CommonsMultipartFile multipartFile = Base64ToMultipartFile.base64toMultipartFile(files);
System.out.println("--------------------------------转换Base64成功");
JSONObject upload = UploadUtils.upload(multipartFile);
inInfo.set("id",upload.getString("docId"));
inInfo.setMsg("上传成功!");
}
catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "上传失败");
resultMap.put("id",upload.getString("docId"));
resultMap.put("status", EiConstant.STATUS_SUCCESS);
resultMap.put("message", "SUCCESS");
return resultMap;
} catch (Exception e) {
resultMap.put("status", 500);
resultMap.put("message", LogUtils.getMsg(e));
return resultMap;
}
return inInfo;
}
}
......@@ -312,7 +312,7 @@
<select id="queryFvalue" resultClass="java.util.HashMap">
SELECT FVALUE AS "fvalue" FROM iplat.TEDCC03 WHERE FKEY='docRootDir'
SELECT DISTINCT FVALUE AS "fvalue" FROM iplat.TEDCC03 WHERE FKEY='docRootDir'
</select>
......
package com.baosight.hpjx.hp.mt.untils;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.iplat4j.core.data.ibatis.dao.Dao;
import com.baosight.iplat4j.core.data.id.UUIDHexIdGenerator;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -44,10 +45,12 @@ public class UploadUtils {
filePath = multipartFile.getOriginalFilename();
Long docSize = multipartFile.getSize();
String chgName = transformFileName(filePath);
System.out.println("----------------------------------解析Path");
String attachmentName;
Map<String, String> pathMap = getRealPath("A");
msg = (String)pathMap.get("dirId");
category = (String)pathMap.get("path");
System.out.println("----------------------------------获取dirId成功");
checkInvalidPath(category);
File dir = new File(category);
if (!dir.exists()) {
......@@ -116,7 +119,10 @@ public class UploadUtils {
public static Map<String, String> getRealPath(String path) {
String postPath = preparePath(path);
String dirId = initPath(postPath);
List<Map> query = dao.query("HPMT002.queryFvalue");
Map hashMap = new HashMap();
hashMap.put("fkey","docRootDir");
List<Map> query = DaoBase.getInstance().query("EDCC03.query",hashMap);
System.out.println("----------------------------------获取path地址");
if (query.get(0).get("fvalue")!=null) {
ROOT_PATH= (String) query.get(0).get("fvalue");
}
......
package com.baosight.hpjx.hp.mt.untils;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.iplat4j.core.data.ibatis.dao.Dao;
import com.baosight.iplat4j.core.data.id.UUIDHexIdGenerator;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -13,17 +14,17 @@ import com.baosight.iplat4j.eu.dm.util.FileProcessUtils;
import com.baosight.iplat4j.eu.dm.util.IFileUploader;
import net.sf.json.JSONObject;
import org.apache.commons.codec.binary.Base64;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
public class UploadUtils2 {
private static Dao dao = (Dao)PlatApplicationContext.getApplicationContext().getBean("dao");
......@@ -32,10 +33,9 @@ public class UploadUtils2 {
String docName = multipartFile.getOriginalFilename();
Long docSize = multipartFile.getSize();
HashMap<String, String> inMap = new HashMap();
Map<String, String> returnMap = null;
returnMap = PlatFileUploadUtils.uploadFile(multipartFile, inMap);
inMap.put("groupId", "hk_file11");
inMap.put("configPathDefine", "A");
Map<String, String> returnMap = PlatFileUploadUtils.uploadFile(multipartFile, inMap);
String docId = (String)returnMap.get("docId");
String docUrl = (String)returnMap.get("docUrl");
docId = docId == null ? "" : docId;
......@@ -45,15 +45,13 @@ public class UploadUtils2 {
} else {
documentJSON.remove("docUrl");
}
documentJSON.put("groupId", returnMap.get("groupId") == null ? "" : returnMap.get("groupId"));
documentJSON.put("docName", docName);
documentJSON.put("docSize", docSize);
documentJSON.put("docType", docName.substring(docName.lastIndexOf(46)));
return documentJSON;
}
}
}
......@@ -96,7 +96,7 @@ public class ServiceHPPZ015 extends ServiceBase {
HPPZ015.setProjCode(hpsc001.getProjCode());
HPPZ015.setTemplateName(inInfo.getString("templateName"));
HPPZ015.setCreatedBy(UserSession.getUserId());
HPPZ015.setCompanyCode(UserSession.getUserId());
HPPZ015.setCompanyCode(UserSessionUtils.getCompanyCode());
HPPZ015.setCreatedName(UserSession.getUserId()+"-"+UserSession.getLoginCName());
HPPZ015.setCreatedTime(sdf.format(new Date()));
HPPZ015.setUpdatedBy(null);
......
......@@ -176,7 +176,7 @@
</select>
<!-- 查询组织信息 -->
<select id="queryTedcm01" resultClass="com.baosight.iplat4j.common.ed.domain.TEDCM01">
<select id="queryTedcm01" resultClass="java.util.HashMap">
SELECT
ITEM_CODE AS "itemCode",
ITEM_CNAME AS "itemCname"
......
......@@ -381,26 +381,8 @@ function checkIn(id) {
callbackName: checkInCallback
});
}
checkInCallback = function () {
var block = detailGrid.getEiBlock();
var result = resultGrid.getCheckedRows()
if (rows.length < 1) {
message("请选择数据");
return;
}
if (block != null) {
block.setRows([]);
detailGrid.setEiBlock(block);
}
var info = new EiInfo()
var productionOrderNo = result[0]['prodOrderNo'];
info.set("productionOrderNo",productionOrderNo);
EiCommunicator.send("HPSC006","queryDetail",info,{
onSuccess:function(ei){//返回结果集
detailGrid.setEiInfo(ei);
},onFail:function(ei){}
},{async:false});
checkInCallback = function (e) {
detailGrid.setEiInfo(e);
}
let selectStock = function (id) {
JSColorbox.open({
......
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