manage/src/main/java/com/jilongda/manage/controller/TInventoryController.java
@@ -17,6 +17,7 @@ import com.jilongda.manage.vo.TInventoryVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.models.auth.In; import org.springframework.beans.BeanUtils; import org.springframework.context.annotation.Bean; @@ -93,12 +94,14 @@ } @ApiOperation(value = "镜架-根据品牌id查询对应库存") @PostMapping(value = "/getCountByBrandId") public ApiResult getCountByBrandId(Integer id) { @GetMapping(value = "/getCountByBrandId") public ApiResult getCountByBrandId(Integer id,Integer storeId) { List<Integer> collect = modelService.lambdaQuery().eq(TModel::getBrandId, id) .list().stream().map(TModel::getId).distinct().collect(Collectors.toList()); if (collect.isEmpty())collect.add(-1); List<TFrameGoods> list = frameGoodsService.lambdaQuery().in(TFrameGoods::getModelId, collect).list(); List<TFrameGoods> list = frameGoodsService.lambdaQuery().in(TFrameGoods::getModelId, collect) .eq(TFrameGoods::getStoreId,storeId) .list(); if (list.isEmpty())return ApiResult.success("0"); int i = 0; for (TFrameGoods tFrameGoods : list) { @@ -107,12 +110,13 @@ return ApiResult.success(i); } @ApiOperation(value = "镜架-根据材质id查询对应库存") @PostMapping(value = "/getCountByMaterialId") public ApiResult getCountByMaterialId(Integer id) { @GetMapping(value = "/getCountByMaterialId") public ApiResult getCountByMaterialId(Integer id,Integer storeId) { List<Integer> collect = modelService.lambdaQuery().eq(TModel::getMaterialId, id) .list().stream().map(TModel::getId).distinct().collect(Collectors.toList()); if (collect.isEmpty())collect.add(-1); List<TFrameGoods> list = frameGoodsService.lambdaQuery().in(TFrameGoods::getModelId, collect).list(); List<TFrameGoods> list = frameGoodsService.lambdaQuery().in(TFrameGoods::getModelId, collect). eq(TFrameGoods::getStoreId,storeId).list(); if (list.isEmpty())return ApiResult.success("0"); int i = 0; for (TFrameGoods tFrameGoods : list) { @@ -131,6 +135,7 @@ .list().stream().map(TModel::getId).collect(Collectors.toList()); if (collect.isEmpty())collect.add(-1); TFrameGoods one = frameGoodsService.lambdaQuery().in(TFrameGoods::getModelId, collect) .eq(TFrameGoods::getStoreId,getCurrentByParam.getStoreId()) .eq(TFrameGoods::getColor, getCurrentByParam.getColor()).one(); if (one!=null){ return ApiResult.success(one.getTotal()); @@ -143,9 +148,10 @@ public ApiResult<Integer> getCurrentByParamLens(@RequestBody GetCurrentByParamLens dto) { TLensGoods one = lensGoodsService.lambdaQuery().in(TLensGoods::getSeriesId, dto.getSeriesId()) .eq(dto.getLensType()!=null,TLensGoods::getLensType, dto.getLensType()) .eq(dto.getRefractiveIndex()!=null,TLensGoods::getRefractiveIndex, dto.getRefractiveIndex()) .eq(dto.getBallMirror()!=null,TLensGoods::getBallMirror, dto.getBallMirror()) .eq(dto.getColumnMirror()!=null,TLensGoods::getColumnMirror, dto.getColumnMirror()) .eq(StringUtils.hasLength(dto.getRefractiveIndex()),TLensGoods::getRefractiveIndex, dto.getRefractiveIndex()) .eq(StringUtils.hasLength(dto.getBallMirror()),TLensGoods::getBallMirror, dto.getBallMirror()) .eq(StringUtils.hasLength(dto.getColumnMirror()),TLensGoods::getColumnMirror, dto.getColumnMirror()) .eq(dto.getStoreId()!=null,TLensGoods::getStoreId, dto.getStoreId()) .one(); if (one!=null){ return ApiResult.success(one.getTotal()); manage/src/main/java/com/jilongda/manage/controller/TOptometristController.java
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.jilongda.common.basic.ApiResult; import com.jilongda.common.basic.PageInfo; import com.jilongda.manage.authority.model.SecUser; import com.jilongda.manage.authority.service.SecUserService; import com.jilongda.manage.model.TOptometrist; import com.jilongda.manage.query.TOptometristQuery; import com.jilongda.manage.query.TicketQuery; @@ -31,6 +33,8 @@ public class TOptometristController { @Autowired private TOptometristService optometristService; @Autowired private SecUserService secUserService; @ApiOperation(value = "验光师列表") @PostMapping(value = "/pageList") @@ -62,6 +66,8 @@ if (one!=null){ return ApiResult.failed("当前号码已存在"); } List<SecUser> list = secUserService.lambdaQuery().eq(SecUser::getPhone, dto.getPhone()).list(); if (!list.isEmpty())return ApiResult.failed("当前号码在员工管理已存在"); optometristService.save(dto); return ApiResult.success(); } @@ -79,6 +85,8 @@ if (one!=null){ return ApiResult.failed("当前号码已存在"); } List<SecUser> list = secUserService.lambdaQuery().eq(SecUser::getPhone, dto.getPhone()).list(); if (!list.isEmpty())return ApiResult.failed("当前号码在员工管理已存在"); optometristService.updateById(dto); return ApiResult.success(); } manage/src/main/java/com/jilongda/manage/controller/TOrderAftersalesController.java
@@ -69,6 +69,11 @@ @ApiOperation(value = "订单售后添加") @PostMapping(value = "/add") public ApiResult<String> add(@RequestBody TOrderAftersales dto) { List<TOrderAftersales> list = orderAftersalesService.lambdaQuery() .eq(TOrderAftersales::getOrderId, dto.getOrderId()).list(); if (!list.isEmpty()){ return ApiResult.failed("该订单已售后,不可再次操作!"); } dto.setCode(WarehousingConstant.ASTER_SALES+ CodeGenerateUtils.generateVolumeSn()); orderAftersalesService.save(dto); return ApiResult.success(); manage/src/main/java/com/jilongda/manage/controller/TOrderController.java
@@ -104,7 +104,7 @@ List<Integer> collect1 = orderGoodsService.lambdaQuery() .eq(StringUtils.hasLength(query.getBrandLens()), TOrderGoods::getBrandName, query.getBrandLens()) .eq(StringUtils.hasLength(query.getSeries()), TOrderGoods::getSeriesName, query.getSeries()) .eq((query.getType() != null), TOrderGoods::getType, query.getType()) .eq(query.getType() != null, TOrderGoods::getType, query.getType()) .eq(StringUtils.hasLength(query.getRefractiveIndex()), TOrderGoods::getRefractiveIndex, query.getRefractiveIndex()).list() .stream().map(TOrderGoods::getOrderId).collect(Collectors.toList()); if (StringUtils.hasLength(query.getBrandLens())||StringUtils.hasLength(query.getSeries())||query.getType() != null|| manage/src/main/java/com/jilongda/manage/model/TInventoryLensDetail.java
@@ -40,6 +40,9 @@ @ApiModelProperty(value = "系列") @TableField("series") private String series; @ApiModelProperty(value = "品牌") @TableField("brand") private String brand; @ApiModelProperty(value = "1球面 2非球面 3双非") @TableField("type") manage/src/main/java/com/jilongda/manage/query/TOptometryQuery.java
@@ -24,7 +24,6 @@ @ApiModelProperty(value = "验光师id") private Integer optometristId; @ApiModelProperty(value = "用户id") @NotNull(message = "用户id不能为空") private Integer userId; @ApiModelProperty(value = "开始时间 前端忽略") private String startTime; manage/src/main/java/com/jilongda/manage/query/TOrderQuery.java
@@ -49,4 +49,6 @@ private List<Integer> userIds; @ApiModelProperty(value = "订单ids 前端忽略") private List<Integer> orderIds; @ApiModelProperty(value = "用户id") private Integer userId; } manage/src/main/java/com/jilongda/manage/service/impl/TWarehousingServiceImpl.java
@@ -60,6 +60,7 @@ tFrameWarehousingDetailVO.setStoreName(store.getName()); } } // tFrameWarehousingDetailVO.setStatus(); } pageInfo.setRecords(list); return pageInfo; manage/src/main/java/com/jilongda/manage/vo/TInventoryInfoVO.java
@@ -16,6 +16,6 @@ private String store; @ApiModelProperty(value = "镜片盘点明细") private List<TInventoryLensDetail> lensList; @ApiModelProperty(value = "镜片盘点明细") @ApiModelProperty(value = "镜架盘点明细") private List<TInventoryFrameDetail> frameList; } manage/src/main/resources/mapping/TFrameWarehousingDetailMapper.xml
@@ -27,7 +27,7 @@ </sql> <select id="pageList" resultType="com.jilongda.manage.vo.TFrameWarehousingDetailVO"> select tfwd.id, tfwd.warehousingId, tfwd.brand, tfwd.supplier, tfwd.material, tfwd.total, tfwd.color, tfwd.model, tfwd.code, tfwd.createTime, tfwd.updateTime, tfwd.createBy, tfwd.updateBy, tfwd.isDelete, tfwd.modelId,tw.storeId tfwd.updateTime, tfwd.createBy, tfwd.updateBy, tfwd.isDelete, tfwd.modelId,tw.storeId,tw.status from t_frame_warehousing_detail tfwd left join t_warehousing tw on tfwd.warehousingId = tw.id <where> manage/src/main/resources/mapping/TOptometristMapper.xml
@@ -46,12 +46,15 @@ <if test="query.phone != null and query.phone != ''"> and t1.phone like concat('%',#{query.phone},'%') </if> <if test="query.storeId != null and query.storeId != ''"> <if test="query.storeId != null "> and t1.storeId = #{query.storeId} </if> <if test="query.optometristId != null and query.optometristId != ''"> <if test="query.optometristId != null "> and t1.optometristId = #{query.optometristId} </if> <if test="query.userId != null "> and t1.userId = #{query.userId} </if> <if test="query.startTime != null and query.startTime!=''"> and (t1.createTime between #{query.startTime} and #{query.endTime}) </if> manage/src/main/resources/mapping/TOrderMapper.xml
@@ -71,13 +71,19 @@ and orderMoney between #{query.startMoney} and #{query.endMoney} </if> <if test="query.realName != null and query.realName != ''"> and `name` like concat('%',#{query.realName},'%') and realName like concat('%',#{query.realName},'%') </if> <if test="query.phone != null and query.phone != ''"> and phone like concat('%',#{query.phone},'%') </if> <if test="query.storeId != null"> and storeId = #{query.storeId} </if> <if test="query.sysId != null"> and sysId = #{query.sysId} </if> <if test="query.userId != null"> and userId = #{query.userId} </if> <if test="query.userIds != null and query.userIds.size()>0"> AND userId IN @@ -91,5 +97,6 @@ #{id} </foreach> </if> order by createTime desc </select> </mapper>