Commit f01f71f7 by liulei

优化下料登记、APP上传

parent 34afa6af
......@@ -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">
......
......@@ -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;
......@@ -183,6 +184,13 @@ public class ServiceHPMT002 extends ServiceBase {
if (StrUtil.isEmpty(companyCode)) {
outInfo.setMsg("账号异常");
}
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);
Map.put("docType",1);
......@@ -194,7 +202,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 +219,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);
......
......@@ -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;
......@@ -116,7 +117,9 @@ 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);
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;
......@@ -32,10 +33,16 @@ public class UploadUtils2 {
String docName = multipartFile.getOriginalFilename();
Long docSize = multipartFile.getSize();
HashMap<String, String> inMap = new HashMap();
Map<String, String> returnMap = null;
String configPathDefine=null;
Map hashMap = new HashMap();
hashMap.put("fkey","docRootDir");
List<Map> query = DaoBase.getInstance().query("EDCC03.query",hashMap);
if (query.get(0).get("fvalue")!=null) {
configPathDefine= (String) query.get(0).get("fvalue");
}
returnMap = PlatFileUploadUtils.uploadFile(multipartFile, inMap);
inMap.put("configPathDefine", configPathDefine);
Map<String, String> returnMap = PlatFileUploadUtils.uploadFile(multipartFile, inMap);
String docId = (String)returnMap.get("docId");
String docUrl = (String)returnMap.get("docUrl");
docId = docId == null ? "" : docId;
......
......@@ -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