15 changed files with 188 additions and 16730 deletions
-
18.idea/compiler.xml
-
18.idea/gradle.xml
-
5.idea/misc.xml
-
8.idea/modules.xml
-
6.idea/vcs.xml
-
2build.gradle
-
16671logs/ccl-mes/CCLMES2020.log
-
69src/main/java/com/gaotao/modules/api/entity/IfsShopOrder.java
-
15src/main/java/com/gaotao/modules/api/service/IfsApiService.java
-
44src/main/java/com/gaotao/modules/api/service/impl/IfsApiServiceImpl.java
-
37src/main/java/com/gaotao/modules/notify/controller/NewIssureController.java
-
5src/main/java/com/gaotao/modules/notify/entity/SOIssueNotifyOrderList.java
-
4src/main/java/com/gaotao/modules/notify/service/NewIssureService.java
-
9src/main/java/com/gaotao/modules/notify/service/impl/NewIssureServiceImpl.java
-
7src/main/resources/mapper/notify/IssureNotifyMapper.xml
@ -1,18 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="CompilerConfiguration"> |
|||
<annotationProcessing> |
|||
<profile name="Gradle Imported" enabled="true"> |
|||
<outputRelativeToContentRoot value="true" /> |
|||
<processorPath useClasspath="false"> |
|||
<entry name="C:/environment/gradle_depot/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.30/f195ee86e6c896ea47a1d39defbe20eb59cd149d/lombok-1.18.30.jar" /> |
|||
</processorPath> |
|||
<module name="ccl-wms-java.main" /> |
|||
</profile> |
|||
</annotationProcessing> |
|||
<bytecodeTargetLevel target="21" /> |
|||
</component> |
|||
<component name="JavacSettings"> |
|||
<option name="ADDITIONAL_OPTIONS_STRING" value="-parameters" /> |
|||
</component> |
|||
</project> |
|||
@ -1,18 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="GradleMigrationSettings" migrationVersion="1" /> |
|||
<component name="GradleSettings"> |
|||
<option name="linkedExternalProjectsSettings"> |
|||
<GradleProjectSettings> |
|||
<option name="distributionType" value="LOCAL" /> |
|||
<option name="externalProjectPath" value="$PROJECT_DIR$" /> |
|||
<option name="gradleHome" value="C:\environment\gradle-8.8" /> |
|||
<option name="modules"> |
|||
<set> |
|||
<option value="$PROJECT_DIR$" /> |
|||
</set> |
|||
</option> |
|||
</GradleProjectSettings> |
|||
</option> |
|||
</component> |
|||
</project> |
|||
@ -1,5 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="ExternalStorageConfigurationManager" enabled="true" /> |
|||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="ms-21" project-jdk-type="JavaSDK" /> |
|||
</project> |
|||
@ -1,8 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="ProjectModuleManager"> |
|||
<modules> |
|||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/ccl-wms-java.iml" filepath="$PROJECT_DIR$/.idea/modules/ccl-wms-java.iml" /> |
|||
</modules> |
|||
</component> |
|||
</project> |
|||
@ -1,6 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="VcsDirectoryMappings"> |
|||
<mapping directory="" vcs="Git" /> |
|||
</component> |
|||
</project> |
|||
16671
logs/ccl-mes/CCLMES2020.log
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,69 @@ |
|||
package com.gaotao.modules.api.entity; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import lombok.Data; |
|||
import org.apache.ibatis.type.Alias; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@Alias("IfsShopOrder") |
|||
public class IfsShopOrder { |
|||
private String site; |
|||
@JsonProperty("orderNo") |
|||
private String orderNo; |
|||
|
|||
@JsonProperty("releaseNo") |
|||
private String releaseNo; |
|||
|
|||
@JsonProperty("sequenceNo") |
|||
private String sequenceNo; |
|||
|
|||
@JsonProperty("contract") |
|||
private String contract; |
|||
|
|||
@JsonProperty("status") |
|||
private String status; |
|||
|
|||
@JsonProperty("partNo") |
|||
private String partNo; |
|||
|
|||
@JsonProperty("partDesc") |
|||
private String partDesc; |
|||
|
|||
@JsonProperty("lotSize") |
|||
private BigDecimal lotSize; |
|||
|
|||
@JsonProperty("uom") |
|||
private String uom; |
|||
|
|||
@JsonProperty("startDate") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
private Date startDate; |
|||
|
|||
@JsonProperty("finishDate") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
private Date finishDate; |
|||
|
|||
@JsonProperty("needDate") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
private Date needDate; |
|||
|
|||
@JsonProperty("closeCode") |
|||
private String closeCode; |
|||
|
|||
@JsonProperty("closeTolerance") |
|||
private BigDecimal closeTolerance; // 推荐使用 BigDecimal 避免浮点精度问题 |
|||
|
|||
@JsonProperty("qtyComplete") |
|||
private BigDecimal qtyComplete; // 同上,即使当前是整数,未来可能有小数 |
|||
|
|||
@JsonProperty("objstate") |
|||
private String objstate; |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
package com.gaotao.modules.api.service; |
|||
|
|||
import com.gaotao.modules.api.entity.IfsShopOrder; |
|||
import com.gaotao.modules.notify.entity.vo.ShopOrderMaterialVo; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
public interface IfsApiService { |
|||
|
|||
List<IfsShopOrder> getShopOrderFromIFSWithOrderNo(IfsShopOrder data)throws Exception; |
|||
|
|||
// List<ShopOrderMaterialVo> getSOSBOMForIssureNew(SOScheduledRoutingData data); |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
package com.gaotao.modules.api.service.impl; |
|||
|
|||
import com.fasterxml.jackson.core.type.TypeReference; |
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
import com.gaotao.common.utils.HttpUtils; |
|||
import com.gaotao.modules.api.entity.IfsShopOrder; |
|||
import com.gaotao.modules.api.service.IfsApiService; |
|||
import com.gaotao.modules.base.entity.SOScheduledRoutingData; |
|||
import com.gaotao.modules.notify.entity.vo.ShopOrderVo; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Value; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
@Slf4j |
|||
@Service |
|||
public class IfsApiServiceImpl implements IfsApiService { |
|||
@Value("${custom.ifs-url}") |
|||
private String ifsUrl; |
|||
|
|||
private static final String ifsDBName="IFST"; |
|||
private static final String domainUserID="CCL_WMS"; |
|||
@Override |
|||
public List<IfsShopOrder> getShopOrderFromIFSWithOrderNo(IfsShopOrder data)throws Exception { |
|||
Map<String, Object> params = Map.of( |
|||
"ifsDBName", ifsDBName, |
|||
"domainUserID", domainUserID, |
|||
"ifsSiteID", data.getSite(), |
|||
"ifsOrderNo", data.getOrderNo(), |
|||
"ifsReleaseNo", data.getReleaseNo(), |
|||
"ifsSequenceNo", data.getSequenceNo() |
|||
); |
|||
ObjectMapper objectMapper = new ObjectMapper(); |
|||
String jsonBody = objectMapper.writeValueAsString(params); |
|||
String ifsResponse = HttpUtils.doGetWithBody(ifsUrl+"ShopOrder",jsonBody,null); |
|||
ObjectMapper mapper = new ObjectMapper(); |
|||
List<IfsShopOrder> result = mapper.readValue(ifsResponse, new TypeReference<List<IfsShopOrder>>() { |
|||
}); |
|||
|
|||
return result; |
|||
} |
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
package com.gaotao.modules.notify.controller; |
|||
|
|||
import com.gaotao.common.utils.R; |
|||
import com.gaotao.modules.api.entity.IfsShopOrder; |
|||
import com.gaotao.modules.api.service.IfsApiService; |
|||
import com.gaotao.modules.base.entity.SOScheduledRoutingData; |
|||
import com.gaotao.modules.notify.entity.vo.ShopOrderMaterialVo; |
|||
import com.gaotao.modules.notify.service.NewIssureService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
@RestController |
|||
@RequestMapping("orderIssure/newIssure") |
|||
public class NewIssureController { |
|||
@Autowired |
|||
private IfsApiService ifsApiService; |
|||
|
|||
@Autowired |
|||
private NewIssureService newIssureService; |
|||
|
|||
@PostMapping(value="/getShopOrderFromIFSWithOrderNo") |
|||
@ResponseBody |
|||
public R getShopOrderFromIFSWithOrderNo(@RequestBody IfsShopOrder data) throws Exception{ |
|||
//TODO 调用rifs接口获取列表数据 |
|||
List<IfsShopOrder> rows = ifsApiService.getShopOrderFromIFSWithOrderNo(data); |
|||
return R.ok().put("rows", rows); |
|||
} |
|||
|
|||
|
|||
// @PostMapping(value="/getSOSBOMForIssureNew") |
|||
// @ResponseBody |
|||
// public R getSOSBOMForIssureNew(@RequestBody SOScheduledRoutingData data) throws Exception{ |
|||
// List<ShopOrderMaterialVo> rows = newIssureService.getSOSBOMForIssureNew(data); |
|||
// return R.ok().put("rows", rows); |
|||
// } |
|||
} |
|||
@ -0,0 +1,4 @@ |
|||
package com.gaotao.modules.notify.service; |
|||
|
|||
public interface NewIssureService { |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
package com.gaotao.modules.notify.service.impl; |
|||
|
|||
import com.gaotao.modules.notify.service.NewIssureService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service |
|||
public class NewIssureServiceImpl implements NewIssureService { |
|||
|
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue