Commit 067be312 by liuyang

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

parents bbf613bb 8d26570c
...@@ -49,11 +49,6 @@ public class ServiceHPMT001 extends ServiceBase { ...@@ -49,11 +49,6 @@ public class ServiceHPMT001 extends ServiceBase {
try { try {
String queryMonth = inInfo.getString("queryMonth"); String queryMonth = inInfo.getString("queryMonth");
String companyCode = UserSessionUtils.getCompanyCode(); String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap(); Map sqlMap = new HashMap();
sqlMap.put("queryMonth", queryMonth); sqlMap.put("queryMonth", queryMonth);
sqlMap.put("companyCode", companyCode); sqlMap.put("companyCode", companyCode);
...@@ -156,11 +151,6 @@ public class ServiceHPMT001 extends ServiceBase { ...@@ -156,11 +151,6 @@ public class ServiceHPMT001 extends ServiceBase {
try { try {
String queryMonth = inInfo.getString("queryMonth"); String queryMonth = inInfo.getString("queryMonth");
String companyCode = UserSessionUtils.getCompanyCode(); String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap(); Map sqlMap = new HashMap();
sqlMap.put("queryMonth", queryMonth); sqlMap.put("queryMonth", queryMonth);
sqlMap.put("companyCode", companyCode); sqlMap.put("companyCode", companyCode);
......
...@@ -13,6 +13,7 @@ import com.baosight.hpjx.hp.constant.HPSqlConstant; ...@@ -13,6 +13,7 @@ import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.mt.untils.Base64ToMultipartFile; import com.baosight.hpjx.hp.mt.untils.Base64ToMultipartFile;
import com.baosight.hpjx.hp.mt.untils.Base64Utils; import com.baosight.hpjx.hp.mt.untils.Base64Utils;
import com.baosight.hpjx.hp.mt.untils.UploadUtils; import com.baosight.hpjx.hp.mt.untils.UploadUtils;
import com.baosight.hpjx.hp.mt.untils.UploadUtils2;
import com.baosight.hpjx.hp.sc.domain.HPSC002A; import com.baosight.hpjx.hp.sc.domain.HPSC002A;
import com.baosight.hpjx.hp.sc.domain.HPSC005; import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.xs.domain.User; import com.baosight.hpjx.hp.xs.domain.User;
...@@ -72,11 +73,6 @@ public class ServiceHPMT002 extends ServiceBase { ...@@ -72,11 +73,6 @@ public class ServiceHPMT002 extends ServiceBase {
int offset = inInfo.getInt("offset");//当前页 int offset = inInfo.getInt("offset");//当前页
int pageSize = inInfo.getInt("pageSize");//每页条数 int pageSize = inInfo.getInt("pageSize");//每页条数
String companyCode = UserSessionUtils.getCompanyCode(); String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap(); Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode); sqlMap.put("companyCode", companyCode);
sqlMap.put("projName", projName); sqlMap.put("projName", projName);
...@@ -114,11 +110,6 @@ public class ServiceHPMT002 extends ServiceBase { ...@@ -114,11 +110,6 @@ public class ServiceHPMT002 extends ServiceBase {
try { try {
String projName = inInfo.getString("projName"); String projName = inInfo.getString("projName");
String companyCode = UserSessionUtils.getCompanyCode(); String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap(); Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode); sqlMap.put("companyCode", companyCode);
sqlMap.put("projName", projName); sqlMap.put("projName", projName);
...@@ -145,11 +136,6 @@ public class ServiceHPMT002 extends ServiceBase { ...@@ -145,11 +136,6 @@ public class ServiceHPMT002 extends ServiceBase {
try { try {
String queryMonth = inInfo.getString("queryMonth"); String queryMonth = inInfo.getString("queryMonth");
String companyCode = UserSessionUtils.getCompanyCode(); String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap(); Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode); sqlMap.put("companyCode", companyCode);
sqlMap.put("queryMonth", queryMonth); sqlMap.put("queryMonth", queryMonth);
...@@ -179,11 +165,6 @@ public class ServiceHPMT002 extends ServiceBase { ...@@ -179,11 +165,6 @@ public class ServiceHPMT002 extends ServiceBase {
int offset = inInfo.getInt("offset");//当前页 int offset = inInfo.getInt("offset");//当前页
int pageSize = inInfo.getInt("pageSize");//每页条数 int pageSize = inInfo.getInt("pageSize");//每页条数
String companyCode = UserSessionUtils.getCompanyCode(); String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap(); Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode); sqlMap.put("companyCode", companyCode);
sqlMap.put("projName", projName); sqlMap.put("projName", projName);
...@@ -217,11 +198,6 @@ public class ServiceHPMT002 extends ServiceBase { ...@@ -217,11 +198,6 @@ public class ServiceHPMT002 extends ServiceBase {
try { try {
String id = inInfo.getString("id"); String id = inInfo.getString("id");
String companyCode = UserSessionUtils.getCompanyCode(); String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
String ROOT_PATH= ""; String ROOT_PATH= "";
Map hashMap = new HashMap(); Map hashMap = new HashMap();
hashMap.put("fkey","docRootDir"); hashMap.put("fkey","docRootDir");
...@@ -296,11 +272,6 @@ public class ServiceHPMT002 extends ServiceBase { ...@@ -296,11 +272,6 @@ public class ServiceHPMT002 extends ServiceBase {
String inventCode = inInfo.getString("inventCode");//部件id String inventCode = inInfo.getString("inventCode");//部件id
String subInventCode = inInfo.getString("subInventCode");//零件id String subInventCode = inInfo.getString("subInventCode");//零件id
String companyCode = UserSessionUtils.getCompanyCode(); String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap(); Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode); sqlMap.put("companyCode", companyCode);
sqlMap.put("factoryCode", factoryId); sqlMap.put("factoryCode", factoryId);
...@@ -317,7 +288,7 @@ public class ServiceHPMT002 extends ServiceBase { ...@@ -317,7 +288,7 @@ public class ServiceHPMT002 extends ServiceBase {
List<Map> queryPartCode = this.dao.query("HPMT002.queryPartCode", sqlMap); List<Map> queryPartCode = this.dao.query("HPMT002.queryPartCode", sqlMap);
List<Map> queryTedcm01 = this.dao.query("HPXSOrg.queryTedcm01",tedcm01); List<Map> queryTedcm01 = this.dao.query("HPXSOrg.queryTedcm01",tedcm01);
if(subInventCode!=null&&!subInventCode.equals("")){ if(subInventCode!=null&&!subInventCode.equals("")){
List<Map> queryProdTaskNo = this.dao.query("HPMT002.queryProdTaskNo"); List<Map> queryProdTaskNo = this.dao.query("HPMT002.queryProdTaskNo",sqlMap);
resultMap.put("ProdTaskNo",queryProdTaskNo); resultMap.put("ProdTaskNo",queryProdTaskNo);
} }
resultMap.put("Factory",queryFactory); resultMap.put("Factory",queryFactory);
...@@ -347,11 +318,6 @@ public class ServiceHPMT002 extends ServiceBase { ...@@ -347,11 +318,6 @@ public class ServiceHPMT002 extends ServiceBase {
try { try {
String docId = inInfo.getString("docId"); String docId = inInfo.getString("docId");
String companyCode = UserSessionUtils.getCompanyCode(); String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message", "票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
HPZL001 fZl001 = new HPZL001(); HPZL001 fZl001 = new HPZL001();
Map attr = inInfo.getAttr(); Map attr = inInfo.getAttr();
fZl001.fromMap(attr); fZl001.fromMap(attr);
...@@ -411,11 +377,6 @@ public class ServiceHPMT002 extends ServiceBase { ...@@ -411,11 +377,6 @@ public class ServiceHPMT002 extends ServiceBase {
try { try {
String docId = inInfo.getString("docId"); String docId = inInfo.getString("docId");
String companyCode = UserSessionUtils.getCompanyCode(); String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message", "票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
HPZL001 fZl001 = new HPZL001(); HPZL001 fZl001 = new HPZL001();
Map attr = inInfo.getAttr(); Map attr = inInfo.getAttr();
fZl001.fromMap(attr); fZl001.fromMap(attr);
...@@ -464,15 +425,9 @@ public class ServiceHPMT002 extends ServiceBase { ...@@ -464,15 +425,9 @@ public class ServiceHPMT002 extends ServiceBase {
Map resultMap = new HashMap(); Map resultMap = new HashMap();
try { try {
String files = inInfo.getString("files"); String files = inInfo.getString("files");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message", "票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
CommonsMultipartFile multipartFile = Base64ToMultipartFile.base64toMultipartFile(files); CommonsMultipartFile multipartFile = Base64ToMultipartFile.base64toMultipartFile(files);
System.out.println("--------------------------------转换Base64成功"); System.out.println("--------------------------------转换Base64成功");
JSONObject upload = UploadUtils.upload(multipartFile); JSONObject upload = UploadUtils2.upload(multipartFile);
resultMap.put("id",upload.getString("docId")); resultMap.put("id",upload.getString("docId"));
resultMap.put("status", EiConstant.STATUS_SUCCESS); resultMap.put("status", EiConstant.STATUS_SUCCESS);
resultMap.put("message", "SUCCESS"); resultMap.put("message", "SUCCESS");
......
...@@ -139,7 +139,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -139,7 +139,7 @@ public class ServiceHPSC002 extends ServiceBase {
BigDecimal num = hpsc002.getNum(); BigDecimal num = hpsc002.getNum();
BigDecimal unitWt = hpsc002.getUnitWt(); BigDecimal unitWt = hpsc002.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue()))); BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()));
hpsc002.setDelStatus(CommonConstant.YesNo.NO_0.intValue()); hpsc002.setDelStatus(CommonConstant.YesNo.NO_0.intValue());
hpsc002.setTotalWt(totalWt); hpsc002.setTotalWt(totalWt);
...@@ -293,7 +293,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -293,7 +293,7 @@ public class ServiceHPSC002 extends ServiceBase {
BigDecimal num = hppz002.getNum(); BigDecimal num = hppz002.getNum();
BigDecimal unitWt = hppz002.getUnitWt(); BigDecimal unitWt = hppz002.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue()))); BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()));
hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue()); hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue());
hppz002.setTotalWt(totalWt); hppz002.setTotalWt(totalWt);
...@@ -443,7 +443,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -443,7 +443,7 @@ public class ServiceHPSC002 extends ServiceBase {
BigDecimal num = hppz002.getNum(); BigDecimal num = hppz002.getNum();
BigDecimal unitWt = hppz002.getUnitWt(); BigDecimal unitWt = hppz002.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue()))); BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()));
hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue()); hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue());
hppz002.setTotalWt(totalWt); hppz002.setTotalWt(totalWt);
hppz002.setSpec(HPPZTools.HpPz006.jointSpec(hppz002.getLength(),hppz002.getWidth(),hppz002.getThick())); hppz002.setSpec(HPPZTools.HpPz006.jointSpec(hppz002.getLength(),hppz002.getWidth(),hppz002.getThick()));
......
...@@ -126,7 +126,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -126,7 +126,7 @@ public class ServiceHPSC006 extends ServiceBase {
BigDecimal num = HPSC006.getNum(); BigDecimal num = HPSC006.getNum();
BigDecimal unitWt = HPSC006.getUnitWt(); BigDecimal unitWt = HPSC006.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue()))); BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()));
HPSC006.setInventSpec(HPPZTools.HpPz006.jointSpec(HPSC006.getInventLength(),HPSC006.getInventWidth(),HPSC006.getInventThick())); HPSC006.setInventSpec(HPPZTools.HpPz006.jointSpec(HPSC006.getInventLength(),HPSC006.getInventWidth(),HPSC006.getInventThick()));
HPSC006.setProjCode(projCode); HPSC006.setProjCode(projCode);
HPSC006.setProjName(projName); HPSC006.setProjName(projName);
...@@ -183,7 +183,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -183,7 +183,7 @@ public class ServiceHPSC006 extends ServiceBase {
BigDecimal num = HPSC006.getNum(); BigDecimal num = HPSC006.getNum();
BigDecimal unitWt = HPSC006.getUnitWt(); BigDecimal unitWt = HPSC006.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue()))); BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()));
HPSC006.setInventSpec(HPPZTools.HpPz006.jointSpec(HPSC006.getInventLength(),HPSC006.getInventWidth(),HPSC006.getInventThick())); HPSC006.setInventSpec(HPPZTools.HpPz006.jointSpec(HPSC006.getInventLength(),HPSC006.getInventWidth(),HPSC006.getInventThick()));
HPSC006.setProjCode(projCode); HPSC006.setProjCode(projCode);
HPSC006.setProjName(projName); HPSC006.setProjName(projName);
......
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