diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/Report.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/Report.java index 91eb8dcf..a66a6bbd 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/Report.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/Report.java @@ -30,4 +30,13 @@ public class Report { return R.failed(e.getMessage()); } } + + @PostMapping("/partsManufacturing") + public R partsManufacturing(@RequestBody PartsManufacturing PartsManufacturing){ + try{ + return R.ok(reportService.partsManufacturing(PartsManufacturing)); + }catch(Exception e){ + return R.failed(e.getMessage()); + } + } } diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/dto/PartsManufacturing.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/dto/PartsManufacturing.java similarity index 96% rename from dispatch/src/main/java/com/foreverwin/mesnac/dispatch/dto/PartsManufacturing.java rename to anomaly/src/main/java/com/foreverwin/mesnac/anomaly/dto/PartsManufacturing.java index 93656911..5c3d5abc 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/dto/PartsManufacturing.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/dto/PartsManufacturing.java @@ -1,4 +1,4 @@ -package com.foreverwin.mesnac.dispatch.dto; +package com.foreverwin.mesnac.anomaly.dto; import java.time.LocalDateTime; diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/ReportMapper.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/ReportMapper.java index 5791a316..3943eb4b 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/ReportMapper.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/ReportMapper.java @@ -16,4 +16,6 @@ import java.util.Map; public interface ReportMapper { List> findIntegrationLog(@Param("integration") IntegrationLog integration); + + List> partsManufacturing(@Param("site")String site,@Param("locale")String locale, @Param("partsManufacturing") PartsManufacturing partsManufacturing); } diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/ReportService.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/ReportService.java index e793af6e..85dcf0fe 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/ReportService.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/ReportService.java @@ -12,4 +12,6 @@ import java.util.Map; */ public interface ReportService { List> findIntegrationLog(IntegrationLog integration); + + List> partsManufacturing(PartsManufacturing partsManufacturing); } diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/ReportServiceImpl.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/ReportServiceImpl.java index 5dd27879..0ae8fb5b 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/ReportServiceImpl.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/ReportServiceImpl.java @@ -5,6 +5,7 @@ import com.foreverwin.mesnac.anomaly.service.ReportService; import com.foreverwin.mesnac.integration.model.IntegrationLog; import com.foreverwin.modular.core.util.CommonMethods; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -23,10 +24,27 @@ public class ReportServiceImpl implements ReportService { @Autowired private ReportMapper reportMapper; + /** + * 接口日志表 + * @param integration + * @return + */ @Override public List> findIntegrationLog(IntegrationLog integration) { String site = CommonMethods.getSite(); integration.setSite(site); return reportMapper.findIntegrationLog(integration); } + + /** + * 零件加工报表 + * @param partsManufacturing + * @return + */ + @Override + public List> partsManufacturing(PartsManufacturing partsManufacturing) { + String site = CommonMethods.getSite(); + String locale = LocaleContextHolder.getLocale().getLanguage(); + return reportMapper.partsManufacturing(site,locale,partsManufacturing); + } } diff --git a/anomaly/src/main/resources/mapper/ReportMapper.xml b/anomaly/src/main/resources/mapper/ReportMapper.xml index 6e3cca28..a07651c0 100644 --- a/anomaly/src/main/resources/mapper/ReportMapper.xml +++ b/anomaly/src/main/resources/mapper/ReportMapper.xml @@ -28,4 +28,46 @@ ORDER BY REQUEST_DATE_TIME DESC + + \ No newline at end of file diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SfcDispatchController.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SfcDispatchController.java index da1b54a1..30571271 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SfcDispatchController.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SfcDispatchController.java @@ -4,7 +4,6 @@ import cn.hutool.core.date.DateUtil; import com.foreverwin.mesnac.common.dto.SfcDispatchDto; import com.foreverwin.mesnac.common.enums.DispatchStatusEnum; import com.foreverwin.mesnac.common.util.StringUtil; -import com.foreverwin.mesnac.dispatch.dto.PartsManufacturing; import com.foreverwin.mesnac.dispatch.service.SfcDispatchService; import com.foreverwin.modular.core.exception.BusinessException; import com.foreverwin.modular.core.util.CommonMethods; @@ -301,12 +300,5 @@ public class SfcDispatchController { return R.ok(result); } - @PostMapping("/partsManufacturing") - public R partsManufacturing(@RequestBody PartsManufacturing PartsManufacturing){ - try{ - return R.ok(sfcDispatchService.partsManufacturing(PartsManufacturing)); - }catch(Exception e){ - return R.failed(e.getMessage()); - } - } + } \ No newline at end of file diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SfcDispatchMapper.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SfcDispatchMapper.java index 41c109d5..d755ce71 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SfcDispatchMapper.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SfcDispatchMapper.java @@ -2,14 +2,12 @@ package com.foreverwin.mesnac.dispatch.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.foreverwin.mesnac.common.dto.SfcDispatchDto; -import com.foreverwin.mesnac.dispatch.dto.PartsManufacturing; import com.foreverwin.mesnac.dispatch.model.SfcDispatch; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; import java.time.LocalDateTime; import java.util.List; -import java.util.Map; /** *

@@ -51,5 +49,4 @@ public interface SfcDispatchMapper extends BaseMapper { SfcDispatchDto findSfcDispatchBySfc(@Param("site")String site, @Param("dto")SfcDispatchDto sfcDispatch); - List> partsManufacturing(@Param("site")String site,@Param("locale")String locale, @Param("partsManufacturing")PartsManufacturing partsManufacturing); } \ No newline at end of file diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SfcDispatchService.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SfcDispatchService.java index ecb479fd..e6ddae8b 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SfcDispatchService.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SfcDispatchService.java @@ -2,7 +2,6 @@ package com.foreverwin.mesnac.dispatch.service; import com.baomidou.mybatisplus.extension.service.IService; import com.foreverwin.mesnac.common.dto.SfcDispatchDto; -import com.foreverwin.mesnac.dispatch.dto.PartsManufacturing; import com.foreverwin.mesnac.dispatch.model.SfcDispatch; import org.springframework.web.multipart.MultipartFile; @@ -112,5 +111,4 @@ public interface SfcDispatchService extends IService { Map ganttList(String site, SfcDispatchDto sfcDispatchDto); - List> partsManufacturing(PartsManufacturing partsManufacturing); } \ No newline at end of file diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java index daad57c8..091485ca 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java @@ -13,7 +13,6 @@ import com.foreverwin.mesnac.common.service.SfcDispatchCommonService; import com.foreverwin.mesnac.common.util.DateUtil; import com.foreverwin.mesnac.common.util.ExcelUtils; import com.foreverwin.mesnac.common.util.StringUtil; -import com.foreverwin.mesnac.dispatch.dto.PartsManufacturing; import com.foreverwin.mesnac.dispatch.dto.RouterDTO; import com.foreverwin.mesnac.dispatch.dto.WorkCenterWorkTimeDTO; import com.foreverwin.mesnac.dispatch.mapper.SfcDispatchMapper; @@ -31,7 +30,6 @@ import com.foreverwin.modular.core.util.CommonMethods; import org.apache.commons.fileupload.FileItem; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; @@ -772,10 +770,5 @@ public class SfcDispatchServiceImpl extends ServiceImpl> partsManufacturing(PartsManufacturing partsManufacturing) { - String site = CommonMethods.getSite(); - String locale = LocaleContextHolder.getLocale().getLanguage(); - return sfcDispatchMapper.partsManufacturing(site,locale,partsManufacturing); - } + } \ No newline at end of file diff --git a/dispatch/src/main/resources/mapper/SfcDispatchMapper.xml b/dispatch/src/main/resources/mapper/SfcDispatchMapper.xml index ea7fa80b..cc2621cc 100644 --- a/dispatch/src/main/resources/mapper/SfcDispatchMapper.xml +++ b/dispatch/src/main/resources/mapper/SfcDispatchMapper.xml @@ -801,46 +801,4 @@ AND HANDLE=#{dto.handle} - -