服装类型编号问题

zhc4dev
赵玉瑞 2 years ago
parent 0871cca2ea
commit f574cf1525
  1. 7
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java
  2. 4
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java
  3. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java
  4. 18
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java

@ -227,9 +227,10 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
//id.contains(",") 判断是否字符中是否包含","
return Result.error("只能选择一个企业");
} else {
String enterpriseName = zyClothsTypeMapper.getEnterprisenameById(id);
//根据企业名称拿到企业编号
return Result.OK(zyClothsTypeService.getEnterpriseNums(enterpriseName));
//String enterpriseName = zyClothsTypeMapper.getEnterprisenameById(id);
String enterpriseName = zyClothsTypeMapper.getEnterpriseNum(id);
//根据企业名称拿到企业编号 //two 是直接编号 然后做一个判断
return Result.OK(zyClothsTypeService.getEnterpriseNumsTwo(enterpriseName));
}
}

@ -26,6 +26,10 @@ public interface ZyClothsTypeMapper extends BaseMapper<ZyClothsType> {
/**根据部门id拿到部门名称*/
String getEnterprisenameById(String enterpriseId);
/**根据部门id拿到部门名称*/
@Select("select depart_name_abbr from sys_depart where id = #{id} ")
String getEnterpriseNum(String enterpriseId);
/**根据部门名称拿到部门id*/
String getEnterpriseName(String enterpriseName);

@ -19,6 +19,8 @@ public interface IZyClothsTypeService extends IService<ZyClothsType> {
/**根据企业名称拿到企业编号*/
String getEnterpriseNums(String enterpriseName);
/**根据企业名称拿到企业编号*/
String getEnterpriseNumsTwo(String enterpriseName);
Long orderNumber();

@ -38,9 +38,10 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl<ZyClothsTypeMapper, ZyC
@Override
public String sort(String enterpriseId) {
String format = String.format("%06d", orderNumber());
String enterpriseName = zyClothsTypeMapper.getEnterprisenameById(enterpriseId);
//现在是拿到企业编号
String enterpriseName = zyClothsTypeMapper.getEnterpriseNum(enterpriseId);
//根据企业名称拿到企业编号
String enterpriseNums = getEnterpriseNums(enterpriseName);
String enterpriseNums = getEnterpriseNumsTwo(enterpriseName);
return enterpriseNums + format;
}
@ -80,6 +81,19 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl<ZyClothsTypeMapper, ZyC
return "NONE";
}
/**
* 根据企业名称拿到企业编号
*
* @param enterpriseName
*/
@Override
public String getEnterpriseNumsTwo(String enterpriseName) {
if (StringUtils.isEmpty(enterpriseName)) {
return "NULL";
}
return enterpriseName;
}
@Override
public Long orderNumber() {
//List<String> listString = zyClothsTypeMapper.selectNumsList();

Loading…
Cancel
Save