Merge branch 'main' of http://162.14.99.253:3000/10539622/2025-03-JS-SDK-svr
This commit is contained in:
commit
86293b4a06
@ -477,7 +477,50 @@ public class QMSServiceImpl implements QMSService{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String sendToIQCByDataList(String opCode, List<Map<String, Object>> list) throws CustomException {
|
public String sendToIQCByDataList(String opCode, String siteName, String deliveryName) throws CustomException {
|
||||||
|
String sql = " \n" +
|
||||||
|
"SELECT \n" +
|
||||||
|
"\t\tP.SITENAME,\n" +
|
||||||
|
" \t\tEL.DESCRIPTION AS ERPLOCATIONDESC,\n" +
|
||||||
|
"\t\tP.LOCATIONNAME,\t\n" +
|
||||||
|
"\t\tTO_CHAR(P.RECEIVETIME ,'YYYY-MM-DD' ) deliveryDate,\n" +
|
||||||
|
"\t\tDR.RECEIVEREQUESTNAME,\n" +
|
||||||
|
"\t\tP.MATERIALSPECNAME AS materialCode,\n" +
|
||||||
|
"\t\tMP.DESC_CN AS materialName,\n" +
|
||||||
|
"\t\tMP.MATERIALGROUP AS materialGroup,\n" +
|
||||||
|
"\t\tCOUNT(DISTINCT P.CHARGE ) batchQuantity,\n" +
|
||||||
|
" P.UNIT AS quantityUnit,\n" +
|
||||||
|
"\t\tSP.SUPPLIERNO AS SUPPLIERCODE,\n" +
|
||||||
|
"\t\tSP.SUPPLIERNAME,\n" +
|
||||||
|
"\t\tLISTAGG(DISTINCT P.CHARGE , ';') WITHIN GROUP (ORDER BY P.CHARGE) AS LOTS\n" +
|
||||||
|
"\t\t\tFROM\n" +
|
||||||
|
" MATERIALPACKING P \n" +
|
||||||
|
"LEFT JOIN SUPPLIER SP\tON SP.SUPPLIERNO = P.SUPPLIERNAME\n" +
|
||||||
|
"LEFT JOIN BS_ERPLOCATION EL ON EL.ERPLOCATIONNAME = P.ERPLOCATION AND EL.SITENAME = P.SITENAME\n" +
|
||||||
|
"LEFT JOIN MATERIALSPEC MP ON MP.MATERIALSPECNAME = P.MATERIALSPECNAME AND MP.SITENAME = P.SITENAME\n" +
|
||||||
|
"LEFT JOIN BS_MATERIALFACTORY BF ON BF.MATERIALSPECNAME = P.MATERIALSPECNAME AND BF.ERPFACTORY = P.ERPFACTORY\n" +
|
||||||
|
"LEFT JOIN MATERIALRECEIVEREQUESTDETAIL RD ON P.SITENAME = RD.SITENAME \n" +
|
||||||
|
"LEFT JOIN MATERIALRECEIVEREQUEST R ON RD.RECEIVEREQUESTNAME = R.RECEIVEREQUESTNAME AND RD.SITENAME = R.SITENAME\n" +
|
||||||
|
"LEFT JOIN MATERIALDELIVERYRECEIVE DR ON R.RECEIVEREQUESTNAME=DR.RECEIVEREQUESTNAME \n" +
|
||||||
|
"LEFT JOIN MATERIALDELIVERY D ON DR.DELIVERYNAME = D.DELIVERYNAME WHERE\n" +
|
||||||
|
" D.SITENAME =:SITENAME\n" +
|
||||||
|
" AND D.DELIVERYNAME =:DELIVERYNAME\n" +
|
||||||
|
" AND D.DELIVERYSTATE = '02'\n" +
|
||||||
|
"\t\tAND DR.MATERIALSPECNAME=RD.MATERIALSPECNAME\n" +
|
||||||
|
"\t\tAND RD.RECEIVEREQUESTDETAILNAME=DR.RECEIVEREQUESTDETAILNAME\n" +
|
||||||
|
"\t\tAND P.RECEIVEREQUESTNAME = DR.DELIVERYNAME \n" +
|
||||||
|
"\t\tAND P.MATERIALSPECNAME = DR.MATERIALSPECNAME AND P.STOCKSTATE = 'Created' \n" +
|
||||||
|
"\t\tGROUP BY \n" +
|
||||||
|
"\t\tP.SITENAME,EL.DESCRIPTION,TO_CHAR(P.RECEIVETIME ,'YYYY-MM-DD' ),\n" +
|
||||||
|
"\t\tP.MATERIALSPECNAME,MP.DESC_CN, MP.MATERIALGROUP,P.UNIT,SP.SUPPLIERNO, SP.SUPPLIERNAME,\n" +
|
||||||
|
"\t\tSUBSTR(P.TRUEGG , 1, INSTR(P.TRUEGG , '*') - 1) ,P.LOCATIONNAME,DR.RECEIVEREQUESTNAME ";
|
||||||
|
Map<String, Object> hashMap = new HashMap<String,Object> ();
|
||||||
|
hashMap.put("SITENAME", siteName);
|
||||||
|
hashMap.put("DELIVERYNAME", deliveryName);
|
||||||
|
List<Map<String,Object>> list = IDMFrameServiceProxy.getSqlTemplate().queryForList(sql, hashMap);
|
||||||
|
if (list == null || list.size() < 1) {
|
||||||
|
throw new CustomException("条码在系统中不存在");
|
||||||
|
}
|
||||||
|
|
||||||
JSONArray jsonArray = new JSONArray();
|
JSONArray jsonArray = new JSONArray();
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
@ -497,12 +540,12 @@ public class QMSServiceImpl implements QMSService{
|
|||||||
jsonObject.put("supplierName", list.get(i).get("SUPPLIERNAME"));
|
jsonObject.put("supplierName", list.get(i).get("SUPPLIERNAME"));
|
||||||
jsonObject.put("supplierCode", list.get(i).get("SUPPLIERCODE"));
|
jsonObject.put("supplierCode", list.get(i).get("SUPPLIERCODE"));
|
||||||
jsonObject.put("materialName", list.get(i).get("MATERIALNAME"));
|
jsonObject.put("materialName", list.get(i).get("MATERIALNAME"));
|
||||||
jsonObject.put("materialCode", list.get(i).get("MATERIALCODE"));
|
jsonObject.put("materialCode", list.get(i).get("MATERIALSPECNAME"));
|
||||||
jsonObject.put("materialGroup", list.get(i).get("MATERIALGROUP"));
|
jsonObject.put("materialGroup", list.get(i).get("MATERIALGROUP"));
|
||||||
jsonObject.put("batchQuantity", list.get(i).get("BATCHQUANTITY"));
|
jsonObject.put("batchQuantity", list.get(i).get("BATCHQUANTITY"));//
|
||||||
jsonObject.put("quantityUnit", list.get(i).get("QUANTITYUNIT"));
|
jsonObject.put("quantityUnit", list.get(i).get("UNIT"));//QUANTITYUNIT
|
||||||
jsonObject.put("deliveryDate", list.get(i).get("DELIVERYDATE"));
|
jsonObject.put("deliveryDate", list.get(i).get("DELIVERYDATE"));//
|
||||||
jsonObject.put("specifications", list.get(i).get("BATCHNUMBER"));
|
jsonObject.put("specifications", list.get(i).get("BATCHNUMBER"));//
|
||||||
jsonObject.put("LOCATIONNAME", list.get(i).get("LOCATIONNAME"));
|
jsonObject.put("LOCATIONNAME", list.get(i).get("LOCATIONNAME"));
|
||||||
jsonObject.put("inspector", "检验室(原材仓)");
|
jsonObject.put("inspector", "检验室(原材仓)");
|
||||||
|
|
||||||
|
@ -6541,7 +6541,7 @@ public class ToSAPServiceImpl {
|
|||||||
sendData = ToSAPMessageUtil.mm067(user, bodyData, itemData, commitDate);
|
sendData = ToSAPMessageUtil.mm067(user, bodyData, itemData, commitDate);
|
||||||
exceptionMsg = "SAP返回";
|
exceptionMsg = "SAP返回";
|
||||||
sapreturn = toSAPMessageUtil.sendHttpPost(toSAPMessageUtil.materialChangeLocationUrl,"",sendData);
|
sapreturn = toSAPMessageUtil.sendHttpPost(toSAPMessageUtil.materialChangeLocationUrl,"",sendData);
|
||||||
//sapreturn = "{\"HEAD\":{\"INTF_ID\":\"MM067\",\"SRC_SYSTEM\":\"WMS\",\"DEST_SYSTEM\":\"SAP\",\"SRC_MSGID\":\"4908eca1-e70f-4b09-8c79-fb3d34f0f42c\"},\"RETURN\":{\"STATUS\":\"S\",\"MSGTXT\":\"\",\"MBLNR\":\"5000000303\",\"MJAHR\":\"2025\"}}";
|
//sapreturn = "{\"HEAD\":{\"INTF_ID\":\"MM067\",\"SRC_SYSTEM\":\"WMS\",\"DEST_SYSTEM\":\"SAP\",\"SRC_MSGID\":\"4908eca1-e70f-4b09-8c79-fb3d34f0f42c\"},\"RETURN\":{\"STATUS\":\"S\",\"MSGTXT\":\"\",\"MBLNR\":\"5000000324\",\"MJAHR\":\"2025\"}}";
|
||||||
org.json.JSONObject receiveJsonObject = new org.json.JSONObject(sapreturn);
|
org.json.JSONObject receiveJsonObject = new org.json.JSONObject(sapreturn);
|
||||||
|
|
||||||
org.json.JSONObject returnJsonObject = (org.json.JSONObject) receiveJsonObject.get("RETURN");
|
org.json.JSONObject returnJsonObject = (org.json.JSONObject) receiveJsonObject.get("RETURN");
|
||||||
@ -6582,9 +6582,8 @@ public class ToSAPServiceImpl {
|
|||||||
// 调用 QMS
|
// 调用 QMS
|
||||||
//qMSServiceImpl.PreIQCInfoSend(receiveRequestName, "SDK",opCode, erpFactory);
|
//qMSServiceImpl.PreIQCInfoSend(receiveRequestName, "SDK",opCode, erpFactory);
|
||||||
exceptionMsg = "QMS返回";
|
exceptionMsg = "QMS返回";
|
||||||
qmsServiceImpl.sendToIQCByDataList(opCode, qmsDataList);
|
qmsServiceImpl.sendToIQCByDataList(opCode, "SDK",deliveryName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新入库凭证,更新库存状态
|
// 更新入库凭证,更新库存状态
|
||||||
if (StringUtils.isNotEmpty(undoId)){
|
if (StringUtils.isNotEmpty(undoId)){
|
||||||
// 更新入库凭证
|
// 更新入库凭证
|
||||||
|
@ -6,6 +6,7 @@ import com.cim.idm.constants.delivery.DeliveryTypeEnums;
|
|||||||
import com.cim.idm.exception.GlobalException;
|
import com.cim.idm.exception.GlobalException;
|
||||||
import com.cim.idm.model.dto.delivery.DeliveryDelDto;
|
import com.cim.idm.model.dto.delivery.DeliveryDelDto;
|
||||||
import com.cim.idm.model.dto.delivery.DeliveryDto;
|
import com.cim.idm.model.dto.delivery.DeliveryDto;
|
||||||
|
import com.cim.idm.model.dto.delivery.DeliveryEditDto;
|
||||||
import com.cim.idm.model.dto.delivery.StoreDetailDto;
|
import com.cim.idm.model.dto.delivery.StoreDetailDto;
|
||||||
import com.cim.idm.model.po.MaterialReceiveRequest;
|
import com.cim.idm.model.po.MaterialReceiveRequest;
|
||||||
import com.cim.idm.model.dto.PageDto;
|
import com.cim.idm.model.dto.PageDto;
|
||||||
@ -180,4 +181,26 @@ public class DeliveryController {
|
|||||||
deliveryService.getMaterialDetail(storeDetailDto.getDocumentName(), storeDetailDto.getSiteName(), nameList, deliveryName));
|
deliveryService.getMaterialDetail(storeDetailDto.getDocumentName(), storeDetailDto.getSiteName(), nameList, deliveryName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改到货单
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/updateDeliveryStates")
|
||||||
|
public AjaxResult UpdateDeliveryStates(@RequestBody DeliveryEditDto deliveryEditDto) {
|
||||||
|
StoreDetailDto storeDetailDto = new StoreDetailDto();
|
||||||
|
storeDetailDto.setDocumentName(deliveryEditDto.getDeliveryName());
|
||||||
|
storeDetailDto.setSiteName(deliveryEditDto.getSiteName());
|
||||||
|
// 校验
|
||||||
|
MaterialDelivery byKey = deliveryService.getByKey(storeDetailDto);
|
||||||
|
if (Objects.isNull(byKey)) {
|
||||||
|
throw new GlobalException("不存在到货单");
|
||||||
|
}
|
||||||
|
if (!byKey.getDeliveryState().equals(DeliveryStateEnums.CREATE.getCode())) {
|
||||||
|
throw new GlobalException("到货单进行中或已结束,不允许修改");
|
||||||
|
}
|
||||||
|
if (deliveryService.editDelivery(deliveryEditDto) > 0) {
|
||||||
|
return AjaxResult.me().setSuccess(true).setResultObj("修改成功");
|
||||||
|
}
|
||||||
|
return AjaxResult.me().setErrorCode(-1).setMessage("修改失败");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import com.cim.idm.model.dto.storage.StorageAddDto;
|
|||||||
import com.cim.idm.model.dto.storage.StorageDelDto;
|
import com.cim.idm.model.dto.storage.StorageDelDto;
|
||||||
import com.cim.idm.model.dto.storage.StorageEditDto;
|
import com.cim.idm.model.dto.storage.StorageEditDto;
|
||||||
import com.cim.idm.model.dto.storage.StorageSearchDto;
|
import com.cim.idm.model.dto.storage.StorageSearchDto;
|
||||||
|
import com.cim.idm.model.po.storage.StorageSpec;
|
||||||
import com.cim.idm.service.IWareHouseService;
|
import com.cim.idm.service.IWareHouseService;
|
||||||
import com.cim.idm.utils.AjaxResult;
|
import com.cim.idm.utils.AjaxResult;
|
||||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||||
@ -77,4 +78,9 @@ public class WareHouseController {
|
|||||||
public AjaxResult search(@RequestBody StorageSearchDto storageSearchDto) {
|
public AjaxResult search(@RequestBody StorageSearchDto storageSearchDto) {
|
||||||
return AjaxResult.me().setSuccess(true).setResultObj(wareHouseService.search(storageSearchDto));
|
return AjaxResult.me().setSuccess(true).setResultObj(wareHouseService.search(storageSearchDto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/getLocation")
|
||||||
|
public AjaxResult getLocation(@RequestBody StorageSpec storageSpec) {
|
||||||
|
return AjaxResult.me().setSuccess(true).setResultObj(wareHouseService.getLocation(storageSpec.getErpLocation()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,4 +65,6 @@ public interface WareHouseDao {
|
|||||||
*/
|
*/
|
||||||
List<StorageSpec> search(@Param("storageName") String storageName,
|
List<StorageSpec> search(@Param("storageName") String storageName,
|
||||||
@Param("prefix") List<String> prefix);
|
@Param("prefix") List<String> prefix);
|
||||||
|
|
||||||
|
StorageSpec getLocation(@Param("erpLocation") String erpLocation);
|
||||||
}
|
}
|
||||||
|
@ -30,4 +30,7 @@ public class PurchaseDto {
|
|||||||
|
|
||||||
// 到货单类型
|
// 到货单类型
|
||||||
private String deliveryType;
|
private String deliveryType;
|
||||||
|
|
||||||
|
// 供应商
|
||||||
|
private String supplierNo;
|
||||||
}
|
}
|
||||||
|
@ -10,4 +10,8 @@ public class WareHouseEditDto {
|
|||||||
private String useLocation;
|
private String useLocation;
|
||||||
// 是否熟化
|
// 是否熟化
|
||||||
private String isOven;
|
private String isOven;
|
||||||
|
// 仓库管理远员
|
||||||
|
private String locationUser;
|
||||||
|
// 是否自动备货
|
||||||
|
private String zdbhFlag;
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,10 @@ public class StorageAddDto {
|
|||||||
private String description;
|
private String description;
|
||||||
//货位属性
|
//货位属性
|
||||||
private String storageUseType;
|
private String storageUseType;
|
||||||
|
// 组织
|
||||||
|
private String erpFactory;
|
||||||
|
// 仓库
|
||||||
|
private String erpLocation;
|
||||||
|
// 创建人
|
||||||
|
private String createUser;
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,6 @@ public class StorageEditDto {
|
|||||||
private String description;
|
private String description;
|
||||||
//货位属性
|
//货位属性
|
||||||
private String storageUseType;
|
private String storageUseType;
|
||||||
|
private String createUser;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,12 @@ public class StoragePageDto {
|
|||||||
|
|
||||||
//货位属性
|
//货位属性
|
||||||
private String storageUseType;
|
private String storageUseType;
|
||||||
|
// 组织
|
||||||
|
private String erpFactory;
|
||||||
|
// 仓库
|
||||||
|
private String erpLocation;
|
||||||
|
// 组织名称
|
||||||
|
private String orgName;
|
||||||
|
// 仓库名称
|
||||||
|
private String erpLocationName;
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,12 @@ public class StorageSpec {
|
|||||||
private String description;
|
private String description;
|
||||||
//货位属性
|
//货位属性
|
||||||
private String storageUseType;
|
private String storageUseType;
|
||||||
|
// 组织
|
||||||
|
private String erpFactory;
|
||||||
|
// 仓库
|
||||||
|
private String erpLocation;
|
||||||
|
// 组织名称
|
||||||
|
private String orgName;
|
||||||
|
// 仓库名称
|
||||||
|
private String erpLocationName;
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import com.cim.idm.model.dto.storage.StorageEditDto;
|
|||||||
import com.cim.idm.model.dto.storage.StorageSearchDto;
|
import com.cim.idm.model.dto.storage.StorageSearchDto;
|
||||||
import com.cim.idm.model.po.storage.StorageSpec;
|
import com.cim.idm.model.po.storage.StorageSpec;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -61,4 +62,11 @@ public interface IWareHouseService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
List<StorageSpec> search(StorageSearchDto storageSearchDto);
|
List<StorageSpec> search(StorageSearchDto storageSearchDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取仓库信息
|
||||||
|
* @param erpLocation
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
StorageSpec getLocation(String erpLocation);
|
||||||
}
|
}
|
||||||
|
@ -68,4 +68,9 @@ public class WareHouseServiceImpl implements IWareHouseService {
|
|||||||
}
|
}
|
||||||
return wareHouseDao.search(storageSearchDto.getStorageName(), prefix);
|
return wareHouseDao.search(storageSearchDto.getStorageName(), prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StorageSpec getLocation(String erpLocation) {
|
||||||
|
return wareHouseDao.getLocation(erpLocation);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,6 +74,9 @@
|
|||||||
AND m.ORDERDATE BETWEEN TO_DATE( #{dto.fromDate}, 'YYYY/MM/DDHH24MISS' )
|
AND m.ORDERDATE BETWEEN TO_DATE( #{dto.fromDate}, 'YYYY/MM/DDHH24MISS' )
|
||||||
AND TO_DATE( #{dto.toDate}, 'YYYY/MM/DDHH24MISS' )
|
AND TO_DATE( #{dto.toDate}, 'YYYY/MM/DDHH24MISS' )
|
||||||
</if>
|
</if>
|
||||||
|
<if test="dto.supplierNo != null and dto.supplierNo != ''">
|
||||||
|
AND m.SUPPLIERNO LIKE '%'||#{dto.supplierNo}||'%'
|
||||||
|
</if>
|
||||||
AND ms.IS_BATCH = #{isBatch}
|
AND ms.IS_BATCH = #{isBatch}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -3,22 +3,31 @@
|
|||||||
<mapper namespace="com.cim.idm.dao.WareHouseDao">
|
<mapper namespace="com.cim.idm.dao.WareHouseDao">
|
||||||
|
|
||||||
<update id="edit">
|
<update id="edit">
|
||||||
update BS_ERPLOCATION set USE_LOCATION = #{dto.useLocation}, IS_OVEN = #{dto.isOven}
|
update BS_ERPLOCATION set USE_LOCATION = #{dto.useLocation}, IS_OVEN = #{dto.isOven},
|
||||||
|
LOCATION_USER = #{dto.locationUser, jdbcType=VARCHAR}, ZDBHFLAG = #{dto.zdbhFlag}
|
||||||
where ERPFACTORYNAME = #{dto.erpFactoryName} and ERPLOCATIONNAME = #{dto.erpLocationName}
|
where ERPFACTORYNAME = #{dto.erpFactoryName} and ERPLOCATIONNAME = #{dto.erpLocationName}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="page" resultType="com.cim.idm.model.po.storage.StorageSpec">
|
<select id="page" resultType="com.cim.idm.model.po.storage.StorageSpec">
|
||||||
select SITENAME, STORAGENAME, DESCRIPTION, STORAGEUSETYPE
|
select a.SITENAME, a.STORAGENAME, a.DESCRIPTION, a.STORAGEUSETYPE, a.ERPFACTORY, a.ERPLOCATION,
|
||||||
from STORAGESPEC
|
o.ORGNAME, b.DESCRIPTION erpLocationName
|
||||||
|
from STORAGESPEC a LEFT JOIN BS_ERPLOCATION b ON a.ERPLOCATION = b.ERPLOCATIONNAME
|
||||||
|
LEFT JOIN ORG o ON a.ERPFACTORY = o.ORGNO
|
||||||
<where>
|
<where>
|
||||||
<if test="dto.storageName != null and dto.storageName != ''">
|
<if test="dto.storageName != null and dto.storageName != ''">
|
||||||
AND STORAGENAME LIKE '%'||#{dto.storageName}||'%'
|
AND a.STORAGENAME LIKE '%'||#{dto.storageName}||'%'
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.description != null and dto.description != ''">
|
<if test="dto.description != null and dto.description != ''">
|
||||||
AND DESCRIPTION LIKE '%'||#{dto.description}||'%'
|
AND a.DESCRIPTION LIKE '%'||#{dto.description}||'%'
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.storageUseType != null and dto.storageUseType != ''">
|
<if test="dto.storageUseType != null and dto.storageUseType != ''">
|
||||||
AND STORAGEUSETYPE = #{dto.storageUseType}
|
AND a.STORAGEUSETYPE = #{dto.storageUseType}
|
||||||
|
</if>
|
||||||
|
<if test="dto.erpFactory != null and dto.erpFactory != ''">
|
||||||
|
AND a.ERPFACTORY = #{dto.erpFactory}
|
||||||
|
</if>
|
||||||
|
<if test="dto.erpLocation != null and dto.erpLocation != ''">
|
||||||
|
AND a.ERPLOCATION = #{dto.erpLocation}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
@ -31,12 +40,15 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="add">
|
<insert id="add">
|
||||||
insert into STORAGESPEC(SITENAME, STORAGENAME, DESCRIPTION, STORAGEUSETYPE)
|
insert into STORAGESPEC(SITENAME, STORAGENAME, DESCRIPTION, STORAGEUSETYPE,
|
||||||
values (#{storageSpec.siteName}, #{storageSpec.storageName}, #{storageSpec.description}, #{storageSpec.storageUseType})
|
ERPFACTORY, ERPLOCATION, CREATEUSER, CREATETIME)
|
||||||
|
values (#{storageSpec.siteName}, #{storageSpec.storageName}, #{storageSpec.description}, #{storageSpec.storageUseType},
|
||||||
|
#{storageSpec.erpFactory}, #{storageSpec.erpLocation}, #{storageSpec.createUser}, SYSDATE)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="editStorage">
|
<update id="editStorage">
|
||||||
update STORAGESPEC set DESCRIPTION = #{edit.description} ,STORAGEUSETYPE = #{edit.storageUseType}
|
update STORAGESPEC set DESCRIPTION = #{edit.description} ,STORAGEUSETYPE = #{edit.storageUseType},
|
||||||
|
LASTEVENTTIME = SYSDATE, LASTEVENTUSER = #{edit.createUser}
|
||||||
where SITENAME = #{edit.siteName}
|
where SITENAME = #{edit.siteName}
|
||||||
and STORAGENAME = #{edit.storageName}
|
and STORAGENAME = #{edit.storageName}
|
||||||
</update>
|
</update>
|
||||||
@ -58,4 +70,11 @@
|
|||||||
AND STORAGENAME LIKE #{storageName}||'%'
|
AND STORAGENAME LIKE #{storageName}||'%'
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getLocation" resultType="com.cim.idm.model.po.storage.StorageSpec"
|
||||||
|
parameterType="java.lang.String">
|
||||||
|
SELECT DISTINCT ERPLOCATIONNAME erpLocation,DESCRIPTION erpLocationName,ERPFACTORYNAME erpFactory
|
||||||
|
FROM BS_ERPLOCATION
|
||||||
|
WHERE ERPLOCATIONNAME = #{erpLocation, jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user