Commit 2bf582fb authored by 刘学辉's avatar 刘学辉

品质异常单(供应商)

parent 5f2287fd
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="container-fluid"> <div class="container-fluid">
<x:billTitle title="品质异常报告(生产)" needStatus="true" needPerson="true"/> <x:billTitle title="品质异常报告(生产)" needStatus="true" needPerson="true"/>
<form class="hg-form" method="post" action="" id="submitForm"> <form class="hg-form" method="post" action="" id="submitForm">
<x:hidden name="type"/> <x:hidden name="billType"/>
<x:hidden name="id"/> <x:hidden name="id"/>
<x:hidden name="version"/> <x:hidden name="version"/>
<x:hidden name="attbizId"/> <x:hidden name="attbizId"/>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<button id="save" title="" type="button" onclick="printPage()" class="btn btn-gray"><i <button id="save" title="" type="button" onclick="printPage()" class="btn btn-gray"><i
class="fa fa-save"></i>打印 class="fa fa-save"></i>打印
</button> </button>
</div> </div
</c:if> </c:if>
<div class="hg-form-row"> <div class="hg-form-row">
<x:selectC name="exceptionType" label="异常类型" labelCol="1" fieldCol="2" required="true" dictionary="exceptionType"/> <x:selectC name="exceptionType" label="异常类型" labelCol="1" fieldCol="2" required="true" dictionary="exceptionType"/>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="container-fluid"> <div class="container-fluid">
<x:billTitle title="品质异常报告(采购/外发)" needStatus="true" needPerson="true"/> <x:billTitle title="品质异常报告(采购/外发)" needStatus="true" needPerson="true"/>
<form class="hg-form" method="post" action="" id="submitForm"> <form class="hg-form" method="post" action="" id="submitForm">
<x:hidden name="type"/> <x:hidden name="billType"/>
<x:hidden name="id"/> <x:hidden name="id"/>
<x:hidden name="version"/> <x:hidden name="version"/>
<x:hidden name="attbizId"/> <x:hidden name="attbizId"/>
......
<%--采购申请--%>
<%@ 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"/>
<x:script src="/biz/topsun/sap/exceptionReport/exceptionReportDetailSupplier.js"/>
</head>
<body>
<div class="container-fluid">
<x:billTitle title="品质异常报告(供应商)" needStatus="true" needPerson="true"/>
<form class="hg-form" method="post" action="" id="submitForm">
<x:hidden name="billType"/>
<x:hidden name="id"/>
<x:hidden name="version"/>
<x:hidden name="attbizId"/>
<x:hidden name="billCode"/>
<x:hidden name="fillinDate"/>
<x:hidden name="fullId"/>
<x:hidden name="organId"/>
<x:hidden name="organName"/>
<x:hidden name="deptId"/>
<x:hidden name="deptName"/>
<x:hidden name="positionId"/>
<x:hidden name="positionName"/>
<x:hidden name="personMemberId"/>
<x:hidden name="personMemberName"/>
<x:hidden name="frgdt"/>
<div class="hg-form-cols">
<c:if test="${statusId==3}">
<div style="float: right; margin-right: 10px;" class="btn-group" id="buttonBox">
<button id="save" title="" type="button" onclick="printPage()" class="btn btn-gray"><i
class="fa fa-save"></i>打印
</button>
</div>
</c:if>
<div class="hg-form-row">
<x:selectC name="exceptionType" label="异常类型" labelCol="1" fieldCol="2" required="true" dictionary="exceptionType"/>
<x:inputC name="reportDate" label="呈报日期" labelCol="1" fieldCol="2" required="true" wrapper="date"/>
<x:inputC name="exceptionTitle" label="异常标题" labelCol="1" fieldCol="2" required="true"/>
<x:inputC name="exceptionDate" label="发现日期" labelCol="1" fieldCol="2" required="true" wrapper="date"/>
</div>
<div class="hg-form-row">
<x:selectC name="exceptionReasonType" label="异常原因分类" labelCol="1" fieldCol="2" required="true" dictionary="exceptionReasonType"/>
<x:hidden name="customerNo"/>
<x:inputC name="customerName" required="true" label="供应商名称" labelCol="1" wrapper="select" fieldCol="2"/>
<x:inputC name="matnr" label="材料编码" labelCol="1" fieldCol="2" required="false" readonly="true"/>
<x:inputC name="maktx" label="材料名称" labelCol="1" fieldCol="2" required="true" wrapper="select"/>
<x:inputC name="customerOrderNo" label="采购单号" labelCol="1" fieldCol="2" required="true"/>
<x:inputC name="loseMoney" label="损失金额" labelCol="1" fieldCol="2" required="true" mask="nnnnnn.nn" />
<x:selectC name="statusId" label="处理进度" labelCol="1" fieldCol="2" disabled="true" required="false" dictionary="bizBillStatus"/>
</div>
</div>
<x:title title="处理方式:货币结算(扣除应付款)" name="group" hideTable="#maingrid1" />
<div id="maingrid1"></div>
<x:title title="处理方式:货币结算(现金/转账)" name="group" hideTable="#maingrid2" />
<div id="maingrid2"></div>
<x:title title="处理方式:商品结算" name="group" hideTable="#maingrid3" />
<div id="maingrid3"></div>
<div class="hg-form-cols">
<div class="hg-form-row">
<x:textareaC name="dealResult" required="false" label="处理结果" maxLength="120" labelCol="1" fieldCol="11" rows="2" readonly="true"/>
</div>
<div class="hg-form-row">
<x:textareaC name="remark" required="false" label="备注" maxLength="120" labelCol="1" fieldCol="11" rows="2"/>
</div>
<div style="padding-top: 15px;">
<x:fileList bizCode="exceptionStateInfo" bizId="attbizId" id="exceptionStateInfoList" title="相关资料" />
</div>
</div>
</form>
</div>
</body>
\ No newline at end of file
...@@ -17,7 +17,7 @@ function initGrid() { ...@@ -17,7 +17,7 @@ function initGrid() {
UICtrl.addTabItem({ UICtrl.addTabItem({
tabid: 'addExceptionReportProduce', tabid: 'addExceptionReportProduce',
text: '新增生产异常报告', text: '新增生产异常报告',
url: web_app.name + '/exceptionReport/addExceptionReportDetail.job?type=produce' url: web_app.name + '/exceptionReport/addExceptionReportDetail.job?billType=produce'
}); });
} }
}, },
...@@ -26,7 +26,16 @@ function initGrid() { ...@@ -26,7 +26,16 @@ function initGrid() {
UICtrl.addTabItem({ UICtrl.addTabItem({
tabid: 'addExceptionReportPurchase', tabid: 'addExceptionReportPurchase',
text: '新增采购异常报告', text: '新增采购异常报告',
url: web_app.name + '/exceptionReport/addExceptionReportDetail.job?type=purchase' url: web_app.name + '/exceptionReport/addExceptionReportDetail.job?billType=purchase'
});
}
},
addSupplierHandler: {id: 'supplierException', text: '添加供应商异常单', img: 'fa-building-o', className: 'btn-gray',
click: function () {
UICtrl.addTabItem({
tabid: 'addExceptionReportSupplier',
text: '新增供应商异常报告',
url: web_app.name + '/exceptionReport/addExceptionReportDetail.job?billType=supplier'
}); });
} }
}, },
......
package com.huigou.topsun.sap.exceptionReport.application;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportCash;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportDutyPerson;
import com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest;
import java.util.List;
import java.util.Map;
/**
* @Auther: lxh
* @Date: 2024/08/21/19:35
* @Description:
*/
public interface ExceptionReportCashApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/sap/exceptionReport/exceptionReport.xml";
List<ExceptionReportCash> findByExceptionReportId(String exceptionReportId);
void saveExceptionReportCashList(String exceptionReportId,List<ExceptionReportCash> cashList);
Map<String,Object> slicedExceptionReportCashList(ExceptionReportQueryRequest queryRequest);
void deleteByIds(List<String> ids);
void saveExceptionReportCash(ExceptionReportCash exceptionReportCash);
}
package com.huigou.topsun.sap.exceptionReport.application;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportDutyPerson;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportGoods;
import com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest;
import java.util.List;
import java.util.Map;
/**
* @Auther: lxh
* @Date: 2024/08/21/19:35
* @Description:
*/
public interface ExceptionReportGoodsApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/sap/exceptionReport/exceptionReport.xml";
List<ExceptionReportGoods> findByExceptionReportId(String exceptionReportId);
void saveExceptionReportGoodsList(String exceptionReportId,List<ExceptionReportGoods> goodsList);
Map<String,Object> slicedExceptionReportGoodsList(ExceptionReportQueryRequest queryRequest);
void deleteByIds(List<String> ids);
void saveExceptionReportGoods(ExceptionReportGoods exceptionReportGoods);
}
package com.huigou.topsun.sap.exceptionReport.application;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportDutyPerson;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportPayable;
import com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest;
import java.util.List;
import java.util.Map;
/**
* @Auther: lxh
* @Date: 2024/08/21/19:35
* @Description:
*/
public interface ExceptionReportPayableApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/sap/exceptionReport/exceptionReport.xml";
List<ExceptionReportPayable> findByExceptionReportId(String exceptionReportId);
void saveExceptionReportPayableList(String exceptionReportId,List<ExceptionReportPayable> payableList);
Map<String,Object> slicedExceptionReportPayableList(ExceptionReportQueryRequest queryRequest);
void deleteByIds(List<String> ids);
void saveExceptionReportPayable(ExceptionReportPayable exceptionReportPayable);
}
package com.huigou.topsun.sap.exceptionReport.application.impl;
import com.huigou.cache.DictUtil;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.sap.exceptionReport.application.ExceptionReportCashApplication;
import com.huigou.topsun.sap.exceptionReport.application.ExceptionReportDutyPersonApplication;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportCash;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportDutyPerson;
import com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest;
import com.huigou.topsun.sap.exceptionReport.repository.ExceptionReportCashRepository;
import com.huigou.topsun.sap.exceptionReport.repository.ExceptionReportDutyPersonRepository;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import com.huigou.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Auther: lxh
* @Date: 2024/08/21/19:36
* @Description: 品质异常报告现金处理方式信息
*/
@Service("exceptionReportCashApplication")
public class ExceptionReportCashApplicationImpl extends BaseApplication implements ExceptionReportCashApplication {
@Autowired
private ExceptionReportCashRepository exceptionReportCashRepository;
@Override
public List<ExceptionReportCash> findByExceptionReportId(String exceptionReportId) {
return exceptionReportCashRepository.findByExceptionReportId(exceptionReportId);
}
@Override
public void saveExceptionReportCashList(String exceptionReportId, List<ExceptionReportCash> cashList) {
for (ExceptionReportCash exceptionReportCash : cashList) {
exceptionReportCash.setExceptionReportId(exceptionReportId);
exceptionReportCashRepository.save(exceptionReportCash);
}
}
@Override
public Map<String, Object> slicedExceptionReportCashList(ExceptionReportQueryRequest queryRequest) {
Map<String, Object> map = new HashMap<>();
if (StringUtil.isNotBlank(queryRequest.getExceptionReportId())){
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "exceptionReportCash");
QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, queryRequest);
queryModel.putDictionary("payment", DictUtil.getDictionary("zwels"));
map = this.sqlExecutorDao.executeSlicedQuery(queryModel);
}
return map;
}
@Override
public void deleteByIds(List<String> ids) {
for (String id : ids) {
exceptionReportCashRepository.delete(id);
}
}
@Override
public void saveExceptionReportCash(ExceptionReportCash exceptionReportCash) {
exceptionReportCashRepository.save(exceptionReportCash);
}
}
package com.huigou.topsun.sap.exceptionReport.application.impl;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.sap.exceptionReport.application.ExceptionReportCashApplication;
import com.huigou.topsun.sap.exceptionReport.application.ExceptionReportGoodsApplication;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportCash;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportGoods;
import com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest;
import com.huigou.topsun.sap.exceptionReport.repository.ExceptionReportCashRepository;
import com.huigou.topsun.sap.exceptionReport.repository.ExceptionReportGoodsRepository;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import com.huigou.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Auther: lxh
* @Date: 2024/08/21/19:36
* @Description: 品质异常报告商品赔付处理方式信息
*/
@Service("exceptionReportGoodsApplication")
public class ExceptionReportGoodsApplicationImpl extends BaseApplication implements ExceptionReportGoodsApplication {
@Autowired
private ExceptionReportGoodsRepository exceptionReportGoodsRepository;
@Override
public List<ExceptionReportGoods> findByExceptionReportId(String exceptionReportId) {
return exceptionReportGoodsRepository.findByExceptionReportId(exceptionReportId);
}
@Override
public void saveExceptionReportGoodsList(String exceptionReportId, List<ExceptionReportGoods> goodsList) {
for (ExceptionReportGoods exceptionReportGoods : goodsList) {
exceptionReportGoods.setExceptionReportId(exceptionReportId);
exceptionReportGoodsRepository.save(exceptionReportGoods);
}
}
@Override
public Map<String, Object> slicedExceptionReportGoodsList(ExceptionReportQueryRequest queryRequest) {
Map<String, Object> map = new HashMap<>();
if (StringUtil.isNotBlank(queryRequest.getExceptionReportId())){
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "exceptionReportGoods");
QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, queryRequest);
map = this.sqlExecutorDao.executeSlicedQuery(queryModel);
}
return map;
}
@Override
public void deleteByIds(List<String> ids) {
for (String id : ids) {
exceptionReportGoodsRepository.delete(id);
}
}
@Override
public void saveExceptionReportGoods(ExceptionReportGoods exceptionReportGoods) {
exceptionReportGoodsRepository.save(exceptionReportGoods);
}
}
package com.huigou.topsun.sap.exceptionReport.application.impl;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.sap.exceptionReport.application.ExceptionReportCashApplication;
import com.huigou.topsun.sap.exceptionReport.application.ExceptionReportPayableApplication;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportCash;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportPayable;
import com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest;
import com.huigou.topsun.sap.exceptionReport.repository.ExceptionReportCashRepository;
import com.huigou.topsun.sap.exceptionReport.repository.ExceptionReportPayableRepository;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import com.huigou.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Auther: lxh
* @Date: 2024/08/21/19:36
* @Description: 品质异常报告扣除应付款处理方式信息
*/
@Service("exceptionReportPayableApplication")
public class ExceptionReportPayableApplicationImpl extends BaseApplication implements ExceptionReportPayableApplication {
@Autowired
private ExceptionReportPayableRepository exceptionReportPayableRepository;
@Override
public List<ExceptionReportPayable> findByExceptionReportId(String exceptionReportId) {
return exceptionReportPayableRepository.findByExceptionReportId(exceptionReportId);
}
@Override
public void saveExceptionReportPayableList(String exceptionReportId, List<ExceptionReportPayable> payableList) {
for (ExceptionReportPayable exceptionReportPayable : payableList) {
exceptionReportPayable.setExceptionReportId(exceptionReportId);
exceptionReportPayableRepository.save(exceptionReportPayable);
}
}
@Override
public Map<String, Object> slicedExceptionReportPayableList(ExceptionReportQueryRequest queryRequest) {
Map<String, Object> map = new HashMap<>();
if (StringUtil.isNotBlank(queryRequest.getExceptionReportId())){
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "exceptionReportPayable");
QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, queryRequest);
map = this.sqlExecutorDao.executeSlicedQuery(queryModel);
}
return map;
}
@Override
public void deleteByIds(List<String> ids) {
for (String id : ids) {
exceptionReportPayableRepository.delete(id);
}
}
@Override
public void saveExceptionReportPayable(ExceptionReportPayable exceptionReportPayable) {
exceptionReportPayableRepository.save(exceptionReportPayable);
}
}
...@@ -2,9 +2,7 @@ package com.huigou.topsun.sap.exceptionReport.controller; ...@@ -2,9 +2,7 @@ package com.huigou.topsun.sap.exceptionReport.controller;
import com.huigou.context.Operator; import com.huigou.context.Operator;
import com.huigou.context.OrgUnit; import com.huigou.context.OrgUnit;
import com.huigou.topsun.sap.exceptionReport.application.ExceptionReportApplication; import com.huigou.topsun.sap.exceptionReport.application.*;
import com.huigou.topsun.sap.exceptionReport.application.ExceptionReportDutyPersonApplication;
import com.huigou.topsun.sap.exceptionReport.application.ExceptionReportItemApplication;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReport; import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReport;
import com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest; import com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest;
import com.huigou.uasp.annotation.ControllerMapping; import com.huigou.uasp.annotation.ControllerMapping;
...@@ -33,6 +31,14 @@ public class ExceptionReportController extends CommonController { ...@@ -33,6 +31,14 @@ public class ExceptionReportController extends CommonController {
private ExceptionReportItemApplication exceptionReportItemApplication; private ExceptionReportItemApplication exceptionReportItemApplication;
@Autowired @Autowired
private ExceptionReportDutyPersonApplication exceptionReportDutyPersonApplication; private ExceptionReportDutyPersonApplication exceptionReportDutyPersonApplication;
@Autowired
private ExceptionReportPayableApplication exceptionReportPayableApplication;
@Autowired
private ExceptionReportCashApplication exceptionReportCashApplication;
@Autowired
private ExceptionReportGoodsApplication exceptionReportGoodsApplication;
@Override @Override
protected String getPagePath() { protected String getPagePath() {
return "/biz/topsun/sap/exceptionReport/"; return "/biz/topsun/sap/exceptionReport/";
...@@ -69,8 +75,8 @@ public class ExceptionReportController extends CommonController { ...@@ -69,8 +75,8 @@ public class ExceptionReportController extends CommonController {
exceptionReport.setStatusId(BizBillStatus.APPLYING.getId()); exceptionReport.setStatusId(BizBillStatus.APPLYING.getId());
exceptionReport.setAttbizId(CommonUtil.createGUID()); // 自动生成附件id exceptionReport.setAttbizId(CommonUtil.createGUID()); // 自动生成附件id
SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
String type=sdo.getString("type"); String billType=sdo.getString("billType");
this.putAttribute("type",type); this.putAttribute("billType",billType);
List<Map<String,Object>> list= exceptionReportApplication.getCustomerOrders(""); List<Map<String,Object>> list= exceptionReportApplication.getCustomerOrders("");
Map map=new HashMap(); Map map=new HashMap();
...@@ -84,8 +90,11 @@ public class ExceptionReportController extends CommonController { ...@@ -84,8 +90,11 @@ public class ExceptionReportController extends CommonController {
*/ */
Operator operator = getOperator(); Operator operator = getOperator();
exceptionReport.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName())); exceptionReport.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName()));
if ("purchase".equals(type)) { exceptionReport.setBillType(billType);
if ("purchase".equals(billType)) {
return forward("exceptionReportDetailPurchase", exceptionReport); return forward("exceptionReportDetailPurchase", exceptionReport);
} else if ("supplier".equals(billType)) {
return forward("exceptionReportDetailSupplier", exceptionReport);
} else { } else {
return forward("exceptionReportDetail", exceptionReport); return forward("exceptionReportDetail", exceptionReport);
} }
...@@ -99,8 +108,10 @@ public class ExceptionReportController extends CommonController { ...@@ -99,8 +108,10 @@ public class ExceptionReportController extends CommonController {
SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
String id = sdo.getBizId(); String id = sdo.getBizId();
ExceptionReport exceptionReport = exceptionReportApplication.findById(id); ExceptionReport exceptionReport = exceptionReportApplication.findById(id);
if ("purchase".equals(exceptionReport.getType())){ if ("purchase".equals(exceptionReport.getBillType())) {
return forward("exceptionReportDetailPurchase", exceptionReport); return forward("exceptionReportDetailPurchase", exceptionReport);
} else if ("supplier".equals(exceptionReport.getBillType())){
return forward("exceptionReportDetailSupplier", exceptionReport);
} else { } else {
return forward("exceptionReportDetail", exceptionReport); return forward("exceptionReportDetail", exceptionReport);
} }
...@@ -161,6 +172,68 @@ public class ExceptionReportController extends CommonController { ...@@ -161,6 +172,68 @@ public class ExceptionReportController extends CommonController {
return success(); return success();
} }
/**
* 查询品质异常报告扣除应付款处理方式
* @return
*/
public String slicedExceptionReportPayableList(){
SDO sdo = this.getSDO();
ExceptionReportQueryRequest queryRequest = sdo.toQueryRequest(ExceptionReportQueryRequest.class);
return toResult(exceptionReportPayableApplication.slicedExceptionReportPayableList(queryRequest));
}
/**
* 删除品质异常报告扣除应付款处理方式
* @return
*/
public String deleteExceptionReportPayable(){
SDO sdo = this.getSDO();
List<String> ids = sdo.getIds();
exceptionReportPayableApplication.deleteByIds(ids);
return success();
}
/**
* 查询品质异常报告现金处理方式
* @return
*/
public String slicedExceptionReportCashList(){
SDO sdo = this.getSDO();
ExceptionReportQueryRequest queryRequest = sdo.toQueryRequest(ExceptionReportQueryRequest.class);
return toResult(exceptionReportCashApplication.slicedExceptionReportCashList(queryRequest));
}
/**
* 删除品质异常报告现金处理方式
* @return
*/
public String deleteExceptionReportCash(){
SDO sdo = this.getSDO();
List<String> ids = sdo.getIds();
exceptionReportCashApplication.deleteByIds(ids);
return success();
}
/**
* 查询品质异常报告商品赔付处理方式
* @return
*/
public String slicedExceptionReportGoodsList(){
SDO sdo = this.getSDO();
ExceptionReportQueryRequest queryRequest = sdo.toQueryRequest(ExceptionReportQueryRequest.class);
return toResult(exceptionReportGoodsApplication.slicedExceptionReportGoodsList(queryRequest));
}
/**
* 删除品质异常报告商品赔付处理方式
* @return
*/
public String deleteExceptionReportGoods(){
SDO sdo = this.getSDO();
List<String> ids = sdo.getIds();
exceptionReportGoodsApplication.deleteByIds(ids);
return success();
}
public String getCustomerOrders(){ public String getCustomerOrders(){
SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
List<String> ids = sdo.getIds(); List<String> ids = sdo.getIds();
......
...@@ -136,8 +136,16 @@ public class ExceptionReport extends FlowBillAbstractEntity { ...@@ -136,8 +136,16 @@ public class ExceptionReport extends FlowBillAbstractEntity {
@Column(name = "lose_money") @Column(name = "lose_money")
private BigDecimal loseMoney; private BigDecimal loseMoney;
@Column(name = "type") //单据类型
private String type; @Column(name = "bill_type")
private String billType;
//材料编码
@Column(name = "matnr")
private String matnr;
//材料名称
@Column(name = "maktx")
private String maktx;
@Column(name = "exception_title") @Column(name = "exception_title")
......
package com.huigou.topsun.sap.exceptionReport.domain;
import com.huigou.data.domain.model.AbstractEntity;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Auther: lxh
* @Date: 2024/08/21/15:05
* @Description: 品质异常报告供应商 现金、转账处理方式
*/
@Data
@Entity
@Table(name = "sap_exception_report_cash")
public class ExceptionReportCash extends AbstractEntity {
/**
* 品质异常报告id
*/
@Column(name = "exception_report_id")
private String exceptionReportId;
/**
* 付款方式
*/
@Column(name = "payment")
private String payment;
/**
* 金额
*/
@Column(name = "money")
private BigDecimal money;
/**
* 币别
*/
@Column(name = "currency")
private String currency;
/**
* 币别描述
*/
@Column(name = "currency_name")
private String currencyName;
/**
* 账期
*/
@Column(name = "period")
private String period;
/*
*备注
*/
@Column(name = "remark")
private String remark;
}
package com.huigou.topsun.sap.exceptionReport.domain;
import com.huigou.data.domain.model.AbstractEntity;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Auther: lxh
* @Date: 2024/08/21/15:05
* @Description: 品质异常报告供应商 商品赔付处理方式
*/
@Data
@Entity
@Table(name = "sap_exception_report_goods")
public class ExceptionReportGoods extends AbstractEntity {
/**
* 品质异常报告id
*/
@Column(name = "exception_report_id")
private String exceptionReportId;
/**
* 公司
*/
@Column(name = "company")
private String company;
@Column(name = "company_name")
private String companyName;
//采购组织
@Column(name = "purchase_team")
private String purchaseTeam;
@Column(name = "purchase_team_name")
private String purchaseTeamName;
@Column(name = "ekgrp")
private String ekgrp;
/**
* 产品/原材料编码
*/
@Column(name = "product_code")
private String productCode;
/**
* 产品/原材料名称
*/
@Column(name = "product_name")
private String productName;
/**
* 单位
*/
@Column(name = "unit")
private String unit;
/**
* 单位描述
*/
@Column(name = "unit_name")
private String unitName;
/**
* 币别
*/
@Column(name = "currency")
private String currency;
/**
* 币别描述
*/
@Column(name = "currency_name")
private String currencyName;
/**
* 数量
*/
@Column(name = "number")
private BigDecimal number;
/**
* 金额
*/
@Column(name = "money")
private BigDecimal money;
/**
* 需求日期
*/
@Column(name = "need_date")
private Date needDate;
/*
*收货工厂
*/
@Column(name = "werks_name")
private String werksName;
@Column(name = "werks")
private String werks;
/*
*收货地点
*/
@Column(name = "location")
private String location;
/*
*收货地点
*/
@Column(name = "location_name")
private String locationName;
/*
*备注
*/
@Column(name = "remark")
private String remark;
}
package com.huigou.topsun.sap.exceptionReport.domain;
import com.huigou.data.domain.model.AbstractEntity;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Auther: lxh
* @Date: 2024/08/21/15:05
* @Description: 品质异常报告供应商 扣除应付款处理方式
*/
@Data
@Entity
@Table(name = "sap_exception_report_payable")
public class ExceptionReportPayable extends AbstractEntity {
/**
* 品质异常报告id
*/
@Column(name = "exception_report_id")
private String exceptionReportId;
/**
* 采购单号
*/
@Column(name = "purchase_no")
private String purchaseNo;
/**
* 金额
*/
@Column(name = "money")
private BigDecimal money;
/**
* 日期
*/
@Column(name = "send_date")
private Date sendDate;
/*
*备注
*/
@Column(name = "remark")
private String remark;
}
package com.huigou.topsun.sap.exceptionReport.domain.vo;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
public class PurchaseOrderItemVo implements Serializable {
/**
* SAP采购订单
*/
@JsonProperty("EBELN")
private String ebeln;
/**
* 订单行项目号
*/
@JsonProperty("EBELP")
private String ebelp;
/**
* 物料编码
*/
@JsonProperty("MATNR")
private String matnr;
/**
* 物料描述
*/
@JsonProperty("MAKTX")
private String txz01;
/**
* 数量
*/
@JsonProperty("MENGE")
private BigDecimal menge;
/**
* 单位
*/
@JsonProperty("MEINS")
private String meins;
/**
* 需求到货日期
*/
@JsonProperty("EEIND")
private String eeind;
/**
* 工厂
*/
@JsonProperty("WERKS")
private String werks;
/**
* 存储地点
*/
@JsonProperty("LGORT")
private String lgort;
/**
* 免费项目
*/
@JsonProperty("UMSON")
private String umson;
/**
* 操作/活动编号
*/
@JsonProperty("VORNR")
private String vornr;
/**
* 收货方
*/
@JsonProperty("WEMPF")
private String wempf;
/**
* 同一工序外发次数
* 自动计数器,匹配条件为“如果之前状态为通过的申请中有相同工单+工序,则计数器+1,起始为1”
*/
@JsonProperty("ABLAD")
private String ablad;
/**
* 单价
*/
@JsonProperty("KBETR")
private BigDecimal kbetr;
/**
* 税码
*/
@JsonProperty("MWSKZ")
private String purchaseMwskz;
/**
* 物料组
*/
@JsonProperty("MATKL")
private String matkl;
/**
* 科目分配类别
*/
@JsonProperty("KNTTP")
private String knttp;
/**
* 条件定价单位
*/
@JsonProperty("KPEIN")
private BigDecimal kpein;
/**
*货币码
*/
@JsonProperty("KOEIN")
private String koein;
}
package com.huigou.topsun.sap.exceptionReport.domain.vo;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.huigou.topsun.sap.processOutsource.domain.vo.ProcessOutsourceItemVo;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class PurchaseOrderVo implements Serializable {
@JsonProperty("ZTYPE")
private String ztype;
/**
* 订单类型
*/
@JsonProperty("BSART")
private String bsart;
/**
* 申请人
*/
@JsonProperty("AFNAM")
private String afnam;
/**
* 公司代码
*/
@JsonProperty("BUKRS")
private String bukrs;
/**
* 采购组织
*/
@JsonProperty("EKORG")
private String ekorg;
/**
* 采购组
*/
@JsonProperty("EKGRP")
private String ekgrp;
/**
* 供应商编码
*/
@JsonProperty("LIFNR")
private String lifnr;
@JsonProperty("ITEM")
private List<PurchaseOrderItemVo> item;
}
package com.huigou.topsun.sap.exceptionReport.repository;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportCash;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportItem;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
/**
* @Auther: lxh
* @Date: 2024/08/20/19:35
* @Description:
*/
public interface ExceptionReportCashRepository extends JpaRepository<ExceptionReportCash,String> {
List<ExceptionReportCash> findByExceptionReportId(String exceptionReportId);
}
package com.huigou.topsun.sap.exceptionReport.repository;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportCash;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportGoods;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
/**
* @Auther: lxh
* @Date: 2024/08/21/19:35
* @Description:
*/
public interface ExceptionReportGoodsRepository extends JpaRepository<ExceptionReportGoods,String> {
List<ExceptionReportGoods> findByExceptionReportId(String exceptionReportId);
}
package com.huigou.topsun.sap.exceptionReport.repository;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportCash;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportPayable;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
/**
* @Auther: lxh
* @Date: 2024/08/21/19:35
* @Description:
*/
public interface ExceptionReportPayableRepository extends JpaRepository<ExceptionReportPayable,String> {
List<ExceptionReportPayable> findByExceptionReportId(String exceptionReportId);
}
...@@ -23,11 +23,29 @@ ...@@ -23,11 +23,29 @@
<condition column="exception_report_id" name="exceptionReportId" type="java.lang.String" symbol="like" alias="t"/> <condition column="exception_report_id" name="exceptionReportId" type="java.lang.String" symbol="like" alias="t"/>
</query> </query>
<query name="exceptionReportDutyPersons" label="品质异常报告" table="sap_exception_duty_person"> <query name="exceptionReportDutyPersons" label="品质异常报告责任人" table="sap_exception_duty_person">
<sql-query> <sql-query>
select t.* from sap_exception_duty_person t select t.* from sap_exception_duty_person t
</sql-query> </sql-query>
<condition column="exception_report_id" name="exceptionReportId" type="java.lang.String" symbol="like" alias="t"/> <condition column="exception_report_id" name="exceptionReportId" type="java.lang.String" symbol="like" alias="t"/>
</query> </query>
<query name="exceptionReportCash" label="品质异常报告现金处理方式" table="sap_exception_report_cash">
<sql-query>
select t.* from sap_exception_report_cash t
</sql-query>
<condition column="exception_report_id" name="exceptionReportId" type="java.lang.String" symbol="like" alias="t"/>
</query>
<query name="exceptionReportPayable" label="品质异常报告扣除应付款处理方式" table="sap_exception_report_payable">
<sql-query>
select t.* from sap_exception_report_payable t
</sql-query>
<condition column="exception_report_id" name="exceptionReportId" type="java.lang.String" symbol="like" alias="t"/>
</query>
<query name="exceptionReportGoods" label="品质异常报告商品赔付处理方式" table="sap_exception_report_goods">
<sql-query>
select t.* from sap_exception_report_goods t
</sql-query>
<condition column="exception_report_id" name="exceptionReportId" type="java.lang.String" symbol="like" alias="t"/>
</query>
</query-mappings> </query-mappings>
\ No newline at end of file
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