提交 4f3c974a 作者: zhenjie

作业服务相关修改

上级 d36d5cde
...@@ -14,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -14,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List;
/** /**
* @author: zj * @author: zj
* @Date: 2023/8/3 17:58 * @Date: 2023/8/3 17:58
...@@ -60,10 +62,17 @@ public class IndustryTypeController { ...@@ -60,10 +62,17 @@ public class IndustryTypeController {
return industryTypeService.listInspectionsByIndustryTypeId(id); return industryTypeService.listInspectionsByIndustryTypeId(id);
} }
@ApiOperation(value = "一级行业详情") @ApiOperation(value = "一级行业详情-全部")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = IndustryTypeDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = IndustryTypeDTO.class)})
@GetMapping("getIndustryTypeById") @GetMapping("getIndustryTypeById")
public ResultBody<IndustryTypeDTO> getIndustryTypeById(@RequestParam Integer id){ public ResultBody<IndustryTypeDTO> getIndustryTypeById(@RequestParam Integer id){
return industryTypeService.getIndustryTypeById(id); return industryTypeService.getIndustryTypeById(id);
} }
@ApiOperation(value = "一级行业列表-全部")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = List.class)})
@PostMapping("listPages")
public List<IndustryTypeDTO> listIndustry(@Validated(value = {Page.class}) @RequestBody IndustryTypeQO industryTypeQO){
return industryTypeService.listIndustry(industryTypeQO);
}
} }
...@@ -85,7 +85,7 @@ public class MallGoodsController extends BaseController { ...@@ -85,7 +85,7 @@ public class MallGoodsController extends BaseController {
@ApiOperation(value = "删除用户时对应的商品也删除", hidden = true) @ApiOperation(value = "删除用户时对应的商品也删除", hidden = true)
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("feignRemoveGoodsByBackUserAccountId") @GetMapping("feignRemoveGoodsByBackUserAccountId")
public ResultBody feignRemoveGoodsByUserAccountId(@RequestParam(value = "id") Integer id) { public ResultBody feignRemoveGoodsByUserAccountId(@RequestParam(value = "id") Integer id, @RequestParam(value = "companyInfoId") Integer companyInfoId) {
return mallGoodsService.feignRemoveGoodsByBackUserAccountId(id); return mallGoodsService.feignRemoveGoodsByBackUserAccountId(id, companyInfoId);
} }
} }
...@@ -34,4 +34,6 @@ public interface CompanyInspectionDao { ...@@ -34,4 +34,6 @@ public interface CompanyInspectionDao {
List<CompanyInspectionDO> listAPPCompanyInspectionPage(CompanyInspectionQO companyInspectionQO); List<CompanyInspectionDO> listAPPCompanyInspectionPage(CompanyInspectionQO companyInspectionQO);
void batchDeleteFile(List<Integer> list); void batchDeleteFile(List<Integer> list);
void removeByCompanyInfoId(Integer companyInfoId);
} }
...@@ -25,6 +25,8 @@ public interface IndustryTypeDao { ...@@ -25,6 +25,8 @@ public interface IndustryTypeDao {
List<IndustryTypeDO> listPages(IndustryTypeQO industryTypeQO); List<IndustryTypeDO> listPages(IndustryTypeQO industryTypeQO);
List<IndustryTypeDO> listIndustry(IndustryTypeQO industryTypeQO);
List<InspectionDO> listInspectionsByIndustryTypeIdId(Integer industryTypeId); List<InspectionDO> listInspectionsByIndustryTypeIdId(Integer industryTypeId);
IndustryTypeDO getIndustryTypeById(Integer id); IndustryTypeDO getIndustryTypeById(Integer id);
......
package com.mmc.pms.model;
import com.mmc.pms.auth.dto.CompanyInfoVO;
import com.mmc.pms.model.other.dto.RoleInfoDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Email;
import java.io.Serializable;
import java.util.Date;
/**
* @author: zj
* @Date: 2023/6/21 17:32
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class BackUserAccountVO implements Serializable {
private static final long serialVersionUID = -9128622882856324055L;
@ApiModelProperty(value = "用户id")
private Integer id;
@ApiModelProperty(value = "用户uid")
private Integer uid;
@ApiModelProperty(value = "用户账号")
private String accountNo;
@ApiModelProperty(value = "手机号")
private String phoneNum;
@ApiModelProperty(value = "用户名称")
private String userName;
@ApiModelProperty(value = "用户昵称")
private String nickName;
@ApiModelProperty(value = "用户头像")
private String userImg;
@ApiModelProperty(value = "用户性别:0未知、1男、2女")
private Integer userSex;
@ApiModelProperty(value = "用户邮箱")
@Email
private String email;
@ApiModelProperty(value = "用户可用状态:0禁用、1可用")
private Integer accountStatus;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "注册时间")
private Date createTime;
@ApiModelProperty(value = "企业认证状态, 0未通过,1通过")
private Integer companyAuthStatus;
@ApiModelProperty(value = "合作标签id")
private Integer cooperationTagId;
@ApiModelProperty(value = "企业名称")
private String companyName;
@ApiModelProperty(value = "合作标签名称")
private String tagName;
@ApiModelProperty(value = "地址")
private String address;
@ApiModelProperty(value = "禁用状态")
private Integer disable;
@ApiModelProperty(value = "单位信息")
private CompanyInfoVO companyInfoVO;
@ApiModelProperty(value = "角色信息")
private RoleInfoDTO roleInfoDTO;
}
...@@ -27,4 +27,6 @@ public interface CompanyInspectionService { ...@@ -27,4 +27,6 @@ public interface CompanyInspectionService {
ResultBody listInspectionPriceUnit(); ResultBody listInspectionPriceUnit();
ResultBody<IndustryTypeDTO> listAPPCompanyInspectionPage(CompanyInspectionQO companyInspectionQO, LoginSuccessDTO loginSuccessDTO); ResultBody<IndustryTypeDTO> listAPPCompanyInspectionPage(CompanyInspectionQO companyInspectionQO, LoginSuccessDTO loginSuccessDTO);
void removeCompanyInspectionByCompanyInfoId(Integer companyInfoId);
} }
...@@ -5,6 +5,8 @@ import com.mmc.pms.model.inspection.dto.IndustryTypeDTO; ...@@ -5,6 +5,8 @@ import com.mmc.pms.model.inspection.dto.IndustryTypeDTO;
import com.mmc.pms.model.inspection.vo.IndustryTypeVO; import com.mmc.pms.model.inspection.vo.IndustryTypeVO;
import com.mmc.pms.model.qo.IndustryTypeQO; import com.mmc.pms.model.qo.IndustryTypeQO;
import java.util.List;
/** /**
* @author: zj * @author: zj
* @Date: 2023/8/3 18:00 * @Date: 2023/8/3 18:00
...@@ -21,4 +23,6 @@ public interface IndustryTypeService { ...@@ -21,4 +23,6 @@ public interface IndustryTypeService {
ResultBody<IndustryTypeDTO> listInspectionsByIndustryTypeId(Integer id); ResultBody<IndustryTypeDTO> listInspectionsByIndustryTypeId(Integer id);
ResultBody<IndustryTypeDTO> getIndustryTypeById(Integer id); ResultBody<IndustryTypeDTO> getIndustryTypeById(Integer id);
List<IndustryTypeDTO> listIndustry(IndustryTypeQO industryTypeQO);
} }
...@@ -146,6 +146,11 @@ public class CompanyInspectionServiceImpl implements CompanyInspectionService { ...@@ -146,6 +146,11 @@ public class CompanyInspectionServiceImpl implements CompanyInspectionService {
return ResultBody.success(PageResult.buildPage(pageNo, companyInspectionQO.getPageSize(), count, companyInspectionDTOS)); return ResultBody.success(PageResult.buildPage(pageNo, companyInspectionQO.getPageSize(), count, companyInspectionDTOS));
} }
@Override
public void removeCompanyInspectionByCompanyInfoId(Integer companyInfoId) {
companyInspectionDao.removeByCompanyInfoId(companyInfoId);
}
public void setCompanyName(List<CompanyInspectionDTO> companyInspectionDTOS, String token){ public void setCompanyName(List<CompanyInspectionDTO> companyInspectionDTOS, String token){
// 单位名称查询 // 单位名称查询
List<Integer> companyInfoIds = companyInspectionDTOS.stream().map(i -> i.getCompanyInfoId()).collect(Collectors.toList()); List<Integer> companyInfoIds = companyInspectionDTOS.stream().map(i -> i.getCompanyInfoId()).collect(Collectors.toList());
......
...@@ -91,4 +91,14 @@ public class IndustryTypeServiceImpl implements IndustryTypeService { ...@@ -91,4 +91,14 @@ public class IndustryTypeServiceImpl implements IndustryTypeService {
} }
return ResultBody.success(industryTypeDO.buildIndustryTypeDTO()); return ResultBody.success(industryTypeDO.buildIndustryTypeDTO());
} }
@Override
public List<IndustryTypeDTO> listIndustry(IndustryTypeQO industryTypeQO) {
List<IndustryTypeDO> industryTypeDOS = industryTypeDao.listIndustry(industryTypeQO);
if (CollectionUtils.isNotEmpty(industryTypeDOS)) {
List<IndustryTypeDTO> industryTypeDTOS = industryTypeDOS.stream().map(IndustryTypeDO::buildIndustryTypeDTO).collect(Collectors.toList());
return industryTypeDTOS;
}
return null;
}
} }
...@@ -33,7 +33,7 @@ public interface MallGoodsService { ...@@ -33,7 +33,7 @@ public interface MallGoodsService {
ResultBody removeMallGoods(Integer id); ResultBody removeMallGoods(Integer id);
ResultBody feignRemoveGoodsByBackUserAccountId(Integer id); ResultBody feignRemoveGoodsByBackUserAccountId(Integer id, Integer companyInfoId);
ResultBody checkInformation(LeaseGoodsVO leaseGoodsVO, MallGoodsVO mallGoodsVO, Integer userAccountId); ResultBody checkInformation(LeaseGoodsVO leaseGoodsVO, MallGoodsVO mallGoodsVO, Integer userAccountId);
......
...@@ -9,6 +9,8 @@ import com.mmc.pms.entity.lease.LeasePriceStockDO; ...@@ -9,6 +9,8 @@ import com.mmc.pms.entity.lease.LeasePriceStockDO;
import com.mmc.pms.entity.lease.LeaseSpecAttrDO; import com.mmc.pms.entity.lease.LeaseSpecAttrDO;
import com.mmc.pms.entity.lease.LeaseSpecAttrValueDO; import com.mmc.pms.entity.lease.LeaseSpecAttrValueDO;
import com.mmc.pms.entity.mall.*; import com.mmc.pms.entity.mall.*;
import com.mmc.pms.feign.UserAppApi;
import com.mmc.pms.model.BackUserAccountVO;
import com.mmc.pms.model.lease.vo.LeaseGoodsVO; import com.mmc.pms.model.lease.vo.LeaseGoodsVO;
import com.mmc.pms.model.lease.vo.LeasePriceStockVO; import com.mmc.pms.model.lease.vo.LeasePriceStockVO;
import com.mmc.pms.model.mall.GoodsResourcesVO; import com.mmc.pms.model.mall.GoodsResourcesVO;
...@@ -17,10 +19,12 @@ import com.mmc.pms.model.mall.PriceStockVO; ...@@ -17,10 +19,12 @@ import com.mmc.pms.model.mall.PriceStockVO;
import com.mmc.pms.model.mall.SpecAttrVO; import com.mmc.pms.model.mall.SpecAttrVO;
import com.mmc.pms.model.sale.qo.MallGoodsInfoQO; import com.mmc.pms.model.sale.qo.MallGoodsInfoQO;
import com.mmc.pms.page.PageResult; import com.mmc.pms.page.PageResult;
import com.mmc.pms.service.inspection.CompanyInspectionService;
import com.mmc.pms.service.mall.MallGoodsService; import com.mmc.pms.service.mall.MallGoodsService;
import com.mmc.pms.util.CodeUtil; import com.mmc.pms.util.CodeUtil;
import com.mmc.pms.util.TDateUtil; import com.mmc.pms.util.TDateUtil;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport; import org.springframework.transaction.interceptor.TransactionAspectSupport;
...@@ -41,6 +45,8 @@ public class MallGoodsServiceImpl implements MallGoodsService { ...@@ -41,6 +45,8 @@ public class MallGoodsServiceImpl implements MallGoodsService {
private MallGoodsDao mallGoodsDao; private MallGoodsDao mallGoodsDao;
@Resource @Resource
private LeaseGoodsDao leaseGoodsDao; private LeaseGoodsDao leaseGoodsDao;
@Autowired
private CompanyInspectionService companyInspectionService;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
...@@ -430,8 +436,10 @@ public class MallGoodsServiceImpl implements MallGoodsService { ...@@ -430,8 +436,10 @@ public class MallGoodsServiceImpl implements MallGoodsService {
} }
@Override @Override
public ResultBody feignRemoveGoodsByBackUserAccountId(Integer id) { public ResultBody feignRemoveGoodsByBackUserAccountId(Integer id, Integer companyInfoId) {
mallGoodsDao.feignRemoveGoodsByBackUserAccountId(id); mallGoodsDao.feignRemoveGoodsByBackUserAccountId(id);
// 删除团队服务
companyInspectionService.removeCompanyInspectionByCompanyInfoId(companyInfoId);
return ResultBody.success(); return ResultBody.success();
} }
} }
...@@ -108,6 +108,10 @@ ...@@ -108,6 +108,10 @@
update company_inspection set remark = #{remark} where id = #{id} update company_inspection set remark = #{remark} where id = #{id}
</update> </update>
<update id="removeByCompanyInfoId">
update company_inspection set is_deleted = 1 where company_info_id = #{companyInfoId}
</update>
<select id="getCompanyInspectionById" resultMap="companyInspectionResultMap"> <select id="getCompanyInspectionById" resultMap="companyInspectionResultMap">
select cins.id, cins.company_info_id, cins.service_area, cins.inspection_id, cins.inspection_tag_id, cins.price, select cins.id, cins.company_info_id, cins.service_area, cins.inspection_id, cins.inspection_tag_id, cins.price,
cins.price_remark, cins.inspection_price_unit_id,cins.detail_page, cins.sale_state, cins.remark, cins.create_time, cins.price_remark, cins.inspection_price_unit_id,cins.detail_page, cins.sale_state, cins.remark, cins.create_time,
...@@ -135,6 +139,9 @@ ...@@ -135,6 +139,9 @@
<if test="industryTypeId != null"> <if test="industryTypeId != null">
and it.id = #{industryTypeId} and it.id = #{industryTypeId}
</if> </if>
<if test="inspectionId != null">
and cins.inspection_id = #{inspectionId}
</if>
<if test="companyInfoId != null"> <if test="companyInfoId != null">
and cins.company_info_id = #{companyInfoId} and cins.company_info_id = #{companyInfoId}
</if> </if>
...@@ -160,6 +167,9 @@ ...@@ -160,6 +167,9 @@
<if test="industryTypeId != null"> <if test="industryTypeId != null">
and it.id = #{industryTypeId} and it.id = #{industryTypeId}
</if> </if>
<if test="inspectionId != null">
and cins.inspection_id = #{inspectionId}
</if>
<if test="companyInfoId != null"> <if test="companyInfoId != null">
and cins.company_info_id = #{companyInfoId} and cins.company_info_id = #{companyInfoId}
</if> </if>
......
...@@ -89,9 +89,22 @@ ...@@ -89,9 +89,22 @@
limit #{pageNo},#{pageSize} limit #{pageNo},#{pageSize}
</select> </select>
<select id="listIndustry" resultType="com.mmc.pms.entity.inspection.IndustryTypeDO">
select it.id, it.type_name, it.type_img, it.description, it.sale_state, it.is_deleted, it.create_time
from industry_type it
where 1 = 1
<if test="id != null">
and it.id = #{id}
</if>
<if test="typeName != null">
and it.type_name like concat('%',#{typeName},'%')
</if>
order by it.id DESC
</select>
<select id="getIndustryTypeById" resultType="com.mmc.pms.entity.inspection.IndustryTypeDO"> <select id="getIndustryTypeById" resultType="com.mmc.pms.entity.inspection.IndustryTypeDO">
select it.id, it.type_name, it.type_img, it.description, it.sale_state, it.is_deleted, it.create_time select it.id, it.type_name, it.type_img, it.description, it.sale_state, it.is_deleted, it.create_time
from industry_type it from industry_type it
where it.is_deleted = 0 and it.id = #{id} where it.id = #{id}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -24,4 +24,13 @@ data-filter: ...@@ -24,4 +24,13 @@ data-filter:
- /pms/app/goods/queryGoodsInfoByCategorySub - /pms/app/goods/queryGoodsInfoByCategorySub
- /pms/mall/goods/feignRemoveGoodsByBackUserAccountId - /pms/mall/goods/feignRemoveGoodsByBackUserAccountId
- /pms/app/lease/leaseGoodsDetails - /pms/app/lease/leaseGoodsDetails
- /pms/app/lease/leaseGoodsList - /pms/app/lease/leaseGoodsList
\ No newline at end of file - /pms/industry/listPages
- /pms/industry/listInspectionsByIndustryTypeId
- /pms/industry/getIndustryTypeById
- /pms/inspection/detail
- /pms/inspection-tag/listByInspectionId
- /pms/company-inspection/listInspectionPriceUnit
- /pms/company-inspection/listAPPCompanyInspectionPage
- /pms/company-inspection/getCompanyInspectionById
- /pms/company-inspection/listInspectionPriceUnit
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论