diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.java index 69d362927..79af10590 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.java @@ -7,5 +7,5 @@ import org.apache.ibatis.annotations.Param; @Mapper public interface BasicdataCodeRecordMapper extends BaseMapper { - BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(@Param("type") Integer type, @Param("warehouseCode") String warehouseCode, @Param("year") String year, @Param("month") String month,@Param("day") String day); + BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(@Param("type") Integer type, @Param("warehouseCode") String warehouseCode, @Param("year") String year, @Param("month") String month); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.xml index 67783327a..c830f2a2e 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.xml +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.xml @@ -10,7 +10,6 @@ and warehouse_code = #{warehouseCode} and `year` = #{year} and `month` = #{month} - and `day` = #{day} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataCodeRecordService.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataCodeRecordService.java index 3544353e7..3cbf815e6 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataCodeRecordService.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataCodeRecordService.java @@ -4,5 +4,5 @@ import com.logpm.basicdata.entity.BasicdataCodeRecordEntity; import org.springblade.core.mp.base.BaseService; public interface IBasicdataCodeRecordService extends BaseService { - BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(Integer type, String warehouseCode, String year, String month,String day); + BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(Integer type, String warehouseCode, String year, String month); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeRecordServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeRecordServiceImpl.java index f35f9d17e..e1fef9497 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeRecordServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeRecordServiceImpl.java @@ -13,7 +13,7 @@ import org.springframework.stereotype.Service; @AllArgsConstructor public class BasicdataCodeRecordServiceImpl extends BaseServiceImpl implements IBasicdataCodeRecordService { @Override - public BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(Integer type, String warehouseCode, String year, String month,String day) { - return baseMapper.findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(type,warehouseCode,year,month,day); + public BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(Integer type, String warehouseCode, String year, String month) { + return baseMapper.findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(type,warehouseCode,year,month); } } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java index 6fe073e11..ac9e14540 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java @@ -7,7 +7,6 @@ import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.service.IBasicdataCodeRecordService; import com.logpm.basicdata.service.IBasicdataCodeService; import com.logpm.basicdata.service.IBasicdataWarehouseService; -import io.swagger.models.auth.In; import lombok.AllArgsConstructor; import lombok.extern.log4j.Log4j2; import org.springblade.common.constant.CodeDesEnum; @@ -201,9 +200,9 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService { // 获取月份(注意月份从0开始计数) Integer month = calendar.get(Calendar.MONTH) + 1; - Integer day = calendar.get(Calendar.DAY_OF_MONTH); +// Integer day = calendar.get(Calendar.DAY_OF_MONTH); - BasicdataCodeRecordEntity basicdataCodeRecordEntity = basicdataCodeRecordService.findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(type, basicdataWarehouseEntity.getWarehouseCode(), year + "", month + "", day + ""); + BasicdataCodeRecordEntity basicdataCodeRecordEntity = basicdataCodeRecordService.findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(type, basicdataWarehouseEntity.getWarehouseCode(), year + "", month + ""); if (Objects.isNull(basicdataCodeRecordEntity)) { basicdataCodeRecordEntity = new BasicdataCodeRecordEntity(); @@ -213,7 +212,7 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService { basicdataCodeRecordEntity.setWarehouseCode(basicdataWarehouseEntity.getWarehouseCode()); basicdataCodeRecordEntity.setYear(year + ""); basicdataCodeRecordEntity.setMonth(month + ""); - basicdataCodeRecordEntity.setDay(day + ""); +// basicdataCodeRecordEntity.setDay(day + ""); basicdataCodeRecordEntity.setNum(0); basicdataCodeRecordService.save(basicdataCodeRecordEntity); }