Commit f61cd2c2 authored by 刘学辉's avatar 刘学辉

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

# Conflicts:
#	topsun-xt/src/main/webapp/biz/topsun/sap/dull/sapDullDetail.js
parents e747f47b f539c2c1
......@@ -189,7 +189,7 @@
}
op=op||{};
//默认排除岗位
op=$.extend({excludePos:1},op);
op=$.extend({excludePos:0},op);
op.param = op.param || {};
var filter=op.filter||'';
var beforeChange=op.beforeChange;
......
......@@ -485,6 +485,10 @@ function doShowUpdatePerson(id) {
}
function initPersonDialog() {
var sequence = $("#sequence").val();
if (Public.isBlank(sequence)){
$("#sequence").val(1)
}
var _img=$('#showPersonPicture');
var _picturePath=$('#picturePath').val();
if (Public.isNotBlank(_picturePath)) {
......
......@@ -692,6 +692,7 @@ function businessJudgmentUnit() {
if ("fundNode" === getSubProcUnitId()){
UICtrl.enable("#bankn1");
UICtrl.enable("#zepTxt1");
UICtrl.setElRequiredFlag("#bankn1",true)
}
return true;
}
......
......@@ -37,20 +37,20 @@ var tableArray = [
{
display: "BP标识", name: "zepBptype", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {fieldName: "ZEP_BPTYPE"}
},
back: {
ZEP_BPTYPE: "zepBptype",
ZEP_BPTYPENAME: "zepBptypename"
}
},
}
// editor: {
// required: false, type: "select",
// data: {
// type: 'system',
// name: "dictionary",
// getParam: function (item) {
// return {fieldName: "ZEP_BPTYPE"}
// },
// back: {
// ZEP_BPTYPE: "zepBptype",
// ZEP_BPTYPENAME: "zepBptypename"
// }
// },
// }
},
{
display: "BP标识描述", name: "zepBptypename", width: 120, minwidth: 120, type: "string", align: "left",
......
......@@ -711,6 +711,7 @@ function businessJudgmentUnit() {
if ("fundNode" === getSubProcUnitId()){
UICtrl.enable("#bankn1");
UICtrl.enable("#zepTxt1");
UICtrl.setElRequiredFlag("#bankn1",true)
}
return true;
}
......
......@@ -723,6 +723,7 @@ function businessJudgmentUnit() {
if ("fundNode" === getSubProcUnitId()){
UICtrl.enable("#bankn1");
UICtrl.enable("#zepTxt1");
UICtrl.setElRequiredFlag("#bankn1",true)
}
return true;
}
......
......@@ -671,6 +671,7 @@ function businessJudgmentUnit() {
if ("fundNode" === getSubProcUnitId()){
UICtrl.enable("#bankn1");
UICtrl.enable("#zepTxt1");
UICtrl.setElRequiredFlag("#bankn1",true)
}
return true;
}
......
......@@ -105,7 +105,7 @@ function loadGrid() {
{
display: "库存地点", name: "lgobe", width: 200, minWidth: 60, type: "string", align: "left",
editor: {
required: true, type: "select",
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -132,7 +132,7 @@ function loadGrid() {
// }
},
{
display: "收货方", name: "wempf", width: 300, minWidth: 60, type: "string", align: "left",
display: "领料方", name: "wempf", width: 300, minWidth: 60, type: "string", align: "left",
editor: {
type: "text"
}
......
......@@ -29,6 +29,7 @@
<x:inputC name="kostlName" required="false" label="成本中心" labelCol="2" fieldCol="2" wrapper="select"/>
<x:hidden name="kostl"/>
<x:inputC name="aufnrName" required="false" label="内部订单" labelCol="2" fieldCol="2" wrapper="select"/>
<x:inputC name="message" required="false" label="预留/相关需求的编号" readonly="true" labelCol="2" fieldCol="2"/>
<x:hidden name="aufnr"/>
</div>
</div>
......
var gridManager = null, refreshFlag = false;
$(document).ready(function () {
initUI();
initGrid();
}
);
function initUI() {
UICtrl.initDefaultLayout();
}
function initGrid() {
var toolbarOptions = UICtrl.getDefaultToolbarOptions({
});
gridManager = UICtrl.grid('#anlngrid', {
columns: [
{
display: "工厂", name: "BUKRS", width: "80", align: "left", type: "string",
},
{
display: "资产编号", name: "ANLN1", width: "200", align: "left", type: "string",
},
{
display: "资产描述", name: "TXT50", width: "300", align: "left", type: "string",
},
],
dataAction: 'server',
url: web_app.name + '/sapPurchase/queryAnlanFromSap.ajax?',
parms: {werks: $("#werks").val()},
toolbar: toolbarOptions,
width: '99.8%',
height: 500,
pageSize: 20,
heightDiff: -4,
sortName: 'num',
sortOrder: 'asc',
checkbox: true,
usePager: false,
rownumbers: true,
enabledEdit: true,
fixedCellHeight: true,
selectRowButtonOnly: true,
enableObjectBag: true
}
);
UICtrl.setSearchAreaToggle(gridManager);
}
function reloadGrid() {
gridManager.loadData();
}
function query(obj) {
var param = $(obj).formToJSON();
UICtrl.gridSearch(gridManager, param);
}
function resetForm(obj) {
$(obj).formClean();
}
<%--采购申请--%>
<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<x:base include="layout,dialog,grid,tree,dateTime,combox,attachment,commonTree,comboDialog"/>
<script src='<c:url value="/biz/topsun/sap/purchase/purchaseAnln1Detail.js"/>' type="text/javascript"></script>
</head>
<body>
<div class="container-fluid">
<div position="center" title="">
<%--<x:title title="搜索" hideTable="queryMainForm" isHide="false"/>--%>
<form class="hg-form" method="post" action="" id="queryMainForm">
<div class="hg-form-row">
<x:hidden name="werks"/>
<x:inputC name="paramValue" label="查询条件" labelCol="2" fieldCol="4" required="false"/>
</div>
<x:searchButtons/>
</form>
</div>
<div id="anlngrid"></div>
</div>
</body>
\ No newline at end of file
var itemGridManager = null, pstyp = " ", fillinDate = "", bsart = "";
var itemGridManager,gridManager = null, pstyp = " ", fillinDate = "", bsart = "";
var isAllData = true;
$(function () {
initializeCommonUI();
bindEvent();
......@@ -119,6 +120,34 @@ function initItemGrid() {
}
}
);
$('#maingrid').on('click', function (e) {
var $clicked = $(e.target || e.srcElement);
if ($clicked.is('a.bindAnln1')) {// 绑定资产编号
var id =$clicked.data('id');
var werks =$clicked.data('werks');
UICtrl.showAjaxDialog({
title: '绑定',
height: 500,
width: 700,
url: web_app.name + '/sapPurchase/showBindAnln1.load?itemId='+id +"&werks="+werks,
ok: function(d){
var _self = this;
var rows = gridManager.getSelectedRows();
var anln1s = [];
var anln1 = "";
if (rows.length>0){
rows.forEach(row=>{
anln1s.push(row.ANLN1);
})
anln1 = anln1s.join(',');
}
initAddAnln1(anln1,id);
_self.close();
},
});
return false;
}
});
UICtrl.setSearchAreaToggle(itemGridManager);
}
......@@ -285,25 +314,23 @@ function getGridColumns() {
//财务部填写
if (typeof(getSubProcUnitId) =='function'&&"financeNode" == getSubProcUnitId()){
columns.push({
display: "资产编号", name: "anln1", width: "200", align: "left", type: "string",
editor: {
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {
fieldName: "ANLN1",
filterValue: '1000'
}
},
back: {
ANLN1: "anln1"
}
},
display: "操作", name: "bindAnln1", width: 150, minWidth: 60, type: "string", align: "left",
render: function (item) {
var html = [];
html.push('<a class="bindAnln1" href="javascript:void(0);"');
html.push(' data-id="', item.id, '"');
html.push(' data-werks="', item.werks, '"');
html.push(' data-name="', item.txz01, '">');
html.push('<i class="fa fa-location-arrow"></i>&nbsp;');
html.push('绑定资产编号');
html.push('</a>');
return html.join('');
}
},);
},)
}
columns.push({
display: "资产编号", name: "anln1", width: "500", align: "left", type: "string",
},);
columns.push({
display: "申请日期", name: "badat", width: "100", align: "left", type: "string",
editor: {required: false, type: "date"}
......@@ -317,27 +344,39 @@ function getGridColumns() {
//获取数据保存的参数
function getExtendedData(processAction) {
var handleResult=getHandleResult();
//回退、打回、转交时,不需要验证必填项是否已经填写;
if (processAction == ProcessAction.BACK
|| processAction == ProcessAction.REPLENISH
|| processAction == ProcessAction.TRANSMIT) {
|| processAction == ProcessAction.TRANSMIT || "2" == handleResult) {
//不验证
$('#submitForm').attr('check', true);
isAllData = false;
}
var extendedData = {};
var _grid = UICtrl.getGridManager('#maingrid');
if (_grid) {
var datas = DataUtil.getGridData({
gridManager: _grid,
isAllData: true
isAllData: isAllData
});
if (!datas) {
return false;
}
if (datas.length == 0 ){
if (isApplyProcUnit() && datas.length == 0 ){
Public.tip("采购项次不能为空");
return false;
}
var check = false;
datas.forEach(data=>{
if (Public.isBlank(data.anln1)){
check = true;
}
})
if ("financeNode" == getSubProcUnitId() && check){
Public.tip("请为每条明细绑定资产编号");
return false;
}
extendedData.sapPurchaseItems = Public.encodeJSONURI(datas);
}
return extendedData;
......@@ -361,7 +400,23 @@ function getGridData() {
var _grid = UICtrl.getGridManager('#maingrid');
var datas = DataUtil.getGridData({
gridManager: _grid,
isAllData: true
isAllData: isAllData
});
return datas;
}
function initAddAnln1(anln1,id){
var _maingrid = UICtrl.getGridManager('#maingrid');
if (_maingrid != null){
if (_maingrid.currentData != null){
var rows = _maingrid.currentData.Rows;
$.each(rows, function (i, row) {
if (id === row.id){
_maingrid.updateRow(row,{
anln1:anln1
})
}
});
}
}
}
......@@ -560,43 +560,59 @@ function getExtendedData(processAction) {
return extendedData;
}
function disableForm(formId,isDisabled) {
var attr="disable";
if(!isDisabled){
attr="enable";
}
$("form[id='"+formId+"'] :text").attr("disabled",isDisabled);
$("form[id='"+formId+"'] textarea").attr("disabled",isDisabled);
$("form[id='"+formId+"'] select").attr("disabled",isDisabled);
$("form[id='"+formId+"'] :radio").attr("disabled",isDisabled);
$("form[id='"+formId+"'] :checkbox").attr("disabled",isDisabled);
//禁用jquery easyui中的下拉选(使用input生成的combox)
$("#" + formId + " input[class='combobox-f combo-f']").each(function () {
if (this.id) {alert("input"+this.id);
$("#" + this.id).combobox(attr);
function checkConstraints(){
var buGroup = $("#buGroup").val();
var _grid = UICtrl.getGridManager('#sapSuppliersBuyerGrid');
if (_grid) {
var datas = DataUtil.getGridData({
gridManager: _grid,
isAllData: true
});
if (!datas) {
return false;
}
});
//禁用jquery easyui中的下拉选(使用select生成的combox)
$("#" + formId + " select[class='combobox-f combo-f']").each(function () {
if (this.id) {
alert(this.id);
$("#" + this.id).combobox(attr);
if (buGroup != "Z004" && datas.length == 0){
Public.tip("供应商采购组织信息必填");
return false;
}
});
//禁用jquery easyui中的日期组件dataBox
$("#" + formId + " input[class='datebox-f combo-f']").each(function () {
if (this.id) {
alert(this.id)
$("#" + this.id).datebox(attr);
}
if ("cashier" == getSubProcUnitId() || "finance" == getSubProcUnitId()){
//付款信息
var _grid = UICtrl.getGridManager('#sapSuppliersPayGrid');
if (_grid) {
var datas = DataUtil.getGridData({
gridManager: _grid,
isAllData: true
});
if (!datas) {
return false;
}
if (isApproveProcUnit() && datas.length == 0 && "2" != getHandleResult()){
Public.tip("供应商付款信息必填");
return false;
}
}
});
//银行信息
var _grid = UICtrl.getGridManager('#sapSuppliersBankGrid');
if (_grid) {
var datas = DataUtil.getGridData({
gridManager: _grid,
isAllData: true
});
if (!datas) {
return false;
}
if (isApproveProcUnit() && datas.length == 0 && "2" != getHandleResult()){
Public.tip("供应商银行银行信息必填");
return false;
}
}
}
return true;
}
function bindEvent(){
$('#land1Name').searchbox({
type: "system", name: "dictionary",
......
......@@ -41,7 +41,7 @@
<x:inputC name="billCode" label="申请单编号" labelCol="1" readonly="true" fieldCol="2"/>
<x:inputC name="personMemberName" label="申请人" readonly="true" labelCol="1" fieldCol="2"/>
<x:inputC name="deptName" label="申请部门" readonly="true" labelCol="1" fieldCol="2"/>
<x:inputC name="fillinDate" label="申请日期" readonly="true" wrapper="date" labelCol="1" fieldCol="2"/>
<x:inputC name="fillinDate" label="申请日期" readonly="true" wrapper="dateTime" labelCol="1" fieldCol="2"/>
</div>
</div>
......@@ -86,7 +86,7 @@
<!--x:selectC name="ktokk" label="供应商帐户组" labelCol="1" fieldCol="2" required="true" dictionary="buGroup"/-->
<x:inputC name="kunnr" label="客户编号" labelCol="1" fieldCol="2"/>
<%--<x:inputC name="vbund" label="贸易伙伴" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="stenr" label="税号" labelCol="1" fieldCol="2" required="true" maxLength="18"/>
<x:inputC name="stenr" label="税号" labelCol="1" fieldCol="2" required="false" maxLength="18"/>
<x:selectC name="sperr" label="中心记帐冻结" labelCol="1" fieldCol="2" dictionary="sperr"/>
<x:selectC name="sperm" label="集中设置的采购冻结" labelCol="2" fieldCol="1" dictionary="sperrB"/>
......@@ -96,11 +96,14 @@
<x:fileList bizCode="supplier" bizId="attbizId" id="supplierList" title="营业执照/开票资料" />
</div>
<div class="blank_div clearfix"></div>
<x:title title="供应商采购组织信息" name="group"/>
<div id="sapSuppliersBuyerGrid" style="margin: 2px;"></div>
<div id="cashierGrid">
<div class="blank_div clearfix"></div>
<x:title title="供应商付款信息" name="group"/>
<div id="sapSuppliersPayGrid" style="margin: 2px;"></div>
<div class="blank_div clearfix"></div>
<x:title title="供应商银行银行信息" name="group"/>
<div id="sapSuppliersBankGrid" style="margin: 2px;"></div>
</div>
</form>
......
......@@ -3,6 +3,7 @@ package com.huigou.topsun.sap.costCenter.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.huigou.context.Operator;
import com.huigou.context.OrgUnit;
import com.huigou.data.domain.query.QueryPageRequest;
import com.huigou.topsun.sap.costCenter.application.CostCenterApplication;
import com.huigou.topsun.sap.costCenter.domain.CostCenter;
import com.huigou.topsun.sap.costCenter.domain.query.CostCenterQueryRequest;
......@@ -187,6 +188,8 @@ public class CostCenterController extends CommonController {
//queryRequest.setKtext(param);
//queryRequest.setKostl(param);
queryRequest.setNowDate(new Date());
QueryPageRequest pageModel = queryRequest.getPageModel();
pageModel.setPageSize(1000);
Map<String, Object> map = costCenterApplication.slicedCostCenterList(queryRequest);
List<Map<String, String>> mapList = (List<Map<String, String>>) map.get("Rows");
if (CollectionUtil.isNotEmpty(mapList)){
......
......@@ -30,6 +30,7 @@ import com.huigou.topsun.sap.nonProdApply.domain.vo.ProdApplyFromSapVO;
import com.huigou.topsun.sap.nonProdApply.domain.vo.ProdApplyToSapVO;
import com.huigou.topsun.sap.nonProdApply.repository.NonProdApplyBaseInfoRepository;
import com.huigou.topsun.sap.wasteSale.domain.WasteSale;
import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.bmp.operator.OperatorApplication;
import com.huigou.uasp.bmp.opm.repository.org.OrgRepository;
......@@ -38,6 +39,7 @@ import com.huigou.uasp.bpm.FlowBroker;
import com.huigou.uasp.bpm.HandleResult;
import com.huigou.util.ClassHelper;
import com.huigou.util.DateUtil;
import com.huigou.util.StringUtil;
import lombok.SneakyThrows;
import org.activiti.engine.delegate.DelegateExecution;
......@@ -383,6 +385,38 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
}
}
/**
* 设置任务名称
*/
@Override
protected void setTaskDescription(DelegateTask delegateTask) {
String bizId = delegateTask.getExecution().getProcessBusinessKey();
delegateTask.setDescription(this.getApprovalSubjectName(bizId));
}
/**
* 获取任务标题
*
* @param bizId
* @return
*/
private String getApprovalSubjectName(String bizId) {
NonProdApplyBaseInfo baseInfo = this.nonProdApplyBaseInfoRepository.findOne(bizId);
//查询 单据日期
String fillinDateStr = DateUtil.getDateFormat("yyyy-MM-dd HH:mm:ss", baseInfo.getFillinDate());
//设置标题
String title = "非产品/半成品类物料主数据";
switch (baseInfo.getMaintenanceType()){
case "new"://新增
title = title + "新增";
case "modify"://修改
title = title + "修改";
case "extend"://扩展
title = title + "扩展";
}
return String.format("%s-%s(%s)", title, baseInfo.getBillCode(), fillinDateStr);
}
@Override
public NonProdApplyBaseInfo loadNonProdApplyBaseInfoById(String id) {
......
......@@ -11,7 +11,7 @@ import java.util.Date;
public class ProdApplyFromSapVO {
// 批准日期
@JsonProperty("approval_date")
@JsonProperty("APPROVAL_DATE")
private Date approvalDate;
/**
......@@ -22,19 +22,19 @@ public class ProdApplyFromSapVO {
/**
* 通用品名
*/
@JsonProperty("generic_name")
@JsonProperty("GENERIC_NAME")
private String genericName;
/**
* 适用标准
*/
@JsonProperty("applicable_standard")
@JsonProperty("APPLICABLE_STANDARD")
private String applicableStandard;
/**
* 基本计量单位
*/
@JsonProperty("base_unit")
@JsonProperty("BASE_UNIT")
private String baseUnit;
/**
......@@ -45,6 +45,7 @@ public class ProdApplyFromSapVO {
/**
* 规格尺寸
*/
@JsonProperty("GROES")
private String groes;
/**
* 版式
......@@ -157,7 +158,7 @@ public class ProdApplyFromSapVO {
@JsonProperty("MEINS")
private String meins;
@JsonProperty("meins_name")
@JsonProperty("MEINS_NAME")
private String meinsName;
/**
......@@ -370,7 +371,7 @@ public class ProdApplyFromSapVO {
@JsonProperty("BSTME")
private String bstme;
@JsonProperty("bstme_name")
@JsonProperty("BSTME_NAME")
private String bstmeName;
/**
......@@ -504,7 +505,7 @@ public class ProdApplyFromSapVO {
@JsonProperty("LGPRO")
private String lgpro;
@JsonProperty("lgpro_name")
@JsonProperty("LGPRO_NAME")
private String lgproName;
/**
......@@ -519,7 +520,7 @@ public class ProdApplyFromSapVO {
@JsonProperty("LGFSB")
private String lgfsb;
@JsonProperty("lgfsb_name")
@JsonProperty("LGFSB_NAME")
private String lgfsbName;
/**
......@@ -600,7 +601,7 @@ public class ProdApplyFromSapVO {
@JsonProperty("AUSME")
private String ausme;
@JsonProperty("ausme_name")
@JsonProperty("AUSME_NAME")
private String ausmeName;
/**
......@@ -687,7 +688,7 @@ public class ProdApplyFromSapVO {
@JsonProperty("LTKZA")
private String ltkza;
@JsonProperty("ltkza_name")
@JsonProperty("LTKZA_NAME")
private String ltkzaName;
/**
......@@ -696,7 +697,7 @@ public class ProdApplyFromSapVO {
@JsonProperty("LTKZE")
private String ltkze;
@JsonProperty("ltkze_name")
@JsonProperty("LTKZE_NAME")
private String ltkzeName;
/**
......@@ -705,7 +706,7 @@ public class ProdApplyFromSapVO {
@JsonProperty("LGBKZ")
private String lgbkz;
@JsonProperty("lgbkz_name")
@JsonProperty("LGBKZ_NAME")
private String lgbkzName;
/**
......@@ -720,7 +721,7 @@ public class ProdApplyFromSapVO {
@JsonProperty("LHME1")
private String lhme1;
@JsonProperty("lhme1_name")
@JsonProperty("LHME1_NAME")
private String lhme1Name;
/**
......@@ -855,31 +856,31 @@ public class ProdApplyFromSapVO {
// @JsonProperty("STATUS")
// private String status;
@JsonProperty("matkl_name")
@JsonProperty("MATKL_NAME")
private String matklName;
@JsonProperty("spart_name")
@JsonProperty("SPART_NAME")
private String spartName;
@JsonProperty("werks_name")
@JsonProperty("WERKS_NAME")
private String werksName;
@JsonProperty("lgort_name")
@JsonProperty("LGORT_NAME")
private String lgortName;
@JsonProperty("vkorg_name")
@JsonProperty("VKORG_NAME")
private String vkorgName;
@JsonProperty("vtweg_name")
@JsonProperty("VTWEG_NAME")
private String vtwegName;
@JsonProperty("lgnum_name")
@JsonProperty("LGNUM_NAME")
private String lgnumName;
@JsonProperty("lgtyp_name")
@JsonProperty("LGTYP_NAME")
private String lgtypName;
@JsonProperty("ekgrp_name")
@JsonProperty("EKGRP_NAME")
private String ekgrpName;
//采购组织 ---------
......
......@@ -239,6 +239,12 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
String format = dateFormat.format(sapPurchaseItem.getLfdat());
sapPurchaseItemVo.setLfdat(format);
}
if ("A".equals(sapPurchase.getKnttp())){
//anln3用于接受固定资产编号
sapPurchaseItemVo.setAnln3(sapPurchaseItemVo.getAnln1());
sapPurchaseItemVo.setAnln1(null);
sapPurchaseItemVo.setVrtkz("1");
}
sapPurchaseItemVos.add(sapPurchaseItemVo);
});
sapPurchaseVo.setItemVos(sapPurchaseItemVos);
......
package com.huigou.topsun.sap.purchase.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.huigou.context.Operator;
import com.huigou.context.OrgUnit;
import com.huigou.topsun.common.BillStatus;
import com.huigou.topsun.demo.application.LeaveApplication;
import com.huigou.topsun.demo.domain.model.Leave;
import com.huigou.topsun.sap.purchase.application.SapPurchaseApplication;
import com.huigou.topsun.sap.purchase.domain.SapPurchase;
import com.huigou.topsun.sap.purchase.domain.query.SapPurchaseQueryRequest;
import com.huigou.topsun.sap.sapApplication.application.SapDictionaryApplication;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import com.huigou.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import javax.annotation.Resource;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @Auther: xin.lu
......@@ -33,6 +40,9 @@ public class SapPurchaseController extends CommonController {
@Resource
private SapPurchaseApplication sapPurchaseApplication;
@Resource
private SapDictionaryApplication sapDictionaryApplication;
public String forwardSapPurchaseList(){
this.putAttribute("statusKindsList", BillStatus.getValidMap());
return forward("sapPurchaseList");
......@@ -95,4 +105,37 @@ public class SapPurchaseController extends CommonController {
String newId=sapPurchaseApplication.revokeApproval(id);
return success();
}
public String showBindAnln1(){
SDO sdo = this.getSDO();
String itemId = sdo.getString("itemId");
String werks = sdo.getString("werks");
this.putAttribute("werks",werks);
return forward("purchaseAnln1Detail",itemId);
}
public String queryAnlanFromSap() throws IOException {
SDO sdo = this.getSDO();
String param = sdo.getString("paramValue");
String werks = sdo.getString("werks");
List<Map<String, String>> mapList = new ArrayList<>();
if (StringUtil.isBlank(param)){
return packGridDataAndResult(mapList);
}
mapList = sapDictionaryApplication.getSapDictionary("ANLN1");
if (CollectionUtil.isNotEmpty(mapList)) {
mapList = mapList
.stream()
.filter(map -> map.values().stream().anyMatch(value -> value.contains(werks)))
.collect(Collectors.toList());
if (StringUtil.isNotBlank(param)){//输入查询条件过滤
mapList = mapList
.stream()
.filter(map -> map.values().stream().anyMatch(value->value.contains(param)))
.collect(Collectors.toList());
}
}
return packGridDataAndResult(mapList);
}
}
......@@ -253,6 +253,12 @@ public class SapPurchaseItemVo implements Serializable {
@JsonProperty("anln1")
private String anln1;
/**
* 主资产号(用于采购类型是固定资产)
*/
@JsonProperty("anln3")
private String anln3;
/**
* 子资产号
*/
......
......@@ -11,6 +11,7 @@ import com.huigou.topsun.sap.costReimbursement.domain.SapCostReimbursement;
import com.huigou.topsun.sap.permit.application.SapPermitApplication;
import com.huigou.topsun.sap.permit.vo.SapPermitItemVo;
import com.huigou.topsun.sap.permit.vo.SapPermitVo;
import com.huigou.topsun.sap.purchase.domain.SapPurchase;
import com.huigou.topsun.sap.wasteSale.domain.WasteSale;
import com.huigou.topsun.sap.wasteSale.domain.WasteSaleItem;
import com.huigou.topsun.sap.wasteSale.application.WasteSaleApplication;
......@@ -257,4 +258,26 @@ public class WasteSaleApplicationImpl extends FlowBroker implements WasteSaleApp
wasteSaleRepository.save(wasteSale);
}
}
/**
* 设置任务名称
*/
@Override
protected void setTaskDescription(DelegateTask delegateTask) {
String bizId = delegateTask.getExecution().getProcessBusinessKey();
delegateTask.setDescription(this.getApprovalSubjectName(bizId));
}
/**
* 获取任务标题
*
* @param bizId
* @return
*/
private String getApprovalSubjectName(String bizId) {
WasteSale wasteSale = this.wasteSaleRepository.findOne(bizId);
//查询 单据日期
String fillinDateStr = DateUtil.getDateFormat("yyyy-MM-dd HH:mm:ss", wasteSale.getFillinDate());
//设置标题
return String.format("%s-%s(%s)", "废品销售单", wasteSale.getBillCode(), fillinDateStr);
}
}
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