Commit 51b1512b by yukang

Merge remote-tracking branch 'origin/dev' into dev

parents 7c4a9a64 6a8e49bf
......@@ -115,7 +115,8 @@ public class HGSC007 extends DaoEPBase {
public static final String UPDATE = "HGSC007.update";
public static final String DELETE = "HGSC007.delete";
public static final String QUERY_SUM_WT = "HGSC007.querySumWt"; /*查询累计产量*/
public static final String QUERY_DAY_WT = "HGSC007.queryDayWt"; /*查询工序产量*/
public static final String QUERY_DAY_WT = "HGSC007.queryDayWt"; /*查询工序日产量*/
public static final String QUERY_MONTH_WT = "HGSC007.queryMonthWt"; /*查询工序月产量*/
public static final String QUERY_PROJ_CODE_WT = "HGSC007.queryProjCodeWt"; /*查询项目产量*/
private Long id = new Long(0);
......
......@@ -22,10 +22,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
......@@ -96,13 +93,12 @@ import java.util.Map;
if (CollectionUtils.isEmpty(orgs)) {
return new ArrayList<>();
}
for (Org org : orgs) {
List<Map> org1 = DaoBase.getInstance().query("HGXSOrg.queryFactoryComboBox",
new HashMap<String,Object>(){{
put(Org.FIELD_PARENT_ORG_ID,org.getOrgId());
}});
factoryCodes.addAll(org1);
for (Org org : orgs) {
Map<String,String> map = new HashMap<>();
map.put(Org.FIELD_ORG_ID,org.getFactoryCode());
map.put(Org.FIELD_ORG_CNAME,org.getFactoryName());
factoryCodes.add(map);
}
}catch (Exception e){
LogUtils.setDetailMsg(inInfo,e,"APP查询工厂失败");
......@@ -111,48 +107,109 @@ import java.util.Map;
}
/**
* app查询工序累计产量
*/
@OperationLogAnnotation(operModul = "生产任务", operType = "APP查询工序累计产量", operDesc = "APP查询工序累计产量")
public EiInfo getProcessSumWt(EiInfo inInfo) {
try {
EiBlock queryRow = inInfo.getBlock(EiConstant.queryBlock);
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
String companyCode = queryRow.getCellStr(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code);
if (StringUtils.isEmpty(companyCode)) {
queryRow.setCell(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code,userVO.getUsercode());
}
inInfo = super.query(inInfo,HGSC007.QUERY_SUM_WT);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* app查询工序产量
*/
@OperationLogAnnotation(operModul = "生产任务", operType = "APP查询产量", operDesc = "APP查询产量")
public Map<String,List> getWt(EiInfo inInfo) {
Map<String,List> map = new HashMap<>();
@OperationLogAnnotation(operModul = "生产任务", operType = "APP查询工序产量", operDesc = "APP查询工序产量")
public EiInfo getProcessWt(EiInfo inInfo) {
try {
EiBlock queryRow = inInfo.getBlock(EiConstant.queryBlock);
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
Object companyCode = queryRow.get(HGSC007.FIELD_company_code);
if (companyCode == null) {
queryRow.put(HGSC007.FIELD_company_code,userVO.getUsercode());
//queryRow.put(HGSC007.FIELD_company_name,userVO.getUsername());
String companyCode = queryRow.getCellStr(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code);
if (StringUtils.isEmpty(companyCode)) {
queryRow.setCell(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code,userVO.getUsercode());
}
List sumList = DaoBase.getInstance().query(HGSC007.QUERY_SUM_WT, queryRow);
List dayList = DaoBase.getInstance().query(HGSC007.QUERY_DAY_WT, queryRow);
map.put("sumList",sumList);
map.put("dayList",dayList);
inInfo = super.query(inInfo,HGSC007.QUERY_DAY_WT);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return map;
return inInfo;
}
/**
* app查询工序日产量
*/
@OperationLogAnnotation(operModul = "生产任务", operType = "APP查询工序日产量", operDesc = "APP查询工序日产量")
public EiInfo getProcessDayWt(EiInfo inInfo) {
try {
EiBlock queryRow = inInfo.getBlock(EiConstant.queryBlock);
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
String companyCode = queryRow.getCellStr(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code);
String endDate = queryRow.getCellStr(ACConstants.ROW_CODE_0,ACConstants.SQL_END_DATE);
if (StringUtils.isNotEmpty(endDate)) {
String startDate = DateUtil.dateSubStr(endDate,-7);
queryRow.setCell(ACConstants.ROW_CODE_0,ACConstants.SQL_START_DATE,startDate);
}
if (StringUtils.isEmpty(companyCode)) {
queryRow.setCell(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code,userVO.getUsercode());
}
inInfo = super.query(inInfo,HGSC007.QUERY_DAY_WT);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* app查询工序日产量
*/
@OperationLogAnnotation(operModul = "生产任务", operType = "APP查询工序日产量", operDesc = "APP查询工序日产量")
public EiInfo getProcessMonthWt(EiInfo inInfo) {
try {
EiBlock queryRow = inInfo.getBlock(EiConstant.queryBlock);
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
String companyCode = queryRow.getCellStr(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code);
String endDate = queryRow.getCellStr(ACConstants.ROW_CODE_0,ACConstants.SQL_END_DATE);
if (StringUtils.isNotEmpty(endDate)) {
String startDate = DateUtil.getMonthOfDays(endDate,-6,DateUtil.DATE8_PATTERN);
queryRow.setCell(ACConstants.ROW_CODE_0,ACConstants.SQL_START_DATE,startDate);
}
if (StringUtils.isEmpty(companyCode)) {
queryRow.setCell(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code,userVO.getUsercode());
}
inInfo = super.query(inInfo,HGSC007.QUERY_MONTH_WT);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* app查询工序产量
*/
@OperationLogAnnotation(operModul = "生产任务", operType = "APP查询项目产量", operDesc = "APP查询项目产量")
public List getProjCodeWt(EiInfo inInfo) {
List sumList = null;
public EiInfo getProjCodeWt(EiInfo inInfo) {
try {
EiBlock queryRow = inInfo.getBlock(EiConstant.queryBlock);
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
Object companyCode = queryRow.get(HGSC007.FIELD_company_code);
if (companyCode == null) {
queryRow.put(HGSC007.FIELD_company_code,userVO.getUsercode());
//queryRow.put(HGSC007.FIELD_company_name,userVO.getUsername());
//Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String companyCode = queryRow.getCellStr(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code);
if (StringUtils.isEmpty(companyCode)) {
queryRow.setCell(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code,userVO.getUsercode());
}
sumList = DaoBase.getInstance().query(HGSC007.QUERY_PROJ_CODE_WT, queryRow);
inInfo = super.query(inInfo,HGSC007.QUERY_PROJ_CODE_WT);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return sumList;
return inInfo;
}
}
......
......@@ -228,7 +228,9 @@
A.ORG_TYPE AS "orgType",
A.ACCOUNT_CODE AS "accounCcode",
A.FACTORY_CODE AS "factoryCode",
A.FACTORY_NAME AS "factoryName",
A.COMPANY_CODE AS "companyCode",
A.COMPANY_NAME AS "companyName",
A.PARENT_ORG_ID as "parentOrgId"
FROM ${platSchema}.TXSOG01 A, ${platSchema}.TXSOG02 B, ${platSchema}.XS_USER C
WHERE 1=1
......
......@@ -80,9 +80,13 @@ public class DateUtil {
* @return
*/
public static String getMonthOfDays(String date){
return getMonthOfDays(date, -1,DATE10_PATTERN);
}
public static String getMonthOfDays(String date,int month,String pattern){
Calendar calendar = Calendar.getInstance();//日历对象
calendar.setTime(Objects.requireNonNull(DateUtil.toDate(date, DATE10_PATTERN)));//设置当前日期
calendar.add(Calendar.MONTH, -1);//月份减一
calendar.setTime(Objects.requireNonNull(DateUtil.toDate(date, pattern)));//设置当前日期
calendar.add(Calendar.MONTH, month);//月份减一
return DateUtil.toDateStr(calendar.getTime(),DATE8_PATTERN);//输出上个月的日期
}
......
......@@ -16,6 +16,8 @@ $(function () {
if (!isBlank(item.id)){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ')" >发货详情</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="showUploadFile(' + item.id + ')" >附件详情</a>';
/*if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',1)" >审核</a>';
......@@ -335,6 +337,21 @@ function commit() {
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HGSB099?methodName=initLoad&inqu_status-0-matId="+id+"&inqu_status-0-bizType=YX001",
title: "<div style='text-align: center;'>附件详情</div>",
width: "70%",
height: "50%",
//callbackName: uploadFileCallback
});
}
function windowCallback(ei) {
if (ei.getStatus() >= 0) {
// 刷新列表
......@@ -342,4 +359,4 @@ function windowCallback(ei) {
// 关闭弹窗
JSColorbox.close();
}
}
\ No newline at end of file
}
......@@ -44,7 +44,7 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" copyToAdd="false">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="companyCode" enable="true" cname="公司名称" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
......
......@@ -16,6 +16,8 @@ $(function () {
if (!isBlank(item.id)){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ')" >退货详情</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="showUploadFile(' + item.id + ')" >附件详情</a>';
/*if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',1)" >审核</a>';
......@@ -212,4 +214,18 @@ function windowCallback(ei) {
// 关闭弹窗
JSColorbox.close();
}
}
\ No newline at end of file
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HGSB099?methodName=initLoad&inqu_status-0-matId="+id+"&inqu_status-0-bizType=YX002",
title: "<div style='text-align: center;'>附件详情</div>",
width: "70%",
height: "50%",
//callbackName: uploadFileCallback
});
}
......@@ -31,7 +31,7 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" copyToAdd="false">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="projCode" enable="true" cname="项目名称" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField"/>
......
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