Commit ce0c662f authored by 鲁鑫's avatar 鲁鑫

跨工厂转移明细必填;查询工单接口

parent 04531c43
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
<x:hidden name="meins"/> <x:hidden name="meins"/>
<x:selectC name="mwskz" label="销售/购买税代码" labelCol="2" fieldCol="1" required="true" dictionary="mwskz"/> <x:selectC name="mwskz" label="销售/购买税代码" labelCol="2" fieldCol="1" required="true" dictionary="purchaseMwskz"/>
<x:inputC name="norbm" label="标准采购订单数量" labelCol="2" fieldCol="1" required="true" mask="99999999.99"/> <x:inputC name="norbm" label="标准采购订单数量" labelCol="2" fieldCol="1" required="true" mask="99999999.99"/>
<x:inputC name="umren" label="单位转换分母" labelCol="1" fieldCol="2" required="true" mask="99999999.99"/> <x:inputC name="umren" label="单位转换分母" labelCol="1" fieldCol="2" required="true" mask="99999999.99"/>
......
...@@ -290,7 +290,7 @@ function getGridColumns() { ...@@ -290,7 +290,7 @@ function getGridColumns() {
}, },
{display: "销售/购买税代码", name: "mwskz", width: "40", align: "left", type: "string",hide:"true" }, {display: "销售/购买税代码", name: "mwskz", width: "40", align: "left", type: "string",hide:"true" },
{display: "销售/购买税代码", name: "mwskzTextView", width: "100", align: "left", type: "string" {display: "销售/购买税代码", name: "mwskzTextView", width: "150", align: "left", type: "string"
/*,editor: { /*,editor: {
type: 'dictionary', type: 'dictionary',
data: {name: 'mwskz'}, data: {name: 'mwskz'},
......
...@@ -140,7 +140,7 @@ function loadGrid() { ...@@ -140,7 +140,7 @@ function loadGrid() {
}, },
{ display: "单位", name: "meinsName", width: 120, minWidth: 60, type: "string", align: "left", { display: "单位", name: "meinsName", width: 120, minWidth: 60, type: "string", align: "left",
editor: { editor: {
required: false, type: "select", required: true, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -156,11 +156,11 @@ function loadGrid() { ...@@ -156,11 +156,11 @@ function loadGrid() {
}, },
{display: "日期", name: "eeind", width: "100", align: "left", type: "string", {display: "日期", name: "eeind", width: "100", align: "left", type: "string",
editor: {required: false, type: "date"} editor: {required: true, type: "date"}
}, },
{display: "库存地点", name: "lgort", width: "100", align: "left", type: "string", {display: "库存地点", name: "lgort", width: "100", align: "left", type: "string",
editor: { editor: {
required: false, type: "select", required: true, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
......
...@@ -409,9 +409,13 @@ public class ResourceSearchController { ...@@ -409,9 +409,13 @@ public class ResourceSearchController {
String noContain = sdo.getString("noContain"); String noContain = sdo.getString("noContain");
String notNull = sdo.getString("notNull"); String notNull = sdo.getString("notNull");
List<Map<String, String>> mapList = new ArrayList<>(); List<Map<String, String>> mapList = new ArrayList<>();
if ("AUFNR".equals(fieldName)){
mapList = sapDictionaryApplication.getSapDictionary(fieldName,param);
}else {
mapList = sapDictionaryApplication.getSapDictionary(fieldName); mapList = sapDictionaryApplication.getSapDictionary(fieldName);
}
List<QuerySchemeField> fields = new ArrayList<>(); List<QuerySchemeField> fields = new ArrayList<>();
Long totalWidths=100L; Long totalWidths=200L;
if (CollectionUtil.isNotEmpty(mapList)){ if (CollectionUtil.isNotEmpty(mapList)){
if (StringUtil.isNotBlank(filterValue)){//固定条件过滤,比如选了工厂后,只能读取改工厂下的物料组 if (StringUtil.isNotBlank(filterValue)){//固定条件过滤,比如选了工厂后,只能读取改工厂下的物料组
String[] split = filterValue.split(","); String[] split = filterValue.split(",");
......
...@@ -13,6 +13,7 @@ import com.huigou.topsun.base.coderule.repository.CodeRuleRepository; ...@@ -13,6 +13,7 @@ import com.huigou.topsun.base.coderule.repository.CodeRuleRepository;
import com.huigou.topsun.sap.common.HttpClient; import com.huigou.topsun.sap.common.HttpClient;
import com.huigou.topsun.sap.common.application.SapMutualEpLogApplication; import com.huigou.topsun.sap.common.application.SapMutualEpLogApplication;
import com.huigou.topsun.sap.costReimbursement.domain.SapCostReimbursement; import com.huigou.topsun.sap.costReimbursement.domain.SapCostReimbursement;
import com.huigou.topsun.sap.purchase.domain.SapPurchase;
import com.huigou.topsun.sap.purchaseInfoRecord.application.SapPurchaseInfoRecordApplication; import com.huigou.topsun.sap.purchaseInfoRecord.application.SapPurchaseInfoRecordApplication;
import com.huigou.topsun.sap.purchaseInfoRecord.application.SapPurchaseInfoRecordItemApplication; import com.huigou.topsun.sap.purchaseInfoRecord.application.SapPurchaseInfoRecordItemApplication;
import com.huigou.topsun.sap.purchaseInfoRecord.domain.SapPurchaseInfoRecord; import com.huigou.topsun.sap.purchaseInfoRecord.domain.SapPurchaseInfoRecord;
...@@ -78,7 +79,28 @@ public class SapPurchaseInfoRecordApplicationImpl extends FlowBroker implements ...@@ -78,7 +79,28 @@ public class SapPurchaseInfoRecordApplicationImpl extends FlowBroker implements
} }
/**
* 设置任务名称
*/
@Override
protected void setTaskDescription(DelegateTask delegateTask) {
String bizId = delegateTask.getExecution().getProcessBusinessKey();
delegateTask.setDescription(this.getApprovalSubjectName(bizId));
}
/**
* 获取任务标题
*
* @param bizId
* @return
*/
private String getApprovalSubjectName(String bizId) {
SapPurchaseInfoRecord infoRecord = this.sapPurchaseInfoRecordRepository.findOne(bizId);
//查询 单据日期
String fillinDateStr = DateUtil.getDateFormat("yyyy-MM-dd HH:mm:ss", infoRecord.getFillinDate());
//设置标题
return String.format("%s-%s(%s)", "采购信息记录", infoRecord.getBillCode(), fillinDateStr);
}
@Override @Override
protected Map<String, Object> getProcessBizParams(String bizId) { protected Map<String, Object> getProcessBizParams(String bizId) {
// 返回业务数据给流程实例, // 返回业务数据给流程实例,
...@@ -258,6 +280,7 @@ public class SapPurchaseInfoRecordApplicationImpl extends FlowBroker implements ...@@ -258,6 +280,7 @@ public class SapPurchaseInfoRecordApplicationImpl extends FlowBroker implements
queryModel.putDictionary("status", BizBillStatus.getMap()); queryModel.putDictionary("status", BizBillStatus.getMap());
queryModel.putDictionary("urzla", DictUtil.getDictionary("country")); queryModel.putDictionary("urzla", DictUtil.getDictionary("country"));
queryModel.putDictionary("loekz", DictUtil.getDictionary("loekz")); queryModel.putDictionary("loekz", DictUtil.getDictionary("loekz"));
queryModel.putDictionary("mwskz", DictUtil.getDictionary("purchaseMwskz"));
queryModel.addCriteria(" order by fillin_date desc "); queryModel.addCriteria(" order by fillin_date desc ");
return this.sqlExecutorDao.executeSlicedQuery(queryModel); return this.sqlExecutorDao.executeSlicedQuery(queryModel);
......
...@@ -45,6 +45,7 @@ public class SapPurchaseInfoRecordItemApplicationImpl extends BaseApplication im ...@@ -45,6 +45,7 @@ public class SapPurchaseInfoRecordItemApplicationImpl extends BaseApplication im
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "sapPurchaseInfoRecordItems"); QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "sapPurchaseInfoRecordItems");
QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, queryRequest); QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, queryRequest);
queryModel.putDictionary("urzla", DictUtil.getDictionary("country")); queryModel.putDictionary("urzla", DictUtil.getDictionary("country"));
queryModel.putDictionary("mwskz", DictUtil.getDictionary("purchaseMwskz"));
map = this.sqlExecutorDao.executeSlicedQuery(queryModel); map = this.sqlExecutorDao.executeSlicedQuery(queryModel);
} }
return map; return map;
...@@ -54,6 +55,7 @@ public class SapPurchaseInfoRecordItemApplicationImpl extends BaseApplication im ...@@ -54,6 +55,7 @@ public class SapPurchaseInfoRecordItemApplicationImpl extends BaseApplication im
public Map<String, Object> querySapPurchaseInfoRecordItemByIds(SapPurchaseInfoRecordQueryRequest request) { public Map<String, Object> querySapPurchaseInfoRecordItemByIds(SapPurchaseInfoRecordQueryRequest request) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "sapPurchaseInfoRecordItemByIds"); QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "sapPurchaseInfoRecordItemByIds");
QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, request); QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, request);
queryModel.putDictionary("mwskz", DictUtil.getDictionary("purchaseMwskz"));
Map<String, Object> map = this.sqlExecutorDao.executeSlicedQuery(queryModel); Map<String, Object> map = this.sqlExecutorDao.executeSlicedQuery(queryModel);
return map; return map;
} }
...@@ -61,6 +63,7 @@ public class SapPurchaseInfoRecordItemApplicationImpl extends BaseApplication im ...@@ -61,6 +63,7 @@ public class SapPurchaseInfoRecordItemApplicationImpl extends BaseApplication im
public List<SapPurchaseInfoRecordItem> querySapPurchaseInfoRecordItemByMaytkl(SapPurchaseInfoRecordQueryRequest query) { public List<SapPurchaseInfoRecordItem> querySapPurchaseInfoRecordItemByMaytkl(SapPurchaseInfoRecordQueryRequest query) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "querySapPurchaseInfoRecordItemByMaytkl"); QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "querySapPurchaseInfoRecordItemByMaytkl");
QueryModel model = this.sqlExecutorDao.getQueryModel(queryDescriptor, query); QueryModel model = this.sqlExecutorDao.getQueryModel(queryDescriptor, query);
model.putDictionary("mwskz", DictUtil.getDictionary("purchaseMwskz"));
model.setPageIndex(1); model.setPageIndex(1);
model.setPageSize(10); model.setPageSize(10);
Map<String, Object> map = this.sqlExecutorDao.executeSlicedQuery(model); Map<String, Object> map = this.sqlExecutorDao.executeSlicedQuery(model);
......
...@@ -13,6 +13,7 @@ import java.util.Map; ...@@ -13,6 +13,7 @@ import java.util.Map;
*/ */
public interface SapDictionaryApplication { public interface SapDictionaryApplication {
List<Map<String,String>> getSapDictionary(String fieldName) throws IOException; List<Map<String,String>> getSapDictionary(String fieldName) throws IOException;
List<Map<String,String>> getSapDictionary(String fieldName,String fieldValue) throws IOException;
public Map<String,Object> initEasySearchModel(List<Map<String, String>> mapList, String param, SDO sdo); public Map<String,Object> initEasySearchModel(List<Map<String, String>> mapList, String param, SDO sdo);
......
...@@ -54,6 +54,23 @@ public class SapDictionaryApplicationImpl implements SapDictionaryApplication { ...@@ -54,6 +54,23 @@ public class SapDictionaryApplicationImpl implements SapDictionaryApplication {
return mapList; return mapList;
} }
@Override
public List<Map<String, String>> getSapDictionary(String fieldName, String fieldValue) throws IOException {
Map<String,Object> map = new HashMap<>();
map.put("FIELDNAME",fieldName);
map.put("VALUE",fieldValue);
String url = SystemCache.getParameter("sap.service.dictionary.url", String.class);
String execute = null;
try {
execute = httpClient.execute(map, url);
} catch (IOException e) {
throw new RuntimeException(String.format("查询“%s“数据字典出错”。", fieldName));
}
ObjectMapper objectMapper = SAPUtils.objectMapper();
List<Map<String,String>> mapList = objectMapper.readValue(execute, new TypeReference<List<Map<String, String>>>() {});
return mapList;
}
@Override @Override
public Map<String,Object> initEasySearchModel(List<Map<String, String>> mapList,String param,SDO sdo){ public Map<String,Object> initEasySearchModel(List<Map<String, String>> mapList,String param,SDO sdo){
List<QuerySchemeField> fields = new ArrayList<>(); List<QuerySchemeField> fields = new ArrayList<>();
......
...@@ -128,7 +128,9 @@ public class SapStockTransfersApplicationImpl extends FlowBroker implements SapS ...@@ -128,7 +128,9 @@ public class SapStockTransfersApplicationImpl extends FlowBroker implements SapS
for (SapStockTransfersItem item:itemList){ for (SapStockTransfersItem item:itemList){
SapStockTransfersItemVO sapStockTransfersItemVO=new SapStockTransfersItemVO(); SapStockTransfersItemVO sapStockTransfersItemVO=new SapStockTransfersItemVO();
BeanUtil.copyProperties(item, sapStockTransfersItemVO); BeanUtil.copyProperties(item, sapStockTransfersItemVO);
if (item.getEeind() != null){
sapStockTransfersItemVO.setEeind(sdf.format(item.getEeind())); sapStockTransfersItemVO.setEeind(sdf.format(item.getEeind()));
}
sapStockTransfersItemVO.setWerks(stockTransfers.getWerks()); sapStockTransfersItemVO.setWerks(stockTransfers.getWerks());
newItemList.add(sapStockTransfersItemVO); newItemList.add(sapStockTransfersItemVO);
} }
......
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