后台设置、小票机管理、员工管理,系统管理,售后管理
New file |
| | |
| | | package com.jilongda.common.constants; |
| | | |
| | | public class WarehousingConstant { |
| | | |
| | | /** |
| | | * 出库 |
| | | */ |
| | | public static final String OUT_BOUND = "CK"; |
| | | /** |
| | | * 出库 |
| | | */ |
| | | public static final String STORE = "RK"; |
| | | /** |
| | | * 出库 |
| | | */ |
| | | public static final String CANCEL = "ZF"; |
| | | /** |
| | | * 出库 |
| | | */ |
| | | public static final String RETURN_GOODS = "TH"; |
| | | /** |
| | | * 售后 |
| | | */ |
| | | public static final String ASTER_SALES = "SH"; |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.common.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @author xiaochen |
| | | * @ClassName Disable |
| | | * @Description |
| | | * @date 2022-06-08 16:55 |
| | | */ |
| | | public enum WarehousingStatusEnum { |
| | | OUT_BOUND(1, "出库"), |
| | | STORE(2, "入库"), |
| | | CANCEL(3, "作废"), |
| | | RETURN_GOODS(4, "退货"); |
| | | |
| | | @Getter |
| | | private String desc; |
| | | |
| | | |
| | | @Getter |
| | | private int code; |
| | | |
| | | |
| | | WarehousingStatusEnum(int code, String desc) { |
| | | this.code = code; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | /** |
| | | * 通过code获取枚举 |
| | | * |
| | | * @param code |
| | | * @return |
| | | */ |
| | | public static WarehousingStatusEnum fromCode(Integer code) { |
| | | WarehousingStatusEnum[] resultTypes = WarehousingStatusEnum.values(); |
| | | for (WarehousingStatusEnum resultType : resultTypes) { |
| | | if (code.equals(resultType.getCode())) { |
| | | return resultType; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.jilongda.common.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @author xiaochen |
| | | * @ClassName Disable |
| | | * @Description |
| | | * @date 2022-06-08 16:55 |
| | | */ |
| | | public enum WarehousingTypeEnum { |
| | | FRAME(1, "镜架"), |
| | | LENS(2, "镜片"); |
| | | |
| | | @Getter |
| | | private String desc; |
| | | |
| | | |
| | | @Getter |
| | | private int code; |
| | | |
| | | |
| | | WarehousingTypeEnum(int code, String desc) { |
| | | this.code = code; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | /** |
| | | * 通过code获取枚举 |
| | | * |
| | | * @param code |
| | | * @return |
| | | */ |
| | | public static WarehousingTypeEnum fromCode(Integer code) { |
| | | WarehousingTypeEnum[] resultTypes = WarehousingTypeEnum.values(); |
| | | for (WarehousingTypeEnum resultType : resultTypes) { |
| | | if (code.equals(resultType.getCode())) { |
| | | return resultType; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | |
| | | //String timestampPart = ""+(Math.random() * 10000) * (System.currentTimeMillis()/10000); |
| | | //System.out.println(timestampPart); |
| | | //System.out.println(generateOrderSn(i)); |
| | | long l = System.currentTimeMillis() * Long.valueOf(CodeGenerateUtils.generateProductCode().substring(0, 5)); |
| | | System.out.println(String.valueOf(l).substring(0,10)); |
| | | System.err.println(generateVolumeSn()); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.jilongda.manage.authority.service.SecUserService; |
| | | import com.jilongda.manage.authority.vo.SecResourceVO; |
| | | import com.jilongda.manage.authority.vo.SecUsersVO; |
| | | import com.jilongda.manage.model.TOptometrist; |
| | | import com.jilongda.manage.query.TOptometristQuery; |
| | | import com.jilongda.manage.utils.LoginInfoUtil; |
| | | import com.jilongda.manage.utils.UserUtil; |
| | | import com.jilongda.common.basic.ApiResult; |
| | |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "通过门店id查询验光师列表") |
| | | @GetMapping(value = "/queryListByStoreId") |
| | | public ApiResult<List<SecUser>> queryListByStoreId(@RequestParam Integer storeId) { |
| | | List<SecUser> secUsers = secUserService.list(Wrappers.lambdaQuery(SecUser.class) |
| | | .eq(SecUser::getStoreId,storeId)); |
| | | return ApiResult.success(secUsers); |
| | | } |
| | | |
| | | @OperationLog(operType = "重置", operDesc = "重置密码", operModul = "用户") |
| | | @ApiOperation("重置(修改)密码 不传密码为重置(123456),传密码为修改") |
| | | @PostMapping("/resetPassword") |
| | |
| | | private String nickName; |
| | | @ApiModelProperty("联系方式") |
| | | private String phone; |
| | | @ApiModelProperty("登陆账号") |
| | | private String account; |
| | | @ApiModelProperty("人员角色") |
| | | private String rolename; |
| | | @ApiModelProperty("店铺id") |
| | | private Integer storeId; |
| | | @ApiModelProperty("人员角色id") |
| | | private Long roleId; |
| | | @ApiModelProperty("状态 true = 禁用 ") |
| | |
| | | |
| | | @ApiModelProperty(value = "密码") |
| | | @TableField("password") |
| | | // @Length(min = 6, max = 16, message = "密码可输入6~16个字符") |
| | | @Length(min = 6, max = 16, message = "密码可输入6~16个字符") |
| | | @Excel(name = "密码_中英文1-10个字符", width = 15, orderNum = "2") |
| | | private String password; |
| | | |
| | |
| | | @ApiModelProperty(value = "区code") |
| | | @TableField("areaCode") |
| | | private String areaCode; |
| | | @ApiModelProperty(value = "图片") |
| | | @TableField("pictures") |
| | | private String pictures; |
| | | |
| | | public boolean isAdmin() |
| | | { |
| | |
| | | */ |
| | | @Override |
| | | public PageInfo<SecUsersVO> getSysUserList(SecUsersDTO dto) { |
| | | |
| | | if (dto.getPageSize() > 500) { |
| | | long count = this.count(); |
| | | dto.setPageSize(Math.toIntExact(count)); |
| | | } |
| | | |
| | | PageInfo<SecUsersVO> pageInfo = new PageInfo<>(dto.getPageNum(), dto.getPageSize()); |
| | | // 查询角色 |
| | | List<SecUsersVO> sysUserListVOS = secUserMapper.getSecUserList(dto, pageInfo); |
| | | List<SecRole> secRoles = secRoleMapper.selectList(Wrappers.lambdaQuery(SecRole.class)); |
| | | // List<SecRole> secRoles = secRoleMapper.selectList(Wrappers.lambdaQuery(SecRole.class)); |
| | | |
| | | |
| | | // for (SecUsersVO sysUserListVO : sysUserListVOS) { |
| | |
| | | throw new ServiceException("该账号已存在,请勿重复注册"); |
| | | } |
| | | dto.setAccount(dto.getPhone()); |
| | | dto.setUserType(3); |
| | | dto.setLastLoginTime(LocalDateTime.now()); |
| | | if (StringUtils.hasLength(dto.getPassword())) { |
| | | dto.setPassword(passwordEncoder.encode(dto.getPassword())); |
| | |
| | | package com.jilongda.manage.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.jilongda.common.basic.ApiResult; |
| | | import com.jilongda.manage.dto.SecFeeItemsDTO; |
| | | import com.jilongda.manage.model.SecFeeItems; |
| | | import com.jilongda.manage.model.SecSetting; |
| | | import com.jilongda.manage.service.SecFeeItemsService; |
| | | import com.jilongda.manage.service.SecSettingService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author 无关风月 |
| | | * @since 2024-12-09 |
| | | */ |
| | | @Api(tags = "收费项设置") |
| | | @RestController |
| | | @RequestMapping("/sec-fee-items") |
| | | public class SecFeeItemsController { |
| | | |
| | | |
| | | @Autowired |
| | | private SecFeeItemsService secFeeItemsService; |
| | | |
| | | /** |
| | | * 收费项设置 |
| | | */ |
| | | @ApiOperation(value = "收费项设置查询列表") |
| | | @PostMapping(value = "/list") |
| | | public ApiResult<List<SecFeeItems>> list() { |
| | | return ApiResult.success(secFeeItemsService.list()); |
| | | } |
| | | |
| | | /** |
| | | * 查询详情 |
| | | */ |
| | | @ApiOperation(value = "收费项设置修改") |
| | | @PostMapping(value = "/updateList") |
| | | public ApiResult<String> updateList(@RequestBody SecFeeItemsDTO dto ) { |
| | | List<SecFeeItems> secFeeItemsList = dto.getSecFeeItemsList(); |
| | | secFeeItemsService.updateBatchById(secFeeItemsList); |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "收费项设置启用禁用") |
| | | @GetMapping(value = "/upAndDown") |
| | | public ApiResult<Boolean> upAndDown(@RequestParam Long id, |
| | | @RequestParam Integer status) { |
| | | return ApiResult.success(secFeeItemsService.upAndDown(id,status)); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | package com.jilongda.manage.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.jilongda.common.basic.ApiResult; |
| | | import com.jilongda.manage.model.SecSetting; |
| | | import com.jilongda.manage.model.TFrameWarehousingDetail; |
| | | import com.jilongda.manage.model.TWarehousing; |
| | | import com.jilongda.manage.service.SecSettingService; |
| | | import com.jilongda.manage.vo.TWarehousingVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author 无关风月 |
| | | * @since 2024-12-09 |
| | | */ |
| | | @Api(tags = "低库存警告") |
| | | @RestController |
| | | @RequestMapping("/sec-setting") |
| | | public class SecSettingController { |
| | | |
| | | @Autowired |
| | | private SecSettingService secSettingService; |
| | | |
| | | /** |
| | | * 查询详情 |
| | | */ |
| | | @ApiOperation(value = "低库存警告查询") |
| | | @PostMapping(value = "/getDetailById") |
| | | public ApiResult<SecSetting> getDetailById() { |
| | | return ApiResult.success(secSettingService.getById(1)); |
| | | } |
| | | |
| | | /** |
| | | * 低库存警告修改 |
| | | */ |
| | | @ApiOperation(value = "低库存警告修改") |
| | | @PostMapping(value = "/updateById") |
| | | public ApiResult<String> updateById(@RequestBody SecSetting secSetting) { |
| | | secSettingService.updateById(secSetting); |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.jilongda.manage.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.jilongda.common.basic.ApiResult; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TOptometrist; |
| | | import com.jilongda.manage.query.TOptometristQuery; |
| | | import com.jilongda.manage.query.TicketQuery; |
| | | import com.jilongda.manage.service.TOptometristService; |
| | | import com.jilongda.manage.vo.TOptometristVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author 无关风月 |
| | | * @since 2024-12-09 |
| | | */ |
| | | @Api(tags = "验光师管理") |
| | | @RestController |
| | | @RequestMapping("/t-optometrist") |
| | | public class TOptometristController { |
| | | @Autowired |
| | | private TOptometristService optometristService; |
| | | |
| | | @ApiOperation(value = "验光师列表") |
| | | @PostMapping(value = "/pageList") |
| | | public ApiResult<PageInfo<TOptometristVO>> pageList(@RequestBody TOptometristQuery query) { |
| | | PageInfo<TOptometristVO> optometristVOPageInfo = optometristService.pageList(query); |
| | | return ApiResult.success(optometristVOPageInfo); |
| | | } |
| | | |
| | | @ApiOperation(value = "通过门店id查询验光师列表") |
| | | @PostMapping(value = "/queryListByStoreId") |
| | | public ApiResult<List<TOptometrist>> queryListByStoreId(@RequestParam Integer storeId) { |
| | | List<TOptometrist> optometristVOPageInfo = optometristService.list(Wrappers.lambdaQuery(TOptometrist.class) |
| | | .eq(TOptometrist::getStoreId,storeId)); |
| | | return ApiResult.success(optometristVOPageInfo); |
| | | } |
| | | |
| | | @ApiOperation(value = "验光师添加") |
| | | @PostMapping(value = "/add") |
| | | public ApiResult<String> add(@RequestBody TOptometrist dto) { |
| | | optometristService.save(dto); |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "验光师编辑") |
| | | @PostMapping(value = "/update") |
| | | public ApiResult<String> update(@RequestBody TOptometrist dto) { |
| | | optometristService.updateById(dto); |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "验光师上下架") |
| | | @GetMapping(value = "/upAndDown") |
| | | public ApiResult<Boolean> upAndDown(@RequestParam Integer id, |
| | | @RequestParam Integer status) { |
| | | return ApiResult.success(optometristService.upAndDown(id,status)); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.jilongda.manage.controller; |
| | | |
| | | |
| | | import com.jilongda.common.basic.ApiResult; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.common.constants.WarehousingConstant; |
| | | import com.jilongda.common.utils.CodeGenerateUtils; |
| | | import com.jilongda.manage.model.TOptometrist; |
| | | import com.jilongda.manage.model.TOrderAftersales; |
| | | import com.jilongda.manage.query.TOptometristQuery; |
| | | import com.jilongda.manage.query.TOrderAftersalesQuery; |
| | | import com.jilongda.manage.service.TOrderAftersalesService; |
| | | import com.jilongda.manage.vo.TOptometristVO; |
| | | import com.jilongda.manage.vo.TOrderAftersalesVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | * @author 无关风月 |
| | | * @since 2024-12-09 |
| | | */ |
| | | @Api(tags = "订单售后管理") |
| | | @RestController |
| | | @RequestMapping("/t-order-aftersales") |
| | | public class TOrderAftersalesController { |
| | | |
| | | |
| | | @Autowired |
| | | private TOrderAftersalesService orderAftersalesService; |
| | | |
| | | |
| | | @ApiOperation(value = "订单售后列表") |
| | | @PostMapping(value = "/pageList") |
| | | public ApiResult<PageInfo<TOrderAftersalesVO>> pageList(@RequestBody TOrderAftersalesQuery query) { |
| | | PageInfo<TOrderAftersalesVO> orderAftersalesVOPageInfo = orderAftersalesService.pageList(query); |
| | | return ApiResult.success(orderAftersalesVOPageInfo); |
| | | } |
| | | |
| | | @ApiOperation(value = "订单售后添加") |
| | | @PostMapping(value = "/add") |
| | | public ApiResult<String> add(@RequestBody TOrderAftersales dto) { |
| | | dto.setCode(WarehousingConstant.ASTER_SALES+ CodeGenerateUtils.generateVolumeSn()); |
| | | orderAftersalesService.save(dto); |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | package com.jilongda.manage.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.jilongda.common.basic.ApiResult; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TTicket; |
| | | import com.jilongda.manage.query.TWarehousingDetailQuery; |
| | | import com.jilongda.manage.query.TicketQuery; |
| | | import com.jilongda.manage.service.TTicketService; |
| | | import com.jilongda.manage.vo.TFrameWarehousingDetailVO; |
| | | import com.jilongda.manage.vo.TTicketVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import sun.security.krb5.internal.Ticket; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author 无关风月 |
| | | * @since 2024-12-09 |
| | | */ |
| | | @Api(tags = "小票机") |
| | | @RestController |
| | | @RequestMapping("/t-ticket") |
| | | public class TTicketController { |
| | | |
| | | |
| | | @Autowired |
| | | private TTicketService tTicketService; |
| | | |
| | | @ApiOperation(value = "小票机列表") |
| | | @PostMapping(value = "/pageList") |
| | | public ApiResult<PageInfo<TTicketVO>> pageList(@RequestBody TicketQuery query) { |
| | | PageInfo<TTicketVO> ticketVOPageInfo = tTicketService.pageList(query); |
| | | return ApiResult.success(ticketVOPageInfo); |
| | | } |
| | | |
| | | @ApiOperation(value = "小票机添加") |
| | | @PostMapping(value = "/add") |
| | | public ApiResult<String> add(@RequestBody TTicket dto) { |
| | | tTicketService.save(dto); |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "小票机编辑") |
| | | @PostMapping(value = "/update") |
| | | public ApiResult<String> update(@RequestBody TTicket dto) { |
| | | tTicketService.updateById(dto); |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "小票机上下架") |
| | | @GetMapping(value = "/upAndDown") |
| | | public ApiResult<Boolean> upAndDown(@RequestParam Integer id, |
| | | @RequestParam Integer status) { |
| | | return ApiResult.success(tTicketService.upAndDown(id,status)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.jilongda.manage.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.jilongda.common.basic.ApiResult; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.common.constants.WarehousingConstant; |
| | | import com.jilongda.common.enums.WarehousingTypeEnum; |
| | | import com.jilongda.common.security.JwtTokenUtils; |
| | | import com.jilongda.common.utils.CodeGenerateUtils; |
| | | import com.jilongda.manage.dto.TWarehousingDTO; |
| | | import com.jilongda.manage.model.TFrameWarehousingDetail; |
| | | import com.jilongda.manage.model.TWarehousing; |
| | | import com.jilongda.manage.query.TWarehousingDetailQuery; |
| | | import com.jilongda.manage.service.TFrameWarehousingDetailService; |
| | | import com.jilongda.manage.service.TWarehousingService; |
| | | import com.jilongda.manage.vo.TFrameWarehousingDetailVO; |
| | | import com.jilongda.manage.vo.TWarehousingVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | @Autowired |
| | | private TWarehousingService warehousingService; |
| | | @Autowired |
| | | private TFrameWarehousingDetailService frameWarehousingDetailService; |
| | | |
| | | /** |
| | | * 获取镜架/镜片出库入库列表 |
| | | * 出入库单列表 |
| | | */ |
| | | // @ApiOperation(value = "获取镜架/镜片出库入库分页列表") |
| | | // @PostMapping(value = "/pageList") |
| | | // public ApiResult<PageInfo<TWarehousingVO>> pageList(@RequestBody TWarehousingQuery query) { |
| | | // return ApiResult.success(warehousingService.pageList(query)); |
| | | // } |
| | | |
| | | // /** |
| | | // * 获取镜架/镜片出库入库列表 |
| | | // */ |
| | | // @ApiOperation(value = "获取镜架/镜片出库入库列表") |
| | | // @PostMapping(value = "/list") |
| | | // public ApiResult<List<TWarehousing>> list(@RequestBody TWarehousingQuery query) { |
| | | // List<TWarehousing> list = warehousingService.list(Wrappers.lambdaQuery(TWarehousing.class) |
| | | // .eq(TWarehousing::getStatus, 1)); |
| | | // return ApiResult.success(list); |
| | | // } |
| | | @ApiOperation(value = "镜架出入库单列表") |
| | | @PostMapping(value = "/inventoryReceiptList") |
| | | public ApiResult<PageInfo<TWarehousingVO>> inventoryReceiptList(@RequestBody TWarehousingDetailQuery query) { |
| | | return ApiResult.success(warehousingService.inventoryReceiptList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 添加镜架/镜片出库入库 |
| | | * 库存明细记录列表 |
| | | */ |
| | | @ApiOperation(value = "添加镜架/镜片出库入库") |
| | | @PostMapping(value = "/add") |
| | | public ApiResult<String> add(@Validated @RequestBody TWarehousing dto) { |
| | | @ApiOperation(value = "镜架库存明细记录列表") |
| | | @PostMapping(value = "/detailList") |
| | | public ApiResult<PageInfo<TFrameWarehousingDetailVO>> detailList(@RequestBody TWarehousingDetailQuery query) { |
| | | PageInfo<TFrameWarehousingDetailVO> frameWarehousingDetailVOPageInfo = warehousingService.detailList(query); |
| | | return ApiResult.success(frameWarehousingDetailVOPageInfo); |
| | | } |
| | | |
| | | /** |
| | | * 添加镜架出库,入库,作废,退货 |
| | | */ |
| | | @ApiOperation(value = "添加镜架出库,入库,作废,退货") |
| | | @PostMapping(value = "/outBound") |
| | | public ApiResult<String> outBound(@Validated @RequestBody TWarehousingDTO dto) { |
| | | // 获取当前用户 |
| | | String username = JwtTokenUtils.getUsername(); |
| | | dto.setCreateBy(username); |
| | | dto.setCreateTime(LocalDateTime.now()); |
| | | dto.setType(WarehousingTypeEnum.FRAME.getCode()); |
| | | warehousingService.save(dto); |
| | | |
| | | // 添加明细 |
| | | List<TFrameWarehousingDetail> frameWarehousingDetails = dto.getFrameWarehousingDetails(); |
| | | frameWarehousingDetails.forEach(detail -> { |
| | | detail.setWarehousingId(dto.getId()); |
| | | detail.setCode(WarehousingConstant.OUT_BOUND+CodeGenerateUtils.generateVolumeSn()); |
| | | }); |
| | | frameWarehousingDetailService.saveBatch(frameWarehousingDetails); |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | | /** |
| | | * 查询详情 |
| | | */ |
| | | @ApiOperation(value = "镜架查询详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public ApiResult<TWarehousingVO> getDetailById(@RequestParam Integer id) { |
| | | TWarehousing warehousing = warehousingService.getById(id); |
| | | TWarehousingVO vo = new TWarehousingVO(); |
| | | BeanUtils.copyProperties(warehousing, vo); |
| | | List<TFrameWarehousingDetail> list = frameWarehousingDetailService.list(Wrappers.lambdaQuery(TFrameWarehousingDetail.class) |
| | | .eq(TFrameWarehousingDetail::getWarehousingId, id)); |
| | | vo.setFrameWarehousingDetails(list); |
| | | // 统计数量 |
| | | vo.setTotalNum(list.stream().mapToInt(TFrameWarehousingDetail::getTotal).sum()); |
| | | return ApiResult.success(vo); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.jilongda.manage.dto; |
| | | |
| | | import com.jilongda.manage.model.SecFeeItems; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "收费项设置修改") |
| | | public class SecFeeItemsDTO implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "收费项") |
| | | private List<SecFeeItems> secFeeItemsList; |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.dto; |
| | | |
| | | import com.jilongda.manage.model.TFrameWarehousingDetail; |
| | | import com.jilongda.manage.model.TWarehousing; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "镜架出入库DTO") |
| | | public class TWarehousingDTO extends TWarehousing { |
| | | |
| | | @ApiModelProperty(value = "镜架出入库明细列表") |
| | | private List<TFrameWarehousingDetail> frameWarehousingDetails; |
| | | |
| | | } |
| | |
| | | package com.jilongda.manage.mapper; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TFrameWarehousingDetail; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.jilongda.manage.query.TWarehousingDetailQuery; |
| | | import com.jilongda.manage.vo.TFrameWarehousingDetailVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author 无关风月 |
| | | * @since 2024-12-09 |
| | | */ |
| | | @Mapper |
| | | public interface TFrameWarehousingDetailMapper extends BaseMapper<TFrameWarehousingDetail> { |
| | | |
| | | /** |
| | | * 分页列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TFrameWarehousingDetailVO> pageList(@Param("query") TWarehousingDetailQuery query, @Param("pageInfo") PageInfo<TFrameWarehousingDetailVO> pageInfo); |
| | | } |
| | |
| | | package com.jilongda.manage.mapper; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TOptometrist; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.jilongda.manage.query.TOptometristQuery; |
| | | import com.jilongda.manage.vo.TOptometristVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TOptometristMapper extends BaseMapper<TOptometrist> { |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TOptometristVO> pageList(@Param("query") TOptometristQuery query, @Param("pageInfo")PageInfo<TOptometristVO> pageInfo); |
| | | |
| | | } |
| | |
| | | package com.jilongda.manage.mapper; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TOrderAftersales; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.jilongda.manage.query.TOrderAftersalesQuery; |
| | | import com.jilongda.manage.vo.TOrderAftersalesVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TOrderAftersalesMapper extends BaseMapper<TOrderAftersales> { |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TOrderAftersalesVO> pageList(@Param("query") TOrderAftersalesQuery query, @Param("pageInfo")PageInfo<TOrderAftersalesVO> pageInfo); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.jilongda.manage.query.TStoreQuery; |
| | | import com.jilongda.manage.vo.TStoreVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author 无关风月 |
| | | * @since 2024-12-09 |
| | | */ |
| | | @Mapper |
| | | public interface TStoreMapper extends BaseMapper<TStore> { |
| | | |
| | | /** |
| | |
| | | package com.jilongda.manage.mapper; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TTicket; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.jilongda.manage.query.TicketQuery; |
| | | import com.jilongda.manage.vo.TTicketVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TTicketMapper extends BaseMapper<TTicket> { |
| | | |
| | | /** |
| | | * 分页查询小票机列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TTicketVO> pageList(@Param("query") TicketQuery query, @Param("pageInfo")PageInfo<TTicketVO> pageInfo); |
| | | |
| | | } |
| | |
| | | package com.jilongda.manage.mapper; |
| | | |
| | | import com.jilongda.manage.model.TWarehousing; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TWarehousing; |
| | | import com.jilongda.manage.query.TWarehousingDetailQuery; |
| | | import com.jilongda.manage.vo.TWarehousingVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TWarehousingMapper extends BaseMapper<TWarehousing> { |
| | | |
| | | /** |
| | | * |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TWarehousingVO> inventoryReceiptList(@Param("query") TWarehousingDetailQuery query, @Param("pageInfo")PageInfo<TWarehousingVO> pageInfo); |
| | | |
| | | } |
| | |
| | | @TableField("total") |
| | | private Integer total; |
| | | |
| | | @ApiModelProperty(value = "在库数量(出库没有该字段)") |
| | | @TableField("count") |
| | | private Integer count; |
| | | |
| | | @ApiModelProperty(value = "色号") |
| | | @TableField("color") |
| | | private String color; |
| | |
| | | @TableField("secret") |
| | | private String secret; |
| | | |
| | | @ApiModelProperty(value = "状态 1=启用 2=禁用") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | |
| | | } |
| | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "1出库2入库") |
| | | @ApiModelProperty(value = "1=出库,2=入库,3=作废,4=退货") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "关联订单号") |
| | | @TableField("orderNum") |
| | | private String orderNum; |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.query; |
| | | |
| | | import com.jilongda.common.pojo.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "验光师查询条件") |
| | | public class TOptometristQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "验光师名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "状态 1启用 2禁用") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "门店id") |
| | | private Integer storeId; |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.query; |
| | | |
| | | import com.jilongda.common.pojo.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "订单售后查询参数") |
| | | public class TOrderAftersalesQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "微信昵称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "门店id") |
| | | private Integer storeId; |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.query; |
| | | |
| | | import com.jilongda.common.dto.TimeRangePageDTO; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "明细记录查询/出入库单Query") |
| | | public class TWarehousingDetailQuery extends TimeRangePageDTO { |
| | | |
| | | @ApiModelProperty(value = "品牌") |
| | | private String brand; |
| | | |
| | | @ApiModelProperty(value = "供应商") |
| | | private String supplier; |
| | | |
| | | @ApiModelProperty(value = "色号") |
| | | private String color; |
| | | |
| | | @ApiModelProperty(value = "镜架型号") |
| | | private String model; |
| | | |
| | | @ApiModelProperty(value = "店铺id") |
| | | private Integer storeId; |
| | | |
| | | @ApiModelProperty(value = "类型 1=出库,2=入库,3=作废,4=退货") |
| | | private Integer status; |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.query; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.jilongda.common.pojo.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "小票机查询条件") |
| | | public class TicketQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "店铺id") |
| | | private Integer storeId; |
| | | |
| | | @ApiModelProperty(value = "类型 1验光单 2加工单") |
| | | private Integer type; |
| | | |
| | | } |
| | |
| | | */ |
| | | public interface SecFeeItemsService extends IService<SecFeeItems> { |
| | | |
| | | /** |
| | | * |
| | | * @param id |
| | | * @param status |
| | | * @return |
| | | */ |
| | | Boolean upAndDown(Long id, Integer status); |
| | | } |
| | |
| | | package com.jilongda.manage.service; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TOptometrist; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.jilongda.manage.query.TOptometristQuery; |
| | | import com.jilongda.manage.vo.TOptometristVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TOptometristService extends IService<TOptometrist> { |
| | | |
| | | Boolean upAndDown(Integer id, Integer status); |
| | | |
| | | /** |
| | | * 验光师列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TOptometristVO> pageList(TOptometristQuery query); |
| | | } |
| | |
| | | package com.jilongda.manage.service; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TOrderAftersales; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.jilongda.manage.query.TOrderAftersalesQuery; |
| | | import com.jilongda.manage.vo.TOrderAftersalesVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TOrderAftersalesService extends IService<TOrderAftersales> { |
| | | |
| | | /** |
| | | * 订单售后列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TOrderAftersalesVO> pageList(TOrderAftersalesQuery query); |
| | | } |
| | |
| | | package com.jilongda.manage.service; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TTicket; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.jilongda.manage.query.TicketQuery; |
| | | import com.jilongda.manage.vo.TTicketVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TTicketService extends IService<TTicket> { |
| | | |
| | | /** |
| | | * 小票机上下架 |
| | | * @param id |
| | | * @param status |
| | | * @return |
| | | */ |
| | | Boolean upAndDown(Integer id, Integer status); |
| | | |
| | | /** |
| | | * 小票机列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TTicketVO> pageList(TicketQuery query); |
| | | |
| | | } |
| | |
| | | package com.jilongda.manage.service; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TWarehousing; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.jilongda.manage.query.TWarehousingDetailQuery; |
| | | import com.jilongda.manage.vo.TFrameWarehousingDetailVO; |
| | | import com.jilongda.manage.vo.TWarehousingVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TWarehousingService extends IService<TWarehousing> { |
| | | |
| | | /** |
| | | * 库存明细记录列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TFrameWarehousingDetailVO> detailList(TWarehousingDetailQuery query); |
| | | |
| | | /** |
| | | * 出入库单列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TWarehousingVO> inventoryReceiptList(TWarehousingDetailQuery query); |
| | | |
| | | } |
| | |
| | | |
| | | import com.jilongda.manage.model.SecFeeItems; |
| | | import com.jilongda.manage.mapper.SecFeeItemsMapper; |
| | | import com.jilongda.manage.model.TMaterial; |
| | | import com.jilongda.manage.service.SecFeeItemsService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Service |
| | | public class SecFeeItemsServiceImpl extends ServiceImpl<SecFeeItemsMapper, SecFeeItems> implements SecFeeItemsService { |
| | | |
| | | @Override |
| | | public Boolean upAndDown(Long id, Integer status) { |
| | | SecFeeItems secFeeItems = this.baseMapper.selectById(id); |
| | | secFeeItems.setStatus(status); |
| | | return this.updateById(secFeeItems); |
| | | } |
| | | } |
| | |
| | | package com.jilongda.manage.service.impl; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.SecFeeItems; |
| | | import com.jilongda.manage.model.TOptometrist; |
| | | import com.jilongda.manage.mapper.TOptometristMapper; |
| | | import com.jilongda.manage.query.TOptometristQuery; |
| | | import com.jilongda.manage.service.TOptometristService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.jilongda.manage.vo.TOptometristVO; |
| | | import com.jilongda.manage.vo.TStoreVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TOptometristServiceImpl extends ServiceImpl<TOptometristMapper, TOptometrist> implements TOptometristService { |
| | | |
| | | @Override |
| | | public Boolean upAndDown(Integer id, Integer status) { |
| | | TOptometrist optometrist = this.baseMapper.selectById(id); |
| | | optometrist.setStatus(status); |
| | | return this.updateById(optometrist); |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<TOptometristVO> pageList(TOptometristQuery query) { |
| | | PageInfo<TOptometristVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TOptometristVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.jilongda.manage.service.impl; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TOrderAftersales; |
| | | import com.jilongda.manage.mapper.TOrderAftersalesMapper; |
| | | import com.jilongda.manage.query.TOrderAftersalesQuery; |
| | | import com.jilongda.manage.service.TOrderAftersalesService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.jilongda.manage.vo.TOrderAftersalesVO; |
| | | import com.jilongda.manage.vo.TSupplierVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TOrderAftersalesServiceImpl extends ServiceImpl<TOrderAftersalesMapper, TOrderAftersales> implements TOrderAftersalesService { |
| | | |
| | | @Override |
| | | public PageInfo<TOrderAftersalesVO> pageList(TOrderAftersalesQuery query) { |
| | | PageInfo<TOrderAftersalesVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TOrderAftersalesVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.jilongda.manage.service.impl; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.authority.vo.SecUserVO; |
| | | import com.jilongda.manage.mapper.TStoreMapper; |
| | | import com.jilongda.manage.model.TMaterial; |
| | | import com.jilongda.manage.model.TStore; |
| | | import com.jilongda.manage.model.TTicket; |
| | | import com.jilongda.manage.mapper.TTicketMapper; |
| | | import com.jilongda.manage.query.TicketQuery; |
| | | import com.jilongda.manage.service.TTicketService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.jilongda.manage.vo.TTicketVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TTicketServiceImpl extends ServiceImpl<TTicketMapper, TTicket> implements TTicketService { |
| | | |
| | | @Autowired |
| | | private TStoreMapper storeMapper; |
| | | @Override |
| | | public Boolean upAndDown(Integer id, Integer status) { |
| | | TTicket ticket = this.baseMapper.selectById(id); |
| | | ticket.setStatus(status); |
| | | return this.updateById(ticket); |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<TTicketVO> pageList(TicketQuery query) { |
| | | PageInfo<TTicketVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TTicketVO> list = this.baseMapper.pageList(query, pageInfo); |
| | | for (TTicketVO tTicketVO : list) { |
| | | TStore tStore = storeMapper.selectById(tTicketVO.getStoreId()); |
| | | if(Objects.nonNull(tStore)){ |
| | | tTicketVO.setStoreName(tTicketVO.getStoreName()); |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | // 获取列表 |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.jilongda.manage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.mapper.TFrameWarehousingDetailMapper; |
| | | import com.jilongda.manage.mapper.TStoreMapper; |
| | | import com.jilongda.manage.model.TFrameWarehousingDetail; |
| | | import com.jilongda.manage.model.TStore; |
| | | import com.jilongda.manage.model.TWarehousing; |
| | | import com.jilongda.manage.mapper.TWarehousingMapper; |
| | | import com.jilongda.manage.query.TWarehousingDetailQuery; |
| | | import com.jilongda.manage.service.TWarehousingService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.jilongda.manage.vo.TBrandVO; |
| | | import com.jilongda.manage.vo.TFrameWarehousingDetailVO; |
| | | import com.jilongda.manage.vo.TWarehousingVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TWarehousingServiceImpl extends ServiceImpl<TWarehousingMapper, TWarehousing> implements TWarehousingService { |
| | | |
| | | @Autowired |
| | | private TStoreMapper storeMapper; |
| | | @Autowired |
| | | private TFrameWarehousingDetailMapper frameWarehousingDetailMapper; |
| | | |
| | | @Override |
| | | public PageInfo<TFrameWarehousingDetailVO> detailList(TWarehousingDetailQuery query) { |
| | | PageInfo<TFrameWarehousingDetailVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TFrameWarehousingDetailVO> list = frameWarehousingDetailMapper.pageList(query,pageInfo); |
| | | for (TFrameWarehousingDetailVO tFrameWarehousingDetailVO : list) { |
| | | TStore tStore = storeMapper.selectById(tFrameWarehousingDetailVO.getStoreId()); |
| | | if(Objects.nonNull(tStore)){ |
| | | tFrameWarehousingDetailVO.setStoreName(tStore.getName()); |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<TWarehousingVO> inventoryReceiptList(TWarehousingDetailQuery query) { |
| | | PageInfo<TWarehousingVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TWarehousingVO> list = this.baseMapper.inventoryReceiptList(query,pageInfo); |
| | | for (TWarehousingVO tWarehousingVO : list) { |
| | | List<TFrameWarehousingDetail> tFrameWarehousingDetails = frameWarehousingDetailMapper.selectList(Wrappers.lambdaQuery(TFrameWarehousingDetail.class) |
| | | .eq(TFrameWarehousingDetail::getWarehousingId, tWarehousingVO.getId())); |
| | | if(CollectionUtils.isNotEmpty(tFrameWarehousingDetails)){ |
| | | tWarehousingVO.setTotalNum(tFrameWarehousingDetails.stream().mapToInt(TFrameWarehousingDetail::getTotal).sum()); |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.vo; |
| | | |
| | | import com.jilongda.manage.model.TFrameWarehousingDetail; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "镜架出库入库明细VO") |
| | | public class TFrameWarehousingDetailVO extends TFrameWarehousingDetail { |
| | | |
| | | @ApiModelProperty(value = "类型 1=出库,2=入库,3=作废,4=退货") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "门店id") |
| | | private Integer storeId; |
| | | |
| | | @ApiModelProperty(value = "门店名称") |
| | | private String storeName; |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.vo; |
| | | |
| | | import com.jilongda.manage.model.TOptometrist; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "验光师VO") |
| | | public class TOptometristVO extends TOptometrist { |
| | | |
| | | @ApiModelProperty(value = "门店名称") |
| | | private String storeName; |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.vo; |
| | | |
| | | import com.jilongda.manage.model.TOrderAftersales; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel(value = "售后列表VO") |
| | | public class TOrderAftersalesVO extends TOrderAftersales { |
| | | |
| | | @ApiModelProperty(value = "微信昵称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "姓名") |
| | | private String realName; |
| | | |
| | | @ApiModelProperty(value = "门店名称") |
| | | private String storeName; |
| | | |
| | | @ApiModelProperty(value = "订单金额") |
| | | private BigDecimal orderMoney; |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.vo; |
| | | |
| | | import com.jilongda.manage.model.TTicket; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "小票机VO") |
| | | public class TTicketVO extends TTicket { |
| | | |
| | | |
| | | @ApiModelProperty(value = "店铺名称") |
| | | private String storeName; |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.vo; |
| | | |
| | | import com.jilongda.manage.model.TFrameWarehousingDetail; |
| | | import com.jilongda.manage.model.TWarehousing; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "镜架/镜片出库入库VO") |
| | | public class TWarehousingVO extends TWarehousing { |
| | | |
| | | @ApiModelProperty(value = "出库/入库合计数量") |
| | | private Integer totalNum=0; |
| | | |
| | | @ApiModelProperty(value = "出库/入库明细") |
| | | private List<TFrameWarehousingDetail> frameWarehousingDetails; |
| | | |
| | | } |
| | |
| | | <result column="provinceCode" property="provinceCode"/> |
| | | <result column="cityCode" property="cityCode"/> |
| | | <result column="areaCode" property="areaCode"/> |
| | | <result column="pictures" property="pictures"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | |
| | | isDelete, |
| | | id, account, description, password, phone, `state`, last_login_time AS lastLoginTime, |
| | | nick_name AS nickName, avatar_url AS avatarUrl, province, city, area, address, birthday, gender,deptId,userType, |
| | | provinceCode, cityCode, areaCode,storeId |
| | | provinceCode, cityCode, areaCode,storeId,pictures |
| | | </sql> |
| | | |
| | | <sql id="Base_Column_List_Other"> |
| | |
| | | su.isDelete, |
| | | su.id, su.account, su.description, su.password, su.phone, su.`state`, su.last_login_time AS lastLoginTime, |
| | | su.nick_name AS nickName, su.avatar_url AS avatarUrl, su.province, su.city, su.area, su.address, su.birthday, su.gender,su.deptId,su.userType, |
| | | su.provinceCode, su.cityCode, su.areaCode |
| | | su.provinceCode, su.cityCode, su.areaCode,su.pictures |
| | | </sql> |
| | | |
| | | <select id="getSecUserList" resultType="com.jilongda.manage.authority.vo.SecUsersVO"> |
| | |
| | | su.state, |
| | | su.roleType, |
| | | su.last_login_time AS lastLoginTime, su.nick_name AS nickName, su.avatar_url AS avatarUrl, su.province, su.city, su.area, su.address, |
| | | su.birthday, su.gender,sr.id AS roleId,sr.rolename AS rolename,su.deptId,su.userType,su.provinceCode, su.cityCode, su.areaCode,td.deptName |
| | | su.birthday, su.gender,sr.id AS roleId,sr.rolename AS rolename,su.deptId,su.userType,su.provinceCode, su.cityCode, su.areaCode,su.pictures |
| | | FROM sec_user su |
| | | LEFT JOIN sec_user_role sur ON su.id = sur.user_id |
| | | LEFT JOIN sec_role sr ON sur.role_id = sr.id |
| | | LEFT JOIN t_dept td ON su.deptId = td.id |
| | | <where> |
| | | <if test="dto.account != null and dto.account != ''"> |
| | | AND su.account LIKE concat('%', #{dto.account,jdbcType=VARCHAR}, '%') |
| | | </if> |
| | | <if test="dto.nickName != null and dto.nickName != ''"> |
| | | AND su.nick_name LIKE concat('%', #{dto.nickName,jdbcType=VARCHAR}, '%') |
| | | </if> |
| | | <if test="dto.phone != null and dto.phone != ''"> |
| | | AND su.phone LIKE concat('%', #{dto.phone,jdbcType=VARCHAR}, '%') |
| | | </if> |
| | | <if test="dto.rolename != null and dto.rolename != ''"> |
| | | AND sr.rolename LIKE concat('%', #{dto.rolename,jdbcType=VARCHAR}, '%') |
| | | </if> |
| | | <if test="dto.state != null"> |
| | | AND su.state = #{dto.state} |
| | | </if> |
| | | <if test="dto.storeId != null"> |
| | | AND su.storeId = #{dto.storeId} |
| | | </if> |
| | | <if test="dto.roleId != null"> |
| | | AND sr.id = #{dto.roleId} |
| | | </if> |
| | | AND su.isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY su.createTime DESC |
| | |
| | | <result column="supplier" property="supplier" /> |
| | | <result column="material" property="material" /> |
| | | <result column="total" property="total" /> |
| | | <result column="count" property="count" /> |
| | | <result column="color" property="color" /> |
| | | <result column="model" property="model" /> |
| | | <result column="code" property="code" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, warehousingId, brand, supplier, material, total, count, color, model, code, createTime, updateTime, createBy, updateBy, isDelete, modelId |
| | | id, warehousingId, brand, supplier, material, total, color, model, code, createTime, updateTime, createBy, updateBy, isDelete, modelId |
| | | </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 |
| | | from t_frame_warehousing_detail tfwd |
| | | left join t_warehousing tw on tfwd.warehousingId = tw.id |
| | | <where> |
| | | <if test="query.brand != null and query.brand != ''"> |
| | | and tfwd.brand = #{query.brand} |
| | | </if> |
| | | <if test="query.supplier != null and query.supplier != ''"> |
| | | and tfwd.supplier = #{query.supplier} |
| | | </if> |
| | | <if test="query.color != null and query.color != ''"> |
| | | and tfwd.color = #{query.color} |
| | | </if> |
| | | <if test="query.model != null and query.model != ''"> |
| | | and tfwd.model like concat('%',#{query.model},'%') |
| | | </if> |
| | | <if test="query.storeId != null"> |
| | | and tw.storeId = #{query.storeId} |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and tw.status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | and tfwd.createTime between #{query.startTime} and #{query.endTime} |
| | | </if> |
| | | and tfwd.isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tfwd.createTime DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, name, phone, status, storeId, img, registerTime, createTime, updateTime, createBy, updateBy, isDelete |
| | | id, `name`, phone, status, storeId, img, registerTime, createTime, updateTime, createBy, updateBy, isDelete |
| | | </sql> |
| | | <select id="pageList" resultType="com.jilongda.manage.vo.TOptometristVO"> |
| | | select <include refid="Base_Column_List"></include> |
| | | from t_optometrist |
| | | <where> |
| | | <if test="query.name != null and query.name != ''"> |
| | | and `name` like concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and status = #{query.status} |
| | | </if> |
| | | <if test="query.storeId != null"> |
| | | and storeId = #{query.storeId} |
| | | </if> |
| | | and isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY createTime DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, code, sysId, optometristId, orderId, reason, handleResult, createTime, updateTime, createBy, updateBy, isDelete |
| | | </sql> |
| | | <select id="pageList" resultType="com.jilongda.manage.vo.TOrderAftersalesVO"> |
| | | select toa.id, toa.code, toa.sysId, toa.optometristId, toa.orderId, toa.reason, toa.handleResult, toa.createTime, toa.updateTime, |
| | | toa.createBy, toa.updateBy, toa.isDelete,tau.name, tau.phone, tau.realName, ts.storeName, o.orderMoney |
| | | from t_order_aftersales toa |
| | | left join t_app_user tau on toa.sysId = tau.id |
| | | left join t_store ts on toa.storeId = ts.id |
| | | left join t_order o on toa.orderId = o.id |
| | | <where> |
| | | <if test="query.name != null and query.name != ''"> |
| | | and tau.name like concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tau.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.storeId != null"> |
| | | and toa.storeId = #{query.phone} |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | and toa.createTime between #{query.startTime} and #{query.endTime} |
| | | </if> |
| | | and toa.isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY toa.createTime DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="createBy" property="createBy" /> |
| | | <result column="updateBy" property="updateBy" /> |
| | | <result column="isDelete" property="isDelete" /> |
| | | <result column="status" property="status" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, name, type, storeId, cloudId, secret, createTime, updateTime, createBy, updateBy, isDelete |
| | | id, `name`, `type`, storeId, cloudId, secret, createTime, updateTime, createBy, updateBy, isDelete |
| | | </sql> |
| | | <select id="pageList" resultType="com.jilongda.manage.vo.TTicketVO"> |
| | | select <include refid="Base_Column_List"></include> |
| | | from t_ticket |
| | | <where> |
| | | <if test="query.storeId != null"> |
| | | and storeId = #{query.storeId} |
| | | </if> |
| | | <if test="query.type != null"> |
| | | and `type` = #{query.type} |
| | | </if> |
| | | and isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | order by createTime desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, status, type, storeId, remark, createTime, updateTime, createBy, updateBy, isDelete |
| | | id, status, `type`, storeId, remark, createTime, updateTime, createBy, updateBy, isDelete |
| | | </sql> |
| | | <select id="inventoryReceiptList" resultType="com.jilongda.manage.vo.TWarehousingVO"> |
| | | select <include refid="Base_Column_List"></include> |
| | | from t_warehousing |
| | | <where> |
| | | <if test="query.storeId != null"> |
| | | and storeId = #{query.storeId} |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | and createTime between #{query.startTime} and #{query.endTime} |
| | | </if> |
| | | and isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY createTime DESC |
| | | </select> |
| | | |
| | | </mapper> |