Merge branch 'main' of http://162.14.99.253:3000/10539622/2025-03-JS-SDK-svr
This commit is contained in:
commit
e84fc2f3f9
@ -6441,7 +6441,7 @@ public class ToSAPServiceImpl {
|
|||||||
List<Map<String, Object>> qmsDataList = new ArrayList<>();
|
List<Map<String, Object>> qmsDataList = new ArrayList<>();
|
||||||
//依据采购订单,查询待入库的物料(MATERIALPACKING)
|
//依据采购订单,查询待入库的物料(MATERIALPACKING)
|
||||||
String querySql = " SELECT " +
|
String querySql = " SELECT " +
|
||||||
" SUM(DR.DELIVERYNUM) AS MATERIALQUANTITY,\n" +
|
" DR.DELIVERYNUM AS MATERIALQUANTITY,\n" +
|
||||||
" DR.RECEIVEREQUESTNAME,\n" +
|
" DR.RECEIVEREQUESTNAME,\n" +
|
||||||
" DR.RECEIVEREQUESTDETAILNAME,\n" +
|
" DR.RECEIVEREQUESTDETAILNAME,\n" +
|
||||||
" P.ERPLOCATION,\n" +
|
" P.ERPLOCATION,\n" +
|
||||||
@ -6486,7 +6486,7 @@ public class ToSAPServiceImpl {
|
|||||||
"\t\t,P.OQARESULT, P.OQARESULTSTATE, P.UNIT, P.FUNIT, P.REMARK, P.SUPPLIERNAME\n" +
|
"\t\t,P.OQARESULT, P.OQARESULTSTATE, P.UNIT, P.FUNIT, P.REMARK, P.SUPPLIERNAME\n" +
|
||||||
"\t\t,P.ERPFACTORY, P.ERPLOCATION, BF.IQCFLAG, R.RECEIVEREQUESTTYPE\n" +
|
"\t\t,P.ERPFACTORY, P.ERPLOCATION, BF.IQCFLAG, R.RECEIVEREQUESTTYPE\n" +
|
||||||
"\t\t,EL.DESCRIPTION, SP.SUPPLIERNO,SP.SUPPLIERNAME,MP.MATERIALSPECNAME\n" +
|
"\t\t,EL.DESCRIPTION, SP.SUPPLIERNO,SP.SUPPLIERNAME,MP.MATERIALSPECNAME\n" +
|
||||||
"\t\t,MP.DESC_CN, MP.MATERIALGROUP, P.LOCATIONNAME, P.RECEIVETIME,P.TRUEGG ";
|
"\t\t,MP.DESC_CN, MP.MATERIALGROUP, P.LOCATIONNAME, P.RECEIVETIME,P.TRUEGG,DR.DELIVERYNUM ";
|
||||||
Map<String, Object> hashMap = new HashMap<String, Object>();
|
Map<String, Object> hashMap = new HashMap<String, Object>();
|
||||||
hashMap.put("DELIVERYNAME", deliveryName);
|
hashMap.put("DELIVERYNAME", deliveryName);
|
||||||
hashMap.put("SITENAME", siteName);
|
hashMap.put("SITENAME", siteName);
|
||||||
|
@ -174,7 +174,9 @@ public class DeliveryController {
|
|||||||
if (deliveryType.equals(DeliveryTypeEnums.BATCH.getCode())) {
|
if (deliveryType.equals(DeliveryTypeEnums.BATCH.getCode())) {
|
||||||
// 批次
|
// 批次
|
||||||
return AjaxResult.me().setSuccess(true).setResultObj(
|
return AjaxResult.me().setSuccess(true).setResultObj(
|
||||||
deliveryService.getStoreDetail(storeDetailDto.getDocumentName(), storeDetailDto.getSiteName(), nameList, deliveryName));
|
deliveryService.getDeliveryStoreDetail(storeDetailDto.getDocumentName(), storeDetailDto.getSiteName(), nameList, deliveryName));
|
||||||
|
/*return AjaxResult.me().setSuccess(true).setResultObj(
|
||||||
|
deliveryService.getStoreDetail(storeDetailDto.getDocumentName(), storeDetailDto.getSiteName(), nameList, deliveryName));*/
|
||||||
} else {
|
} else {
|
||||||
// 辅材
|
// 辅材
|
||||||
return AjaxResult.me().setSuccess(true).setResultObj(
|
return AjaxResult.me().setSuccess(true).setResultObj(
|
||||||
|
@ -33,6 +33,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
@ -662,8 +663,8 @@ public class MaterialReceiveActController {
|
|||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return AjaxResult.me().setErrorCode(400).setMessage(e.toString());
|
return AjaxResult.me().setErrorCode(400).setMessage(e.toString()).setSuccess(false);
|
||||||
}
|
}
|
||||||
return AjaxResult.me().setSuccess(true);
|
return AjaxResult.me().setSuccess(true).setErrorCode(200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2303,7 +2303,12 @@ public class SAPToWMSController {
|
|||||||
@ApiOperation(value = "物料消耗")
|
@ApiOperation(value = "物料消耗")
|
||||||
@RequestMapping("/sapwms_materialconsume_request")
|
@RequestMapping("/sapwms_materialconsume_request")
|
||||||
public WMSToSAPReturn sapMaterialConsume_Request(HttpServletRequest httpRequest, @RequestBody SAPToWMSRequest request) {
|
public WMSToSAPReturn sapMaterialConsume_Request(HttpServletRequest httpRequest, @RequestBody SAPToWMSRequest request) {
|
||||||
Map<String,Object> head = request.getHEAD();
|
//Map<String,Object> head = request.getHEAD();
|
||||||
|
Map<String,Object> head = new HashMap<>();
|
||||||
|
head.put("INTF_ID",request.getHEAD().get("INTFID"));
|
||||||
|
head.put("SRC_SYSTEM",request.getHEAD().get("SRCMSGID"));
|
||||||
|
head.put("DEST_SYSTEM","WMS");
|
||||||
|
head.put("SRC_MSGID","PP103");
|
||||||
//开启事务
|
//开启事务
|
||||||
IDMFrameServiceProxy.getTransactionManager().beginTransaction();
|
IDMFrameServiceProxy.getTransactionManager().beginTransaction();
|
||||||
try {
|
try {
|
||||||
|
@ -136,4 +136,20 @@ public interface DeliveryDao {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int editDelivery(@Param("dto") DeliveryEditDto deliveryEditDto);
|
int editDelivery(@Param("dto") DeliveryEditDto deliveryEditDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据到货单获取入库详情
|
||||||
|
*/
|
||||||
|
@MapKey("storeDetail")
|
||||||
|
List<Map<String, Object>> getDeliveryStoreDetail(@Param("siteName") String siteName,
|
||||||
|
@Param("nameList") List<String> nameList,
|
||||||
|
@Param("typeList") List<String> typeList,
|
||||||
|
@Param("deliveryName") String deliveryName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取入库批次
|
||||||
|
*/
|
||||||
|
@MapKey("storeCharge")
|
||||||
|
List<Map<String, Object>> getStoreChargeSort(@Param("siteName") String siteName,
|
||||||
|
@Param("documentName") String documentName);
|
||||||
}
|
}
|
||||||
|
@ -117,4 +117,14 @@ public interface IDeliveryService {
|
|||||||
*/
|
*/
|
||||||
int editDelivery(DeliveryEditDto deliveryEditDto);
|
int editDelivery(DeliveryEditDto deliveryEditDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取采购单明细及批次
|
||||||
|
* @param documentName 单据名称
|
||||||
|
* @param siteName 组织
|
||||||
|
* @param nameList 名称
|
||||||
|
* @param deliveryName 到库单号
|
||||||
|
* @return 采购订单
|
||||||
|
*/
|
||||||
|
ReceiveDetailVo getDeliveryStoreDetail(String documentName, String siteName, List<String> nameList, String deliveryName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -142,4 +142,17 @@ public class DeliveryServiceImpl implements IDeliveryService {
|
|||||||
public int editDelivery(DeliveryEditDto deliveryEditDto) {
|
public int editDelivery(DeliveryEditDto deliveryEditDto) {
|
||||||
return deliveryDao.editDelivery(deliveryEditDto);
|
return deliveryDao.editDelivery(deliveryEditDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReceiveDetailVo getDeliveryStoreDetail(String documentName, String siteName, List<String> nameList, String deliveryName) {
|
||||||
|
ReceiveDetailVo receiveDetailVo = new ReceiveDetailVo();
|
||||||
|
// 采购单明细
|
||||||
|
//List<Map<String, Object>> storeDetail = deliveryDao.getStoreDetail(siteName, nameList, ReceiveTypeEnums.getPurchase(), deliveryName);
|
||||||
|
List<Map<String, Object>> storeDetail = deliveryDao.getDeliveryStoreDetail(siteName, nameList, ReceiveTypeEnums.getPurchase(), deliveryName);
|
||||||
|
receiveDetailVo.setStoreDetail(storeDetail);
|
||||||
|
// 批次
|
||||||
|
List<Map<String, Object>> storeCharge = deliveryDao.getStoreChargeSort(siteName, documentName);
|
||||||
|
receiveDetailVo.setStoreCharge(storeCharge);
|
||||||
|
return receiveDetailVo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ public class MESToWMSServiceImpl implements MESToWMSService {
|
|||||||
errorCode = stringObjectMap.get("V_RETURN_CODE").toString();
|
errorCode = stringObjectMap.get("V_RETURN_CODE").toString();
|
||||||
String vReturnMessage = stringObjectMap.get("V_RETURN_MESSAGE").toString();
|
String vReturnMessage = stringObjectMap.get("V_RETURN_MESSAGE").toString();
|
||||||
log.error("MES_CONSUME返回错误码:" + errorCode + ",错误信息:" + vReturnMessage);
|
log.error("MES_CONSUME返回错误码:" + errorCode + ",错误信息:" + vReturnMessage);
|
||||||
result = AjaxResult.me().setErrorCode(Integer.parseInt(errorCode)).setMessage(vReturnMessage);
|
result = AjaxResult.me().setSuccess(false).setErrorCode(400).setMessage(vReturnMessage);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -428,7 +428,7 @@ public class ProductIntoServiceImpl implements FGStockInService {
|
|||||||
MaterialSpecKey materialSpecKey = new MaterialSpecKey();
|
MaterialSpecKey materialSpecKey = new MaterialSpecKey();
|
||||||
materialSpecKey.setMaterialSpecName(materialSpecName);
|
materialSpecKey.setMaterialSpecName(materialSpecName);
|
||||||
materialSpecKey.setSiteName(siteName);
|
materialSpecKey.setSiteName(siteName);
|
||||||
String is_oven = "N";
|
String is_oven = "";
|
||||||
materialSpec = MaterialServiceProxy.getMaterialSpecService()
|
materialSpec = MaterialServiceProxy.getMaterialSpecService()
|
||||||
.selectByKey(materialSpecKey);
|
.selectByKey(materialSpecKey);
|
||||||
String maturationflag = materialSpec.getMATURATIONFLAG();//熟化标识
|
String maturationflag = materialSpec.getMATURATIONFLAG();//熟化标识
|
||||||
@ -458,17 +458,17 @@ public class ProductIntoServiceImpl implements FGStockInService {
|
|||||||
throw new RuntimeException("仓库与货位对应关系不正确");
|
throw new RuntimeException("仓库与货位对应关系不正确");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String ckhw = "Y".equals(const_temp) ? "恒温恒湿" : "非恒温恒湿";
|
String ckhw = "02".equals(const_temp) ? "恒温恒湿" : "非恒温恒湿";
|
||||||
String wlhw = "01".equals(is_CON_TEMP) ? "恒温恒湿" : "非恒温恒湿";
|
String wlhw = "02".equals(is_CON_TEMP) ? "恒温恒湿" : "非恒温恒湿";
|
||||||
|
|
||||||
|
|
||||||
String cksh = "Y".equals(is_oven) ? "熟化" : "非熟化";
|
String cksh = "03".equals(is_oven) || "04".equals(is_oven) ? "熟化" : "非熟化";
|
||||||
String wlsh = "01".equals(maturationflag) ? "熟化" : "非熟化";
|
String wlsh = "03".equals(maturationflag) || "04".equals(maturationflag) ? "熟化" : "非熟化";
|
||||||
//物料非熟化 不能进熟化仓
|
//物料非熟化 不能进熟化仓
|
||||||
if ("01".equals(maturationflag)) {
|
if ("03".equals(maturationflag) || "04".equals(maturationflag)) {
|
||||||
|
|
||||||
} else { //非熟化逻辑
|
} else { //非熟化逻辑
|
||||||
if ("Y".equals(is_oven)) {
|
if ("03".equals(is_oven) || "04".equals(is_oven)) {
|
||||||
throw new RuntimeException("仓库" + cksh + "; 物料" + wlsh);
|
throw new RuntimeException("仓库" + cksh + "; 物料" + wlsh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -476,14 +476,14 @@ public class ProductIntoServiceImpl implements FGStockInService {
|
|||||||
//物料恒温 只能进恒温仓或熟化仓 2024.11
|
//物料恒温 只能进恒温仓或熟化仓 2024.11
|
||||||
String packingGrade = queryForList.get(0).get("PACKINGGRADE") == null ? "" : queryForList.get(0).get("PACKINGGRADE").toString();
|
String packingGrade = queryForList.get(0).get("PACKINGGRADE") == null ? "" : queryForList.get(0).get("PACKINGGRADE").toString();
|
||||||
if (!"NG".equals(packingGrade)) {
|
if (!"NG".equals(packingGrade)) {
|
||||||
if ("01".equals(is_CON_TEMP)) {
|
if ("02".equals(is_CON_TEMP)) {
|
||||||
if ("Y".equals(const_temp) || "Y".equals(is_oven)) {
|
if ("02".equals(const_temp) || "03".equals(is_oven) || "04".equals(is_oven)) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException("仓库" + ckhw + "; 物料" + wlhw);
|
throw new RuntimeException("仓库" + ckhw + "; 物料" + wlhw);
|
||||||
}
|
}
|
||||||
} else { //物料非恒温 不能进恒温仓
|
} else { //物料非恒温 不能进恒温仓
|
||||||
if ("Y".equals(const_temp)) {
|
if ("02".equals(const_temp)) {
|
||||||
throw new RuntimeException("仓库" + ckhw + "; 物料" + wlhw);
|
throw new RuntimeException("仓库" + ckhw + "; 物料" + wlhw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -555,7 +555,7 @@ public class ProductIntoServiceImpl implements FGStockInService {
|
|||||||
bindMap.put("SALESPERSON", queryForList.get(0).get("SALESPERSON"));//事业部
|
bindMap.put("SALESPERSON", queryForList.get(0).get("SALESPERSON"));//事业部
|
||||||
bindMap.put("MJPC", queryForList.get(0).get("MJPC"));//母卷批次
|
bindMap.put("MJPC", queryForList.get(0).get("MJPC"));//母卷批次
|
||||||
bindMap.put("remark", queryForList.get(0).get("REMARK"));//备注
|
bindMap.put("remark", queryForList.get(0).get("REMARK"));//备注
|
||||||
if("Y".equals(is_oven)) {
|
if("03".equals(is_oven) || "04".equals(is_oven)) {
|
||||||
bindMap.put("MATURATIONINTIME", eventInfo.getEventTime());//熟化入库时间
|
bindMap.put("MATURATIONINTIME", eventInfo.getEventTime());//熟化入库时间
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -645,7 +645,7 @@ public class ProductIntoServiceImpl implements FGStockInService {
|
|||||||
MaterialSpecKey materialSpecKey = new MaterialSpecKey();
|
MaterialSpecKey materialSpecKey = new MaterialSpecKey();
|
||||||
materialSpecKey.setMaterialSpecName(materialSpecName);
|
materialSpecKey.setMaterialSpecName(materialSpecName);
|
||||||
materialSpecKey.setSiteName(siteName);
|
materialSpecKey.setSiteName(siteName);
|
||||||
String is_oven = "N";
|
String is_oven = "";
|
||||||
materialSpec = MaterialServiceProxy.getMaterialSpecService()
|
materialSpec = MaterialServiceProxy.getMaterialSpecService()
|
||||||
.selectByKey(materialSpecKey);
|
.selectByKey(materialSpecKey);
|
||||||
String maturationflag = materialSpec.getMATURATIONFLAG();//熟化标识
|
String maturationflag = materialSpec.getMATURATIONFLAG();//熟化标识
|
||||||
@ -774,7 +774,7 @@ public class ProductIntoServiceImpl implements FGStockInService {
|
|||||||
bindMap.put("remark", queryForList.get(0).get("REMARK"));//备注
|
bindMap.put("remark", queryForList.get(0).get("REMARK"));//备注
|
||||||
bindMap.put("materialPackingType", "Box");
|
bindMap.put("materialPackingType", "Box");
|
||||||
|
|
||||||
if("Y".equals(is_oven)) {
|
if("03".equals(is_oven) || "04".equals(is_oven)) {
|
||||||
bindMap.put("MATURATIONINTIME", eventInfo.getEventTime());//熟化入库时间
|
bindMap.put("MATURATIONINTIME", eventInfo.getEventTime());//熟化入库时间
|
||||||
}
|
}
|
||||||
String saleShipRequestName = queryForList.get(0).get("SALESHIPREQUESTNAME") == null ? "" : queryForList.get(0).get("SALESHIPREQUESTNAME").toString();
|
String saleShipRequestName = queryForList.get(0).get("SALESHIPREQUESTNAME") == null ? "" : queryForList.get(0).get("SALESHIPREQUESTNAME").toString();
|
||||||
|
@ -127,7 +127,7 @@ public class CommonUtils {
|
|||||||
*/
|
*/
|
||||||
public Boolean JudgeMentERPLocationAndMaterialSpec(String ERPLOcxation,String materialSpec)
|
public Boolean JudgeMentERPLocationAndMaterialSpec(String ERPLOcxation,String materialSpec)
|
||||||
{
|
{
|
||||||
String DetailSql = "SELECT IS_CON_TEMP FROM MATERIALSPEC m WHERE MATERIALSPECNAME =:MATERIALSPECNAME AND IS_CON_TEMP='01' ";
|
String DetailSql = "SELECT IS_CON_TEMP FROM MATERIALSPEC m WHERE MATERIALSPECNAME =:MATERIALSPECNAME AND IS_CON_TEMP='02' ";
|
||||||
Map<String, Object> DetailMap = new HashMap<String, Object>();
|
Map<String, Object> DetailMap = new HashMap<String, Object>();
|
||||||
DetailMap.put("MATERIALSPECNAME",materialSpec );
|
DetailMap.put("MATERIALSPECNAME",materialSpec );
|
||||||
List<Map<String,Object>> ShipDetaillist = IDMFrameServiceProxy.getSqlTemplate().queryForList(DetailSql, DetailMap);
|
List<Map<String,Object>> ShipDetaillist = IDMFrameServiceProxy.getSqlTemplate().queryForList(DetailSql, DetailMap);
|
||||||
|
@ -360,4 +360,145 @@
|
|||||||
UPDATE MATERIALDELIVERY SET DELIVERYSTATE = #{dto.deliveryState}
|
UPDATE MATERIALDELIVERY SET DELIVERYSTATE = #{dto.deliveryState}
|
||||||
WHERE SITENAME = #{dto.siteName} AND DELIVERYNAME = #{dto.deliveryName}
|
WHERE SITENAME = #{dto.siteName} AND DELIVERYNAME = #{dto.deliveryName}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="getDeliveryStoreDetail" resultType="map">
|
||||||
|
WITH
|
||||||
|
AA AS (
|
||||||
|
SELECT
|
||||||
|
m5.RECEIVEREQUESTNAME,
|
||||||
|
m5.MATERIALSPECNAME,
|
||||||
|
SUM( m5.MATERIALQUANTITY ) QTY
|
||||||
|
FROM
|
||||||
|
MATERIALPACKING m5
|
||||||
|
WHERE
|
||||||
|
m5.STOCKSTATE IN ( 'Stocked', 'StockOut' )
|
||||||
|
AND m5.RECEIVEREQUESTNAME IN ( #{deliveryName} )
|
||||||
|
GROUP BY
|
||||||
|
m5.MATERIALSPECNAME,
|
||||||
|
m5.RECEIVEREQUESTNAME
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
BB AS (
|
||||||
|
SELECT
|
||||||
|
m5.RECEIVEREQUESTNAME,
|
||||||
|
m5.MATERIALSPECNAME,
|
||||||
|
SUM( m5.MATERIALQUANTITY ) QTY
|
||||||
|
FROM
|
||||||
|
MATERIALPACKING m5
|
||||||
|
WHERE
|
||||||
|
m5.STOCKSTATE = 'Created'
|
||||||
|
AND m5.RECEIVEREQUESTNAME IN ( #{deliveryName} )
|
||||||
|
GROUP BY
|
||||||
|
m5.MATERIALSPECNAME,
|
||||||
|
m5.RECEIVEREQUESTNAME
|
||||||
|
),
|
||||||
|
|
||||||
|
CC AS (
|
||||||
|
SELECT
|
||||||
|
m5.DELIVERYNAME RECEIVEREQUESTNAME,
|
||||||
|
m5.MATERIALSPECNAME ,
|
||||||
|
SUM( m5.DELIVERYNUM ) QTY
|
||||||
|
FROM
|
||||||
|
MATERIALDELIVERYRECEIVE m5
|
||||||
|
WHERE
|
||||||
|
m5.DELIVERYNAME IN ( #{deliveryName} )
|
||||||
|
GROUP BY
|
||||||
|
m5.DELIVERYNAME,
|
||||||
|
m5.MATERIALSPECNAME
|
||||||
|
),
|
||||||
|
|
||||||
|
DELIVERY AS (
|
||||||
|
SELECT DISTINCT DELIVERYNAME, md.MATERIALSPECNAME,
|
||||||
|
TO_CHAR( SYSDATE, 'YYYY-MM-DD' ) RECEIVETIME,
|
||||||
|
TO_CHAR( SYSDATE, 'YYYY-MM-DD' ) MAKEDATE,
|
||||||
|
'1' RECEIVEREQUESTDETAILNAME,
|
||||||
|
m.SITENAME,
|
||||||
|
m.ERPLOCATION,
|
||||||
|
m.LOCATIONNAME,
|
||||||
|
m.MATERIALUNIT,
|
||||||
|
m.SDK_ID,
|
||||||
|
m.REMARK REMARK,
|
||||||
|
m.SALESMAN SALESPERSON,
|
||||||
|
m.SALESASSISTANT CAREER_ASSISTANCE,
|
||||||
|
m.BUSINESSDIVISION BUSINESS_UNIT,
|
||||||
|
COALESCE( m2.STOCKORGNO, m.ERPFACTORY ) AS ERPFACTORY,
|
||||||
|
m2.SUPPLIERNO,
|
||||||
|
--m.POCATEGORY,
|
||||||
|
m3.WIDTH AS DESCRIPTION,
|
||||||
|
m3.MATERIALUNITDESC,
|
||||||
|
m3.WIDTH SPECNAME,
|
||||||
|
m3.PHASE,
|
||||||
|
m3.DESC_CN,
|
||||||
|
DECODE( m3.IS_BATCH, 'Y', '是', '否' ) IS_BATCH,
|
||||||
|
CASE WHEN m3.EXPIRATION_RULES = '0' THEN
|
||||||
|
'入厂保质期'
|
||||||
|
WHEN m3.EXPIRATION_RULES = '1' THEN
|
||||||
|
'出厂保质期' ELSE '未定义'
|
||||||
|
END AS REPLACED_VALUE,
|
||||||
|
DECODE( m4.IQCFLAG, 'Y', '是', '否' ) IQCFLAG,
|
||||||
|
be.DESCRIPTION AS ERPLOCATION2,
|
||||||
|
o.ORGNAME AS ERPFACTORY2,
|
||||||
|
sss.DESCRIPTION AS LOCATIONNAME2 FROM MATERIALDELIVERYRECEIVE md
|
||||||
|
LEFT JOIN MATERIALRECEIVEREQUEST m2 ON md.RECEIVEREQUESTNAME = m2.RECEIVEREQUESTNAME
|
||||||
|
LEFT JOIN MATERIALRECEIVEREQUESTDETAIL m ON md.RECEIVEREQUESTNAME = m.RECEIVEREQUESTNAME
|
||||||
|
AND md.RECEIVEREQUESTDETAILNAME = m.RECEIVEREQUESTDETAILNAME
|
||||||
|
LEFT JOIN MATERIALSPEC m3 ON md.MATERIALSPECNAME = m3.MATERIALSPECNAME
|
||||||
|
LEFT JOIN BS_MATERIALFACTORY m4 ON m3.MATERIALSPECNAME = m4.MATERIALSPECNAME AND m2.ERPFACTORY = m4.ERPFACTORY
|
||||||
|
LEFT JOIN BS_ERPLOCATION be ON m.ERPLOCATION = be.ERPLOCATIONNAME
|
||||||
|
LEFT JOIN ORG o ON m2.STOCKORGNO = o.ORGNO
|
||||||
|
LEFT JOIN STORAGESPEC sss ON m.LOCATIONNAME = sss.STORAGENAME
|
||||||
|
WHERE md.DELIVERYNAME = #{deliveryName})
|
||||||
|
|
||||||
|
SELECT M.DELIVERYNAME, M.MATERIALSPECNAME,
|
||||||
|
M.RECEIVETIME,
|
||||||
|
M.MAKEDATE,
|
||||||
|
M.RECEIVEREQUESTDETAILNAME,
|
||||||
|
M.SITENAME,
|
||||||
|
M.ERPLOCATION,
|
||||||
|
M.LOCATIONNAME,
|
||||||
|
M.MATERIALUNIT,
|
||||||
|
M.SDK_ID,
|
||||||
|
M.REMARK,
|
||||||
|
M.SALESPERSON,
|
||||||
|
M.CAREER_ASSISTANCE,
|
||||||
|
M.BUSINESS_UNIT,
|
||||||
|
M.ERPFACTORY,
|
||||||
|
M.SUPPLIERNO,
|
||||||
|
M.DESCRIPTION,
|
||||||
|
M.MATERIALUNITDESC,
|
||||||
|
M.SPECNAME,
|
||||||
|
M.PHASE,
|
||||||
|
M.DESC_CN,
|
||||||
|
M.IS_BATCH,
|
||||||
|
M.REPLACED_VALUE,
|
||||||
|
M.IQCFLAG,
|
||||||
|
M.ERPLOCATION2,
|
||||||
|
M.ERPFACTORY2,
|
||||||
|
M.LOCATIONNAME2,AA.QTY RECEIVEDQUANTITY2,BB.QTY RECEIVEDQUANTITY, CC.QTY REQUESTQUANTITY, (CC.QTY - BB.QTY) MINUSQTY, AA.QTY STOCKINQTY, BB.QTY CREATEQTY FROM DELIVERY M
|
||||||
|
LEFT JOIN AA ON M.DELIVERYNAME = AA.RECEIVEREQUESTNAME AND M.MATERIALSPECNAME = AA.MATERIALSPECNAME
|
||||||
|
LEFT JOIN BB ON M.DELIVERYNAME = BB.RECEIVEREQUESTNAME AND M.MATERIALSPECNAME = BB.MATERIALSPECNAME
|
||||||
|
LEFT JOIN CC ON M.DELIVERYNAME = CC.RECEIVEREQUESTNAME AND M.MATERIALSPECNAME = CC.MATERIALSPECNAME
|
||||||
|
WHERE M.DELIVERYNAME = #{deliveryName}
|
||||||
|
</select>
|
||||||
|
<select id="getStoreChargeSort" resultType="map">
|
||||||
|
SELECT ROWNUM SEQ, TTT.*
|
||||||
|
FROM (
|
||||||
|
SELECT A.RECEIVEREQUESTNAME, A.SITENAME, A.MATERIALPACKINGNAME, A.MATERIALSPECNAME, A.ERPLOCATION, A.ERPFACTORY,
|
||||||
|
A.LOCATIONNAME, A.CHARGE, A.REMARK, B.DESC_CN, B.DESCRIPTION, A.SDK_ID, SS.SPECNAME, A.PHASE,
|
||||||
|
A.MATERIALQUANTITY, M.FNAME UNIT, BE.DESCRIPTION ERPLOCATIONDESC, S.DESCRIPTION LOCATIONNAMEDESC,
|
||||||
|
A.ERPFACTORY ERPFACTROY, o.ORGNAME ERPFACTROYDESC, A.SUPPLIERNAME SUPPLIERNO
|
||||||
|
FROM MATERIALPACKING A
|
||||||
|
LEFT JOIN MATERIALSPEC B ON A.MATERIALSPECNAME = B.MATERIALSPECNAME
|
||||||
|
LEFT JOIN SDK_SPEC SS ON A.SDK_ID = SS.SDK_ID
|
||||||
|
LEFT JOIN BS_ERPLOCATION BE ON BE.ERPLOCATIONNAME = A.ERPLOCATION
|
||||||
|
LEFT JOIN STORAGESPEC S ON S.STORAGENAME = A.LOCATIONNAME
|
||||||
|
LEFT JOIN ORG o ON o.ORGNO = A.ERPFACTORY
|
||||||
|
LEFT JOIN MATERIALUNIT M ON M.FNUMBER = A.UNIT
|
||||||
|
WHERE A.SITENAME = #{siteName}
|
||||||
|
AND A.RECEIVEREQUESTNAME = #{documentName}
|
||||||
|
AND A.STOCKSTATE = 'Created'
|
||||||
|
ORDER BY A.CHARGE
|
||||||
|
) TTT
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
@ -30,6 +30,7 @@
|
|||||||
AND a.ERPLOCATION = #{dto.erpLocation}
|
AND a.ERPLOCATION = #{dto.erpLocation}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
ORDER BY a.ERPLOCATION,a.STORAGENAME
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="get" resultType="com.cim.idm.model.po.storage.StorageSpec">
|
<select id="get" resultType="com.cim.idm.model.po.storage.StorageSpec">
|
||||||
|
@ -140,7 +140,7 @@ public class MaterialPackingServiceImpl extends
|
|||||||
// EveryBoxQuantity1 = (float) (tempV / 100.00);
|
// EveryBoxQuantity1 = (float) (tempV / 100.00);
|
||||||
// float num=(float)(Math.round(totalPrice*100)/100)
|
// float num=(float)(Math.round(totalPrice*100)/100)
|
||||||
// }
|
// }
|
||||||
String is_oven = "N";
|
String is_oven = "";
|
||||||
MaterialSpec materialSpec = new MaterialSpec();
|
MaterialSpec materialSpec = new MaterialSpec();
|
||||||
MaterialSpecKey materialSpecKey = new MaterialSpecKey();
|
MaterialSpecKey materialSpecKey = new MaterialSpecKey();
|
||||||
materialSpecKey.setMaterialSpecName(materialSpecName);
|
materialSpecKey.setMaterialSpecName(materialSpecName);
|
||||||
@ -251,7 +251,7 @@ public class MaterialPackingServiceImpl extends
|
|||||||
// bindMap.put("fqty", fqty);
|
// bindMap.put("fqty", fqty);
|
||||||
bindMap.put("truegg", truegg);
|
bindMap.put("truegg", truegg);
|
||||||
bindMap.put("remark", remark);
|
bindMap.put("remark", remark);
|
||||||
if("Y".equals(is_oven)) {
|
if("03".equals(is_oven) || "04".equals(is_oven)) {
|
||||||
bindMap.put("MATURATIONINTIME", eventInfo.getEventTime());
|
bindMap.put("MATURATIONINTIME", eventInfo.getEventTime());
|
||||||
}
|
}
|
||||||
// bindMap.put("receiveRequestName", shipRequestName);
|
// bindMap.put("receiveRequestName", shipRequestName);
|
||||||
@ -6537,7 +6537,7 @@ public void updateComplete(EventInfo eventInfo,String siteName,String invoiceNo,
|
|||||||
EveryBoxQuantity1 = (BigDecimal) (tempV.divide(new BigDecimal(100.00)));
|
EveryBoxQuantity1 = (BigDecimal) (tempV.divide(new BigDecimal(100.00)));
|
||||||
// float num=(float)(Math.round(totalPrice*100)/100)
|
// float num=(float)(Math.round(totalPrice*100)/100)
|
||||||
}
|
}
|
||||||
String is_oven = "N";
|
String is_oven = "";
|
||||||
MaterialSpec materialSpec = new MaterialSpec();
|
MaterialSpec materialSpec = new MaterialSpec();
|
||||||
MaterialSpecKey materialSpecKey = new MaterialSpecKey();
|
MaterialSpecKey materialSpecKey = new MaterialSpecKey();
|
||||||
materialSpecKey.setMaterialSpecName(materialSpecName);
|
materialSpecKey.setMaterialSpecName(materialSpecName);
|
||||||
@ -6572,12 +6572,12 @@ public void updateComplete(EventInfo eventInfo,String siteName,String invoiceNo,
|
|||||||
throw new RuntimeException("仓库与货位对应关系不正确");
|
throw new RuntimeException("仓库与货位对应关系不正确");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String ckhw = "Y".equals(const_temp) ? "恒温恒湿" : "非恒温恒湿";
|
String ckhw = "02".equals(const_temp) ? "恒温恒湿" : "非恒温恒湿";
|
||||||
String wlhw = "01".equals(is_CON_TEMP) ? "恒温恒湿" : "非恒温恒湿";
|
String wlhw = "02".equals(is_CON_TEMP) ? "恒温恒湿" : "非恒温恒湿";
|
||||||
|
|
||||||
|
|
||||||
String cksh = "Y".equals(is_oven) ? "熟化" : "非熟化";
|
String cksh = "03".equals(is_oven) || "04".equals(is_oven) ? "熟化" : "非熟化";
|
||||||
String wlsh = "01".equals(maturationflag) ? "熟化" : "非熟化";
|
String wlsh = "03".equals(maturationflag) || "04".equals(maturationflag) ? "熟化" : "非熟化";
|
||||||
// if (!const_temp.equals(is_CON_TEMP)) {
|
// if (!const_temp.equals(is_CON_TEMP)) {
|
||||||
// throw new RuntimeException("仓库" + ckhw + "; 物料" + wlhw);
|
// throw new RuntimeException("仓库" + ckhw + "; 物料" + wlhw);
|
||||||
// }
|
// }
|
||||||
@ -6646,7 +6646,7 @@ public void updateComplete(EventInfo eventInfo,String siteName,String invoiceNo,
|
|||||||
bindMap.put("SALESPERSON", SALESPERSON);
|
bindMap.put("SALESPERSON", SALESPERSON);
|
||||||
bindMap.put("CAREER_ASSISTANCE", CAREER_ASSISTANCE);
|
bindMap.put("CAREER_ASSISTANCE", CAREER_ASSISTANCE);
|
||||||
bindMap.put("BUSINESS_UNIT", BUSINESS_UNIT);
|
bindMap.put("BUSINESS_UNIT", BUSINESS_UNIT);
|
||||||
if("Y".equals(is_oven)) {
|
if("03".equals(is_oven) || "04".equals(is_oven)) {
|
||||||
bindMap.put("MATURATIONINTIME", eventInfo.getEventTime());
|
bindMap.put("MATURATIONINTIME", eventInfo.getEventTime());
|
||||||
}
|
}
|
||||||
// bindMap.put("receiveRequestName", shipRequestName);
|
// bindMap.put("receiveRequestName", shipRequestName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user