Commit 7fed8a5a by wancheng

生产入库弹出框列表如果有质检问题,新增列头(质检单号)可以点击跳转

parent c83eb438
......@@ -15,6 +15,7 @@ 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.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
......@@ -71,12 +72,34 @@ public class ServiceHPBI001 extends ServiceBase {
outInfo = super.query(inInfo,"HPBI001.querySum",new HPBI001());
//每日数据
List mrsj= super.dao.query("HPBI001.queryDay", params);
//生产月报
List scyb= super.dao.query("HPBI001.queryMon", params);
outInfo.set("mrsj",mrsj);
outInfo.set("scyb",scyb);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return outInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
public EiInfo queryCompanyCode(EiInfo inInfo) {
EiInfo outInfo = new EiInfo();
try {
Map params = new HashMap();
params.put("loginName", UserSession.getUserId());
//params.put("loginName", "QY000019");
//汇总数据
List company_code = super.dao.query("HPBI001.queryCompanyCode",params);
outInfo.set("company_code",company_code.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return outInfo;
}
}
......@@ -115,4 +115,70 @@
</dynamic>
</select>
<select id="queryMon" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT
INDCODE,
SERIES,
X,
VAULE
FROM (
select 'sccl' as INDCODE, '生产产量(吨)' as SERIES,'1月' as X,100 as VAULE from dual
union all
select 'scrs' as INDCODE, '生产人数(个)' as SERIES,'1月' as X,100 as VAULE from dual
union all
select 'rjcl' as INDCODE, '人均产量(kg)' as SERIES,'1月' as X,100 as VAULE from dual
union all
select 'sccl' as INDCODE, '生产产量(吨)' as SERIES,'2月' as X,110 as VAULE from dual
union all
select 'scrs' as INDCODE, '生产人数(个)' as SERIES,'2月' as X,110 as VAULE from dual
union all
select 'rjcl' as INDCODE, '人均产量(kg)' as SERIES,'2月' as X,110 as VAULE from dual
union all
select 'sccl' as INDCODE, '生产产量(吨)' as SERIES,'3月' as X,120 as VAULE from dual
union all
select 'scrs' as INDCODE, '生产人数(个)' as SERIES,'3月' as X,120 as VAULE from dual
union all
select 'rjcl' as INDCODE, '人均产量(kg)' as SERIES,'3月' as X,120 as VAULE from dual
union all
select 'sccl' as INDCODE, '生产产量(吨)' as SERIES,'4月' as X,130 as VAULE from dual
union all
select 'scrs' as INDCODE, '生产人数(个)' as SERIES,'4月' as X,130 as VAULE from dual
union all
select 'rjcl' as INDCODE, '人均产量(kg)' as SERIES,'4月' as X,130 as VAULE from dual
union all
select 'sccl' as INDCODE, '生产产量(吨)' as SERIES,'5月' as X,140 as VAULE from dual
union all
select 'scrs' as INDCODE, '生产人数(个)' as SERIES,'5月' as X,140 as VAULE from dual
union all
select 'rjcl' as INDCODE, '人均产量(kg)' as SERIES,'5月' as X,140 as VAULE from dual
union all
select 'sccl' as INDCODE, '生产产量(吨)' as SERIES,'6月' as X,150 as VAULE from dual
union all
select 'scrs' as INDCODE, '生产人数(个)' as SERIES,'6月' as X,150 as VAULE from dual
union all
select 'rjcl' as INDCODE, '人均产量(kg)' as SERIES,'6月' as X,150 as VAULE from dual
) A
WHERE 1=1
<!-- <isNotEmpty prepend=" AND " property="factory">
FACTORY LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="date">
DATE = #date#
</isNotEmpty>-->
<dynamic prepend="ORDER BY">
<isEmpty property="orderBy">
X asc
</isEmpty>
</dynamic>
</select>
<select id="queryCompanyCode" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
select COMPANY_CODE from iplat.XS_USER where 1=1
<isNotEmpty prepend=" AND " property="loginName">
LOGIN_NAME = #loginName#
</isNotEmpty>
</select>
</sqlMap>
\ No newline at end of file
......@@ -185,4 +185,19 @@ public class ServiceHPPZ011 extends ServiceBase {
return inInfo;
}
/**
* @param inInfo
* @return
*/
public EiInfo queryGroupComboBox(EiInfo inInfo) {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.GROUP_RECORD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, new HashMap<>(), false);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询组失败");
}
return inInfo;
}
}
......@@ -28,11 +28,15 @@ public class HPSC005B extends HPSC005 {
public static final String FIELD_PROD_ORDER_NO = "prodOrderNo";
public static final String FIELD_COMPLETE_NUM = "completeNum"; /* 已完成数量*/
public static final String FIELD_ZL_PROD_TASK_NO = "zlprodTaskNo"; /* 质检单任务号*/
public static final String COL_CHILD_ID = "CHILD_ID";
public static final String COL_PROD_TASK_NO = "PROD_TASK_NO";
public static final String COL_PROD_ORDER_NO = "PROD_ORDER_NO";
public static final String COL_COMPLETE_NUM = "COMPLETE_NUM"; /* 已完成数量*/
public static final String COL_ZL_PROD_TASK_NO = "ZL_PROD_TASK_NO"; /* 质检单任务号*/
public static final String QUERY = "HPSC005B.query";
public static final String COUNT = "HPSC005B.count";
public static final String INSERT = "HPSC005B.insert";
......@@ -44,6 +48,7 @@ public class HPSC005B extends HPSC005 {
private String prodOrderNo = " ";
private BigDecimal completeNum = new BigDecimal(0.000); /* 已完成数量*/
private String zlprodTaskNo = " ";
/**
* the constructor.
*/
......@@ -76,6 +81,10 @@ public class HPSC005B extends HPSC005 {
eiColumn.setFieldLength(15);
eiColumn.setDescName("已完成数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ZL_PROD_TASK_NO);
eiColumn.setDescName("质检单任务号");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -128,6 +137,14 @@ public class HPSC005B extends HPSC005 {
public void setCompleteNum(BigDecimal completeNum) {
this.completeNum = completeNum;
}
public String getZlProdTaskNo() {
return zlprodTaskNo;
}
public void setZlProdTaskNo(String zlprodTaskNo) {
this.zlprodTaskNo = zlprodTaskNo;
}
/**
* get the value from Map.
*
......@@ -140,6 +157,7 @@ public class HPSC005B extends HPSC005 {
setProdTaskNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_TASK_NO)), prodTaskNo));
setProdOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_ORDER_NO)), prodOrderNo));
setCompleteNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COMPLETE_NUM)), completeNum));
setZlProdTaskNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ZL_PROD_TASK_NO)), zlprodTaskNo));
}
/**
......@@ -153,7 +171,7 @@ public class HPSC005B extends HPSC005 {
map.put(FIELD_PROD_TASK_NO, StringUtils.toString(prodTaskNo, eiMetadata.getMeta(FIELD_PROD_TASK_NO)));
map.put(FIELD_PROD_ORDER_NO, StringUtils.toString(prodOrderNo, eiMetadata.getMeta(FIELD_PROD_ORDER_NO)));
map.put(FIELD_COMPLETE_NUM, StringUtils.toString(completeNum, eiMetadata.getMeta(FIELD_COMPLETE_NUM)));
map.put(FIELD_ZL_PROD_TASK_NO, StringUtils.toString(zlprodTaskNo, eiMetadata.getMeta(FIELD_ZL_PROD_TASK_NO)));
return map;
}
}
......@@ -321,7 +321,7 @@
(CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.ORG_NO ELSE A.ORG_NO END) AS "orgNo",
(CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.ORG_NAME ELSE A.ORG_NAME END) AS "orgName"
FROM HPJX.T_HPSC005 A
LEFT JOIN HPJX.T_HPSC005A B ON A.PRODUCTION_ORDER_NO = B.PRODUCTION_ORDER_NO
LEFT JOIN HPJX.T_HPSC005A B ON A.PRODUCTION_ORDER_NO = B.PROD_ORDER_NO
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
......
......@@ -32,7 +32,8 @@
B.FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
B.FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
B.ORG_NO as "orgNo",
B.ORG_NAME as "orgName"
B.ORG_NAME as "orgName",
C.PROD_TASK_NO as "zlprodTaskNo"
</sql>
<sql id="condition">
......@@ -112,6 +113,9 @@
<include refid="column"/>
FROM HPJX.T_HPSC005 A
INNER JOIN HPJX.T_HPSC005A B ON A.PRODUCTION_ORDER_NO = B.PROD_ORDER_NO
LEFT JOIN ( SELECT
DISTINCT PROD_TASK_NO
FROM HPJX.T_HPZL001 WHERE 1=1 AND DELETE_FLAG = 0 AND STATUS = 0) C ON B.PROD_TASK_NO = C.PROD_TASK_NO
WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
......
......@@ -17,6 +17,7 @@ $(function () {
onSuccess: function(response){
$('#mrsj').empty();
var mrsj = response.get('mrsj');
var scyb = response.get('scyb');
$.each(mrsj, function(index, item) {
str =
'<tr>' +
......@@ -25,7 +26,7 @@ $(function () {
'</tr>';
$('#mrsj').append(str);
})
buildOption("scrb");
buildOption("scrb",scyb);
resultGrid.dataSource.page(1);
},
// 服务调用失败后的回调函数 onFail
......@@ -67,7 +68,21 @@ function check(id, auditStatus) {
);
}
function buildOption(vid){
function buildOption(vid,data){
var x_data = [];
var y_data1 = [];
var y_data2 = [];
var y_data3 = [];
$.each(data, function(index, item) {
if(item.INDCODE == 'sccl'){
x_data.push(item.X);
y_data1.push(item.VAULE);
}else if(item.INDCODE == 'scrs'){
y_data2.push(item.VAULE);
}else if(item.INDCODE == 'rjcl'){
y_data3.push(item.VAULE);
}
})
var myChart = echarts.init(document.getElementById(vid));
var colors = ['#5470C6', '#91CC75', '#EE6666'];
var option = {
......@@ -90,7 +105,7 @@ function buildOption(vid){
xAxis: {
type: 'category',
//boundaryGap: false,
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
data: x_data/*['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']*/
},
yAxis: [
{
......@@ -111,7 +126,7 @@ function buildOption(vid){
color: '#4874CB',
yAxisIndex: 0,
barWidth: 15,
data: [120, 200, 150, 80, 70, 110, 130,120, 200, 150, 80, 70]
data: y_data1/*[120, 200, 150, 80, 70, 110, 130,120, 200, 150, 80, 70]*/
},
{
name: '生产人数(吨)',
......@@ -119,14 +134,14 @@ function buildOption(vid){
color: '#EE822F',
yAxisIndex: 0,
barWidth: 15,
data: [130, 120, 200, 160, 80, 70, 140,130, 120, 200, 160, 80]
data: y_data2/*[130, 120, 200, 160, 80, 70, 140,130, 120, 200, 160, 80]*/
},
{
name: '人均产量(kg)',
type: 'line',
color:'#F2BA03',
yAxisIndex: 1, // 指定该系列在y轴上的位置,默认是0,可选为:0 | 1 | 2 | ... | n (正整数)
data: [130, 120, 200, 160, 80, 70, 140,130, 120, 200, 160, 80]
data: y_data3/*[130, 120, 200, 160, 80, 70, 140,130, 120, 200, 160, 80]*/
}
]
};
......
......@@ -10,11 +10,17 @@ $(function () {
field: "operator",
template: function (item) {
let filePath1 = item.filePath1;
let zlprodTaskNo = item.zlprodTaskNo;
let prodTaskNo = item.prodTaskNo;
let template = '';
if (filePath1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件</a>&nbsp;';
}
if (zlprodTaskNo) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showZlDetail(\'' + prodTaskNo + '\')" >质检单</a>&nbsp;';
}
return template
}
}]
......@@ -55,3 +61,7 @@ function showUploadFile(id) {
height: "80%",
});
}
function showZlDetail(prodTaskNo) {
window.open("HPZL001?methodName=initLoad&inqu_status-0-prodTaskNo=" + prodTaskNo)
}
\ No newline at end of file
......@@ -24,7 +24,7 @@
<EF:EFGrid blockId="result" autoDraw="override">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="childId" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="110" align="center"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="150" align="center"/>
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" 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