2022-12-21 修改产品管理部分问题

zhc4dev
赵玉瑞 2 years ago
parent 108629b797
commit 1f4f40a5fd
  1. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/entity/vo/AllClothStyle.java
  2. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java
  3. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModel.java
  4. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/mapper/ZyStyleModelMapper.java
  5. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/IZyStyleModelService.java
  6. 31
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java

@ -5,6 +5,7 @@ import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import java.util.List;
@ -20,6 +21,7 @@ public class AllClothStyle {
/**子模块 款式辅料*/
private List<ZyStyleAccessories> zyStyleAccessoriesList;
/*子模块 款式型号 因风格问题 暂不开发*/
private List<ZyStyleModel> zyStyleModels;
/**子模块 款式工序*/
private List<ZyStyleModular> zyStyleModularList;
}

@ -12,6 +12,8 @@ import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric;
import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.service.IZyStyleModelService;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
import org.springframework.beans.factory.annotation.Autowired;
@ -40,6 +42,8 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
private IZyStyleModularService zyStyleModularService;
@Autowired
private IZyStyleAccessoriesService zyStyleAccessoriesService;
@Autowired
private IZyStyleModelService zyStyleModelService;
@Resource
private ZyClothsStyleMapper zyClothsStyleMapper;
@ -64,7 +68,9 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
//服装 辅料详情
List<ZyStyleAccessories> zyStyleAccessoriesList = zyStyleAccessoriesService.detail(id);
zyAllClothStyle.setZyStyleAccessoriesList(zyStyleAccessoriesList);
//服装 款式型号
List<ZyStyleModel> zyStyleModels = zyStyleModelService.detail(id);
zyAllClothStyle.setZyStyleModels(zyStyleModels);
//服装 工序详情
List<ZyStyleModular> zyStyleModularList = zyStyleModularService.detail(id);
zyAllClothStyle.setZyStyleModularList(zyStyleModularList);

@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -44,6 +45,11 @@ public class ZyStyleModel implements Serializable {
@Excel(name = "是否默认尺码", width = 15)
@ApiModelProperty(value = "是否默认尺码")
private java.lang.Integer isdefault;
/**是否默认尺码*/
@TableField(exist = false)
private String isDefaultSize;
/**型号编码*/
@Excel(name = "型号编码", width = 15)
@ApiModelProperty(value = "型号编码")
@ -97,4 +103,6 @@ public class ZyStyleModel implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "创建时间")
private java.util.Date createTime;
}

@ -4,6 +4,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
/**
@ -14,4 +15,6 @@ import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
*/
public interface ZyStyleModelMapper extends BaseMapper<ZyStyleModel> {
@Select("SELECT * FROM zy_style_model WHERE style_id = #{id}")
List<ZyStyleModel> listByStyleId(String id);
}

@ -4,6 +4,8 @@ package org.jeecg.modules.zystylemodel.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import java.util.List;
/**
* @Description: zy_style_model
* @Author: jeecg-boot
@ -12,4 +14,5 @@ import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
*/
public interface IZyStyleModelService extends IService<ZyStyleModel> {
List<ZyStyleModel> detail(String id);
}

@ -2,10 +2,15 @@ package org.jeecg.modules.zystylemodel.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.mapper.ZyStyleModelMapper;
import org.jeecg.modules.zystylemodel.service.IZyStyleModelService;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.List;
/**
@ -17,4 +22,30 @@ import org.springframework.stereotype.Service;
@Service
public class ZyStyleModelServiceImpl extends ServiceImpl<ZyStyleModelMapper, ZyStyleModel> implements IZyStyleModelService {
@Resource
private ZyStyleModelMapper zyStyleModelMapper;
@Resource
private ZyStyleFabricMapper zyStyleFabricMapper;
@Override
public List<ZyStyleModel> detail(String id) {
List<ZyStyleModel> zyStyleModels = zyStyleModelMapper.listByStyleId(id);
for (ZyStyleModel zy : zyStyleModels) {
String styleName = zyStyleFabricMapper.getStyleNameByStyleId(zy.getStyleId());
if (StringUtils.hasText(styleName)) {
zy.setStyleId(styleName);
} else {
zy.setStyleId(null);
}
Integer isDefault = zy.getIsdefault();
if (isDefault == 0) {
zy.setIsDefaultSize("否");
} else if (isDefault == 1) {
zy.setIsDefaultSize("是");
} else {
zy.setIsDefaultSize(null);
}
}
return zyStyleModels;
}
}

Loading…
Cancel
Save