Merge branch 'main' of http://162.14.99.253:3000/10539622/2025-03-JS-SDK-svr
This commit is contained in:
commit
20d2decb4c
@ -5763,7 +5763,7 @@ public class ToSAPServiceImpl {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String qtcrNoInvoiceForCheckPlan(List<Map<String, Object>> srPk, String qtc, String user, String commitDate, String opCode) {
|
||||
public String qtcrNoInvoiceForCheckPlan(List<Map<String, Object>> srPk, String qtc, String user, String commitDate, String opCode, String costName) {
|
||||
String rcode;
|
||||
String undoId = "";
|
||||
String rmsg = null;
|
||||
@ -5794,14 +5794,14 @@ public class ToSAPServiceImpl {
|
||||
body.put("ITEM", itemArray);
|
||||
body.put("ITEMID", uniqueID);
|
||||
|
||||
// SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// SimpleDateFormat outputFormat = new SimpleDateFormat("yyyyMMdd");
|
||||
// Date date = inputFormat.parse(commitDate);
|
||||
// String outputDate = outputFormat.format(date);
|
||||
SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
SimpleDateFormat outputFormat = new SimpleDateFormat("yyyyMMdd");
|
||||
Date date = inputFormat.parse(commitDate);
|
||||
String outputDate = outputFormat.format(date);
|
||||
//过账日期
|
||||
body.put("BUDAT", TimeStampUtil.getCurrentTime("yyyyMMdd"));
|
||||
body.put("BUDAT", outputDate);
|
||||
//凭证日期
|
||||
body.put("BLDAT", TimeStampUtil.getCurrentTime("yyyyMMdd"));
|
||||
body.put("BLDAT", outputDate);
|
||||
//凭证抬头文本
|
||||
body.put("BKTXT", uniqueID);
|
||||
//用户名
|
||||
@ -5823,13 +5823,13 @@ public class ToSAPServiceImpl {
|
||||
// WERKS 发货工厂
|
||||
item.put("WERKS", auditBox.get("ERPFACTORY"));
|
||||
// LGORT 发货库存地点
|
||||
item.put("LGORT", auditBox.get("SYSLOCATION"));
|
||||
item.put("LGORT", auditBox.get("ERPLOCATION"));
|
||||
//MENGE 数量
|
||||
item.put("MENGE", auditBox.get("MATERIALQUANTITY"));
|
||||
//MENGE 单位
|
||||
item.put("MEINS", auditBox.get("UNIT"));
|
||||
//KOSTL 成本中心
|
||||
item.put("KOSTL", auditBox.get("CostCenterName"));
|
||||
item.put("KOSTL", costName);
|
||||
|
||||
itemArray.add(item);
|
||||
|
||||
|
@ -109,6 +109,7 @@ public class CheckMarkController {
|
||||
String checkPlanName = javaObject.getCheckPlanName();//测试名
|
||||
String user=javaObject.getUser();
|
||||
String commitDate=javaObject.getCommitDate();
|
||||
String costName=javaObject.getCostName();
|
||||
String opCode = javaObject.getOpCode();
|
||||
if(StringUtils.isEmpty(commitDate))
|
||||
{
|
||||
@ -155,7 +156,7 @@ public class CheckMarkController {
|
||||
if(sr_pk.size()>0)
|
||||
{
|
||||
//调用SAP接口
|
||||
billCode=toSAPServiceImpl.qtcrNoInvoiceForCheckPlan(sr_pk, "qtc", user, commitDate,opCode);
|
||||
billCode=toSAPServiceImpl.qtcrNoInvoiceForCheckPlan(sr_pk, "qtc", user, commitDate,opCode,costName);
|
||||
//更新盘点计划状态
|
||||
String sql = "UPDATE CHECKPLAN c SET CHECKPLANSTATE = 'Approved' WHERE PLANDATE = :PLANDATE AND CHECKPLANNAME = :CHECKPLANNAME AND ERPLOCATION=:ERPLOCATION";
|
||||
IDMFrameServiceProxy.getSqlTemplate().update(sql, bindMap);
|
||||
@ -213,7 +214,7 @@ public class CheckMarkController {
|
||||
List<Map<String, Object>> sr_pk = IDMFrameServiceProxy.getSqlTemplate().queryForList(sql_py, bindMap);
|
||||
if (sr_pk.size() > 0) {
|
||||
// 调用SAP接口
|
||||
billCode = toSAPServiceImpl.qtcrNoInvoiceForCheckPlan(sr_pk, "qtr", user, commitDate,opCode);
|
||||
billCode = toSAPServiceImpl.qtcrNoInvoiceForCheckPlan(sr_pk, "qtr", user, commitDate,opCode,costName);
|
||||
// 更新盘点计划状态
|
||||
String sql = "UPDATE CHECKRECORD c SET CHECKPLANSTATE = 'Approved' WHERE PLANDATE = :PLANDATE AND CHECKPLANNAME = :CHECKPLANNAME AND ERPLOCATION=:ERPLOCATION";
|
||||
IDMFrameServiceProxy.getSqlTemplate().update(sql, bindMap);
|
||||
|
@ -0,0 +1,35 @@
|
||||
package com.cim.idm.controller;
|
||||
|
||||
import com.cim.idm.model.CostCenter;
|
||||
import com.cim.idm.response.BaseResponse;
|
||||
import com.cim.idm.response.RespGenerator;
|
||||
import com.cim.idm.service.CostCenterService;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/CostCenter")
|
||||
@Slf4j
|
||||
@Api(tags = "成本中心")
|
||||
public class CostCenterController {
|
||||
|
||||
@Autowired
|
||||
private CostCenterService costCenterService;
|
||||
|
||||
/**
|
||||
* 获取成本中心
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/getCostCenter", method = RequestMethod.GET)
|
||||
public BaseResponse<Object> getCostCenter() {
|
||||
List<CostCenter> costCenters = costCenterService.getCostCenter();
|
||||
return RespGenerator.returnOK(costCenters);
|
||||
}
|
||||
}
|
14
zi-wms-pda/src/main/java/com/cim/idm/dao/CostCenterDao.java
Normal file
14
zi-wms-pda/src/main/java/com/cim/idm/dao/CostCenterDao.java
Normal file
@ -0,0 +1,14 @@
|
||||
package com.cim.idm.dao;
|
||||
|
||||
import com.cim.idm.model.CostCenter;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
@Mapper
|
||||
public interface CostCenterDao {
|
||||
|
||||
List<CostCenter> getCostCenter();
|
||||
}
|
@ -32,6 +32,7 @@ public class CheckPlan {
|
||||
private int pageSize;
|
||||
|
||||
private String commitDate;
|
||||
private String costName;
|
||||
private String opCode;
|
||||
|
||||
}
|
||||
|
23
zi-wms-pda/src/main/java/com/cim/idm/model/CostCenter.java
Normal file
23
zi-wms-pda/src/main/java/com/cim/idm/model/CostCenter.java
Normal file
@ -0,0 +1,23 @@
|
||||
package com.cim.idm.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author admin
|
||||
* @Date 2025/5/13 11:40
|
||||
*/
|
||||
@Data
|
||||
public class CostCenter {
|
||||
private String id;
|
||||
// 编码
|
||||
private String costCode;
|
||||
// 名称
|
||||
private String costName;
|
||||
// 组织
|
||||
private String erpFactory;
|
||||
// 部门
|
||||
private String department;
|
||||
// 事业部
|
||||
private String division;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.cim.idm.service;
|
||||
|
||||
import com.cim.idm.model.CostCenter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CostCenterService {
|
||||
List<CostCenter> getCostCenter();
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.cim.idm.service.Impl;
|
||||
|
||||
import com.cim.idm.dao.CostCenterDao;
|
||||
import com.cim.idm.model.CostCenter;
|
||||
import com.cim.idm.service.CostCenterService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service("CostCenterService")
|
||||
@Slf4j
|
||||
public class CostCenterServiceImpl implements CostCenterService {
|
||||
@Autowired
|
||||
private CostCenterDao costCenterDao;
|
||||
|
||||
@Override
|
||||
public List<CostCenter> getCostCenter() {
|
||||
return costCenterDao.getCostCenter();
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cim.idm.dao.CostCenterDao">
|
||||
|
||||
<select id="getCostCenter" resultType="com.cim.idm.model.CostCenter">
|
||||
select id, cost_code costCode, cost_name costName, erp_factory erpFactory, department, division
|
||||
from cost_center
|
||||
</select>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user