change - 最新工资系数接口

main
yinq 5 months ago
parent d901e9e1b8
commit 831bad93f7

@ -19,10 +19,10 @@ import java.util.Map;
@RestController @RestController
@RequestMapping("/erp") @RequestMapping("/erp")
public class ERPPortController extends BaseController { public class ERPPortController extends BaseController {
@Autowired @Autowired
private IERPPortService portService; private IERPPortService portService;
/** /**
* ERP * ERP
* *
@ -55,5 +55,20 @@ public class ERPPortController extends BaseController {
return AjaxResult.success(portService.getERPEmployeeWageData(paramDto)); return AjaxResult.success(portService.getERPEmployeeWageData(paramDto));
} }
/**
* -
*
* @param paramMap
* @return
*/
@PostMapping("/getERPLatestSalaryData")
public AjaxResult getERPLatestSalaryData(@RequestBody Map paramMap) {
ERPParamDto paramDto = new ERPParamDto();
paramDto.setAppCode(String.valueOf(paramMap.get("AppCode")));
paramDto.setController(String.valueOf(paramMap.get("Controller")));
paramDto.setActionName(String.valueOf(paramMap.get("ActionName")));
return AjaxResult.success(portService.getERPLatestSalaryData(paramDto));
}
} }

@ -0,0 +1,213 @@
package com.os.mes.api.domain;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
/**
* -
*/
public class LatestSalary {
/**
*
*/
@JsonProperty("AdjustDate")
private String AdjustDate;
/**
*
*/
@JsonProperty("EncapsulationCoefficient")
private BigDecimal EncapsulationCoefficient;
/**
*
*/
@JsonProperty("EncapsulationCoefficientGSD")
private BigDecimal EncapsulationCoefficientGSD;
/**
*
*/
@JsonProperty("SalaryPerMeter")
private BigDecimal SalaryPerMeter;
/**
*
*/
@JsonProperty("DistributionCoefficient")
private BigDecimal DistributionCoefficient;
/**
*
*/
@JsonProperty("FormingCoefficient")
private BigDecimal FormingCoefficient;
/**
*
*/
@JsonProperty("VulcanizationCoefficient")
private BigDecimal VulcanizationCoefficient;
/**
*
*/
@JsonProperty("HeadSalary")
private BigDecimal HeadSalary;
/**
*
*/
@JsonProperty("ClosingSalary")
private BigDecimal ClosingSalary;
/**
* 线
*/
@JsonProperty("SalaryPerWireRope")
private BigDecimal SalaryPerWireRope;
/**
*
*/
@JsonProperty("BasicSalaryCoefficient")
private BigDecimal BasicSalaryCoefficient;
/**
* -
*/
@JsonProperty("DividerCompensation")
private BigDecimal DividerCompensation;
/**
* -
*/
@JsonProperty("SkirtCompensation")
private BigDecimal SkirtCompensation;
public String getAdjustDate() {
return AdjustDate;
}
public void setAdjustDate(String adjustDate) {
AdjustDate = adjustDate;
}
public BigDecimal getEncapsulationCoefficient() {
return EncapsulationCoefficient;
}
public void setEncapsulationCoefficient(BigDecimal encapsulationCoefficient) {
EncapsulationCoefficient = encapsulationCoefficient;
}
public BigDecimal getEncapsulationCoefficientGSD() {
return EncapsulationCoefficientGSD;
}
public void setEncapsulationCoefficientGSD(BigDecimal encapsulationCoefficientGSD) {
EncapsulationCoefficientGSD = encapsulationCoefficientGSD;
}
public BigDecimal getSalaryPerMeter() {
return SalaryPerMeter;
}
public void setSalaryPerMeter(BigDecimal salaryPerMeter) {
SalaryPerMeter = salaryPerMeter;
}
public BigDecimal getDistributionCoefficient() {
return DistributionCoefficient;
}
public void setDistributionCoefficient(BigDecimal distributionCoefficient) {
DistributionCoefficient = distributionCoefficient;
}
public BigDecimal getFormingCoefficient() {
return FormingCoefficient;
}
public void setFormingCoefficient(BigDecimal formingCoefficient) {
FormingCoefficient = formingCoefficient;
}
public BigDecimal getVulcanizationCoefficient() {
return VulcanizationCoefficient;
}
public void setVulcanizationCoefficient(BigDecimal vulcanizationCoefficient) {
VulcanizationCoefficient = vulcanizationCoefficient;
}
public BigDecimal getHeadSalary() {
return HeadSalary;
}
public void setHeadSalary(BigDecimal headSalary) {
HeadSalary = headSalary;
}
public BigDecimal getClosingSalary() {
return ClosingSalary;
}
public void setClosingSalary(BigDecimal closingSalary) {
ClosingSalary = closingSalary;
}
public BigDecimal getSalaryPerWireRope() {
return SalaryPerWireRope;
}
public void setSalaryPerWireRope(BigDecimal salaryPerWireRope) {
SalaryPerWireRope = salaryPerWireRope;
}
public BigDecimal getBasicSalaryCoefficient() {
return BasicSalaryCoefficient;
}
public void setBasicSalaryCoefficient(BigDecimal basicSalaryCoefficient) {
BasicSalaryCoefficient = basicSalaryCoefficient;
}
public BigDecimal getDividerCompensation() {
return DividerCompensation;
}
public void setDividerCompensation(BigDecimal dividerCompensation) {
DividerCompensation = dividerCompensation;
}
public BigDecimal getSkirtCompensation() {
return SkirtCompensation;
}
public void setSkirtCompensation(BigDecimal skirtCompensation) {
SkirtCompensation = skirtCompensation;
}
@Override
public String toString() {
return "LatestSalary{" +
"AdjustDate='" + AdjustDate + '\'' +
", EncapsulationCoefficient=" + EncapsulationCoefficient +
", EncapsulationCoefficientGSD=" + EncapsulationCoefficientGSD +
", SalaryPerMeter=" + SalaryPerMeter +
", DistributionCoefficient=" + DistributionCoefficient +
", FormingCoefficient=" + FormingCoefficient +
", VulcanizationCoefficient=" + VulcanizationCoefficient +
", HeadSalary=" + HeadSalary +
", ClosingSalary=" + ClosingSalary +
", SalaryPerWireRope=" + SalaryPerWireRope +
", BasicSalaryCoefficient=" + BasicSalaryCoefficient +
", DividerCompensation=" + DividerCompensation +
", SkirtCompensation=" + SkirtCompensation +
'}';
}
}

