Browse Source

1.生成码值bug修复

dist.1.3.0
zhenghaoyu 6 months ago
parent
commit
b129374bf3
  1. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.java
  2. 1
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.xml
  3. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataCodeRecordService.java
  4. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeRecordServiceImpl.java
  5. 7
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.java

@ -7,5 +7,5 @@ import org.apache.ibatis.annotations.Param;
@Mapper @Mapper
public interface BasicdataCodeRecordMapper extends BaseMapper<BasicdataCodeRecordEntity> { public interface BasicdataCodeRecordMapper extends BaseMapper<BasicdataCodeRecordEntity> {
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);
} }

1
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCodeRecordMapper.xml

@ -10,7 +10,6 @@
and warehouse_code = #{warehouseCode} and warehouse_code = #{warehouseCode}
and `year` = #{year} and `year` = #{year}
and `month` = #{month} and `month` = #{month}
and `day` = #{day}
</select> </select>
</mapper> </mapper>

2
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; import org.springblade.core.mp.base.BaseService;
public interface IBasicdataCodeRecordService extends BaseService<BasicdataCodeRecordEntity> { public interface IBasicdataCodeRecordService extends BaseService<BasicdataCodeRecordEntity> {
BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(Integer type, String warehouseCode, String year, String month,String day); BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(Integer type, String warehouseCode, String year, String month);
} }

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeRecordServiceImpl.java

@ -13,7 +13,7 @@ import org.springframework.stereotype.Service;
@AllArgsConstructor @AllArgsConstructor
public class BasicdataCodeRecordServiceImpl extends BaseServiceImpl<BasicdataCodeRecordMapper, BasicdataCodeRecordEntity> implements IBasicdataCodeRecordService { public class BasicdataCodeRecordServiceImpl extends BaseServiceImpl<BasicdataCodeRecordMapper, BasicdataCodeRecordEntity> implements IBasicdataCodeRecordService {
@Override @Override
public BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(Integer type, String warehouseCode, String year, String month,String day) { public BasicdataCodeRecordEntity findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(Integer type, String warehouseCode, String year, String month) {
return baseMapper.findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(type,warehouseCode,year,month,day); return baseMapper.findEntityByCodeTypeAndWarehouseCodeAndYearAndMonth(type,warehouseCode,year,month);
} }
} }

7
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.IBasicdataCodeRecordService;
import com.logpm.basicdata.service.IBasicdataCodeService; import com.logpm.basicdata.service.IBasicdataCodeService;
import com.logpm.basicdata.service.IBasicdataWarehouseService; import com.logpm.basicdata.service.IBasicdataWarehouseService;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springblade.common.constant.CodeDesEnum; import org.springblade.common.constant.CodeDesEnum;
@ -201,9 +200,9 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
// 获取月份(注意月份从0开始计数) // 获取月份(注意月份从0开始计数)
Integer month = calendar.get(Calendar.MONTH) + 1; 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)) { if (Objects.isNull(basicdataCodeRecordEntity)) {
basicdataCodeRecordEntity = new BasicdataCodeRecordEntity(); basicdataCodeRecordEntity = new BasicdataCodeRecordEntity();
@ -213,7 +212,7 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
basicdataCodeRecordEntity.setWarehouseCode(basicdataWarehouseEntity.getWarehouseCode()); basicdataCodeRecordEntity.setWarehouseCode(basicdataWarehouseEntity.getWarehouseCode());
basicdataCodeRecordEntity.setYear(year + ""); basicdataCodeRecordEntity.setYear(year + "");
basicdataCodeRecordEntity.setMonth(month + ""); basicdataCodeRecordEntity.setMonth(month + "");
basicdataCodeRecordEntity.setDay(day + ""); // basicdataCodeRecordEntity.setDay(day + "");
basicdataCodeRecordEntity.setNum(0); basicdataCodeRecordEntity.setNum(0);
basicdataCodeRecordService.save(basicdataCodeRecordEntity); basicdataCodeRecordService.save(basicdataCodeRecordEntity);
} }

Loading…
Cancel
Save