@ -2,6 +2,7 @@ package com.os.mes.api.service;
import com.os.mes.api.domain.ERPParamDto; import com.os.mes.api.domain.ERPParamDto;
import com.os.mes.api.domain.LatestSalary;
import com.os.mes.base.domain.BaseStaffInfo; import com.os.mes.base.domain.BaseStaffInfo;
import com.os.mes.prod.domain.ProdOrderDetail; import com.os.mes.prod.domain.ProdOrderDetail;
@ -30,5 +31,11 @@ public interface IERPPortService {
*/ */
List<BaseStaffInfo> getERPEmployeeWageData(ERPParamDto paramDto); List<BaseStaffInfo> getERPEmployeeWageData(ERPParamDto paramDto);
/**
*
* @param paramDto
* @return
*/
LatestSalary getERPLatestSalaryData(ERPParamDto paramDto);
} }

@ -4,6 +4,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy; import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.os.mes.api.domain.ERPParamDto; import com.os.mes.api.domain.ERPParamDto;
import com.os.mes.api.domain.LatestSalary;
import com.os.mes.api.domain.RecordData; import com.os.mes.api.domain.RecordData;
import com.os.mes.api.domain.ResponseData; import com.os.mes.api.domain.ResponseData;
import com.os.mes.api.service.IERPPortService; import com.os.mes.api.service.IERPPortService;
@ -110,5 +111,34 @@ public class ERPPortServiceImpl implements IERPPortService {
return resultList; return resultList;
} }
/**
*
* @param paramDto
* @return
*/
@Override
public LatestSalary getERPLatestSalaryData(ERPParamDto paramDto) {
LatestSalary latestSalary = null;
String requestParam = null;
String result = null;
try {
// 创建ObjectMapper实例 对象转JSON字符串
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.UPPER_CAMEL_CASE);
requestParam = objectMapper.writeValueAsString(paramDto);
result = ApiUtils.sendERPHttpPost(ERPConstants.ERP_URL, requestParam);
// 处理接口返回消息
ObjectMapper resultMapper = new ObjectMapper();
// 将 JSON 字符串转换为 Java 对象
HashMap hashMap = resultMapper.readValue(result, HashMap.class);
HashMap returnData = (HashMap)hashMap.get("ReturnData");
HashMap<String, Object> data = (HashMap<String, Object>)returnData.get("data");
latestSalary = resultMapper.readValue(objectMapper.writeValueAsString(data), LatestSalary.class);
} catch (JsonProcessingException e) {
logger.warn("获取最新工资系数异常:" + requestParam + "|" + result + "|" + e);
}
return latestSalary;
}
} }

@ -70,9 +70,9 @@ public class BaseStaffInfo extends BaseEntity {
private String sex; private String sex;
/** /**
* *
*/ */
@Excel(name = "卡密") @Excel(name = "身份证")
private String passWord; private String passWord;
/** /**

@ -281,7 +281,7 @@ public class ProdOrderInfoServiceImpl implements IProdOrderInfoService {
conveyorBeltsPlan.setOrderCode(prodOrder.getOrderCode()); conveyorBeltsPlan.setOrderCode(prodOrder.getOrderCode());
conveyorBeltsPlan.setPlanCode(PlanCodeUtils.getPlanCode()); conveyorBeltsPlan.setPlanCode(PlanCodeUtils.getPlanCode());
conveyorBeltsPlan.setPlanAmount(prodOrder.getOrderDetail().getBeltRequiredLength()); conveyorBeltsPlan.setPlanAmount(prodOrder.getOrderDetail().getBeltRequiredLength());
conveyorBeltsPlan.setMaterialCode("1000099"); //conveyorBeltsPlan.setMaterialCode("1000099");
String beltLengthSpecifications = prodOrder.getOrderDetail().getBeltLengthSpecifications(); String beltLengthSpecifications = prodOrder.getOrderDetail().getBeltLengthSpecifications();
if (beltLengthSpecifications != null && !beltLengthSpecifications.isEmpty()) { if (beltLengthSpecifications != null && !beltLengthSpecifications.isEmpty()) {
int spaceIndex = beltLengthSpecifications.indexOf(' '); int spaceIndex = beltLengthSpecifications.indexOf(' ');

@ -41,6 +41,14 @@ public class ERPTask {
portService.getERPEmployeeWageData(paramDto); portService.getERPEmployeeWageData(paramDto);
} }
public void ERPLatestSalaryTask() {
ERPParamDto paramDto = new ERPParamDto();
paramDto.setAppCode(ERPConstants.salaryAppCode);
paramDto.setController(ERPConstants.salaryController);
paramDto.setActionName(ERPConstants.salaryActionName);
portService.getERPEmployeeWageData(paramDto);
}
/** /**
* daystype * daystype
* type: 0-1- * type: 0-1-

Loading…
Cancel
Save