feat():前端组件样式修改,后端逻辑优化;

master
jiyufei 3 months ago
parent 47398d5952
commit 71d48d032b

@ -18,8 +18,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
public interface YysCalendarService extends IService<YysCalendarEntity> {
List<YysCalendarEntity> getList(YysCalendarPagination yysCalendarPagination);
List<YysCalendarEntity> getTypeList(YysCalendarPagination yysCalendarPagination, String dataType);
YysCalendarEntity getInfo(String id);
void delete(YysCalendarEntity entity);

@ -11,7 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-08-05
* 2024-08-06
*/
public interface YysGroupService extends IService<YysGroupEntity> {
List<YysGroupEntity> getList(YysGroupPagination yysGroupPagination);

@ -34,6 +34,7 @@ import java.time.format.DateTimeParseException;
import java.time.temporal.ChronoField;
import java.time.temporal.TemporalAccessor;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
@ -56,174 +57,16 @@ public class YysCalendarServiceImpl extends ServiceImpl<YysCalendarMapper, YysCa
@Override
public List<YysCalendarEntity> getList(YysCalendarPagination yysCalendarPagination) {
return getTypeList(yysCalendarPagination, yysCalendarPagination.getDataType());
}
/**
*
*/
@Override
public List<YysCalendarEntity> getTypeList(YysCalendarPagination yysCalendarPagination, String dataType) {
String userId = userProvider.get().getUserId();
List<String> AllIdList = new ArrayList();
List<List<String>> intersectionList = new ArrayList<>();
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
String columnData = !isPc ? YysCalendarConstant.getAppColumnData() : YysCalendarConstant.getColumnData();
ColumnDataModel columnDataModel = JsonUtil.getJsonToBean(columnData, ColumnDataModel.class);
String ruleJson = !isPc ? JsonUtil.getObjectToString(columnDataModel.getRuleListApp()) : JsonUtil.getObjectToString(columnDataModel.getRuleList());
int total = 0;
int yysCalendarNum = 0;
QueryWrapper<YysCalendarEntity> yysCalendarQueryWrapper = new QueryWrapper<>();
List<String> allSuperIDlist = new ArrayList<>();
String superOp = "";
if (ObjectUtil.isNotEmpty(yysCalendarPagination.getSuperQueryJson())) {
List<String> allSuperList = new ArrayList<>();
List<List<String>> intersectionSuperList = new ArrayList<>();
String queryJson = yysCalendarPagination.getSuperQueryJson();
SuperJsonModel superJsonModel = JsonUtil.getJsonToBean(queryJson, SuperJsonModel.class);
int superNum = 0;
QueryWrapper<YysCalendarEntity> yysCalendarSuperWrapper = new QueryWrapper<>();
yysCalendarSuperWrapper = generaterSwapUtil.getCondition(new QueryModel(yysCalendarSuperWrapper, YysCalendarEntity.class, queryJson, "0"));
int yysCalendarNum1 = yysCalendarSuperWrapper.getExpression().getNormal().size();
if (yysCalendarNum1 > 0) {
List<String> yysCalendarList = this.list(yysCalendarSuperWrapper).stream().map(YysCalendarEntity::getId).collect(Collectors.toList());
allSuperList.addAll(yysCalendarList);
intersectionSuperList.add(yysCalendarList);
superNum++;
}
superOp = superNum > 0 ? superJsonModel.getMatchLogic() : "";
//and or
if (superOp.equalsIgnoreCase("and")) {
allSuperIDlist = generaterSwapUtil.getIntersection(intersectionSuperList);
} else {
allSuperIDlist = allSuperList;
}
}
List<String> allRuleIDlist = new ArrayList<>();
String ruleOp = "";
if (ObjectUtil.isNotEmpty(ruleJson)) {
List<String> allRuleList = new ArrayList<>();
List<List<String>> intersectionRuleList = new ArrayList<>();
SuperJsonModel ruleJsonModel = JsonUtil.getJsonToBean(ruleJson, SuperJsonModel.class);
int ruleNum = 0;
QueryWrapper<YysCalendarEntity> yysCalendarSuperWrapper = new QueryWrapper<>();
yysCalendarSuperWrapper = generaterSwapUtil.getCondition(new QueryModel(yysCalendarSuperWrapper, YysCalendarEntity.class, ruleJson, "0"));
int yysCalendarNum1 = yysCalendarSuperWrapper.getExpression().getNormal().size();
if (yysCalendarNum1 > 0) {
List<String> yysCalendarList = this.list(yysCalendarSuperWrapper).stream().map(YysCalendarEntity::getId).collect(Collectors.toList());
allRuleList.addAll(yysCalendarList);
intersectionRuleList.add(yysCalendarList);
ruleNum++;
}
ruleOp = ruleNum > 0 ? ruleJsonModel.getMatchLogic() : "";
//and or
if (ruleOp.equalsIgnoreCase("and")) {
allRuleIDlist = generaterSwapUtil.getIntersection(intersectionRuleList);
} else {
allRuleIDlist = allRuleList;
}
}
boolean pcPermission = false;
boolean appPermission = false;
if (isPc && pcPermission) {
if (!userProvider.get().getIsAdministrator()) {
Object yysCalendarObj = generaterSwapUtil.getAuthorizeCondition(new QueryModel(yysCalendarQueryWrapper, YysCalendarEntity.class, yysCalendarPagination.getMenuId(), "0"));
if (ObjectUtil.isEmpty(yysCalendarObj)) {
return new ArrayList<>();
} else {
yysCalendarQueryWrapper = (QueryWrapper<YysCalendarEntity>) yysCalendarObj;
if (yysCalendarQueryWrapper.getExpression().getNormal().size() > 0) {
yysCalendarNum++;
}
}
}
}
if (!isPc && appPermission) {
if (!userProvider.get().getIsAdministrator()) {
Object yysCalendarObj = generaterSwapUtil.getAuthorizeCondition(new QueryModel(yysCalendarQueryWrapper, YysCalendarEntity.class, yysCalendarPagination.getMenuId(), "0"));
if (ObjectUtil.isEmpty(yysCalendarObj)) {
return new ArrayList<>();
} else {
yysCalendarQueryWrapper = (QueryWrapper<YysCalendarEntity>) yysCalendarObj;
if (yysCalendarQueryWrapper.getExpression().getNormal().size() > 0) {
yysCalendarNum++;
}
}
}
}
if (isPc) {
if (ObjectUtil.isNotEmpty(yysCalendarPagination.getYears())) {
yysCalendarNum++;
QueryWrapper<YysCalendarEntity> wrapper = new QueryWrapper<>();
// List YearsList = JsonUtil.getJsonToList(yysCalendarPagination.getYears(), String.class);
// Long fir = Long.valueOf(String.valueOf(YearsList.get(0)));
// Long sec = Long.valueOf(String.valueOf(YearsList.get(1)));
//
// yysCalendarQueryWrapper.lambda().ge(YysCalendarEntity::getYears, new Date(fir))
// .le(YysCalendarEntity::getYears, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
yysCalendarQueryWrapper.lambda().eq(YysCalendarEntity::getYears, yysCalendarPagination.getYears().toString());
}
}
List<String> intersection = generaterSwapUtil.getIntersection(intersectionList);
if (total > 0) {
if (intersection.size() == 0) {
intersection.add("jnpfNullList");
}
yysCalendarQueryWrapper.lambda().in(YysCalendarEntity::getId, intersection);
}
//是否有高级查询
if (StringUtil.isNotEmpty(superOp)) {
if (allSuperIDlist.size() == 0) {
allSuperIDlist.add("jnpfNullList");
}
List<String> finalAllSuperIDlist = allSuperIDlist;
yysCalendarQueryWrapper.lambda().and(t -> t.in(YysCalendarEntity::getId, finalAllSuperIDlist));
}
//是否有数据过滤查询
if (StringUtil.isNotEmpty(ruleOp)) {
if (allRuleIDlist.size() == 0) {
allRuleIDlist.add("jnpfNullList");
}
List<String> finalAllRuleIDlist = allRuleIDlist;
yysCalendarQueryWrapper.lambda().and(t -> t.in(YysCalendarEntity::getId, finalAllRuleIDlist));
}
//假删除标志
yysCalendarQueryWrapper.lambda().isNull(YysCalendarEntity::getDeleteMark);
//排序
if (StringUtil.isEmpty(yysCalendarPagination.getSidx())) {
yysCalendarQueryWrapper.lambda().orderByDesc(YysCalendarEntity::getId);
} else {
try {
String sidx = yysCalendarPagination.getSidx();
String[] strs = sidx.split("_name");
YysCalendarEntity yysCalendarEntity = new YysCalendarEntity();
Field declaredField = yysCalendarEntity.getClass().getDeclaredField(strs[0]);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
yysCalendarQueryWrapper = "asc".equals(yysCalendarPagination.getSort().toLowerCase()) ? yysCalendarQueryWrapper.orderByAsc(value) : yysCalendarQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
if ("0".equals(dataType)) {
if ((total > 0 && AllIdList.size() > 0) || total == 0) {
Page<YysCalendarEntity> page = new Page<>(yysCalendarPagination.getCurrentPage(), yysCalendarPagination.getPageSize());
IPage<YysCalendarEntity> userIPage = this.page(page, yysCalendarQueryWrapper);
return yysCalendarPagination.setData(userIPage.getRecords(), userIPage.getTotal());
} else {
List<YysCalendarEntity> list = new ArrayList();
return yysCalendarPagination.setData(list, list.size());
}
} else {
return this.list(yysCalendarQueryWrapper);
if (ObjectUtil.isNotEmpty(yysCalendarPagination.getYears())) {
wrapper.lambda().eq(YysCalendarEntity::getYears, yysCalendarPagination.getYears().toString());
}
wrapper.lambda().isNull(YysCalendarEntity::getDeleteMark);
wrapper.last("ORDER BY CAST(day AS UNSIGNED)");
Page<YysCalendarEntity> page = new Page<>(yysCalendarPagination.getCurrentPage(), yysCalendarPagination.getPageSize());
IPage<YysCalendarEntity> userIPage = this.page(page, wrapper);
return yysCalendarPagination.setData(userIPage.getRecords(), userIPage.getTotal());
}
@Override
@ -276,7 +119,6 @@ public class YysCalendarServiceImpl extends ServiceImpl<YysCalendarMapper, YysCa
@Transactional
public String saveOrUpdate(YysCalendarForm yysCalendarForm, String id, boolean isSave) {
UserInfo userInfo = userProvider.get();
YysCalendarEntity entity = BeanUtil.copyProperties(yysCalendarForm, YysCalendarEntity.class);
LambdaQueryWrapper<YysCalendarEntity> wrapper = new LambdaQueryWrapper<>(YysCalendarEntity.class)
.eq(YysCalendarEntity::getYears, yysCalendarForm.getYears());
if (CollectionUtils.isNotEmpty(this.list(wrapper))) {
@ -286,12 +128,14 @@ public class YysCalendarServiceImpl extends ServiceImpl<YysCalendarMapper, YysCa
//根据年月判断多少天 然后循环创建多少条数据
int countedDays = this.countDays(yysCalendarForm.getYears());
for (int i = 1; i <= countedDays; i++) {
YysCalendarEntity entity = BeanUtil.copyProperties(yysCalendarForm, YysCalendarEntity.class);
String mainId = RandomUtil.uuId();
entity.setCreatorTime(DateUtil.getNowDate());
entity.setCreatorUserId(userInfo.getUserId());
entity.setId(mainId);
entity.setVersion(0);
entity.setDay(String.valueOf(i));
entity.setWeek(this.DateToWeekday(entity.getYears(), entity.getDay()));
list.add(entity);
}
boolean result = this.saveBatch(list);
@ -314,11 +158,37 @@ public class YysCalendarServiceImpl extends ServiceImpl<YysCalendarMapper, YysCa
this.updateById(calendar);
}
private int countDays(String dateStr) {
private int countDays(String years) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
TemporalAccessor parsed = formatter.parse(dateStr);
TemporalAccessor parsed = formatter.parse(years);
LocalDate date = LocalDate.of(parsed.get(ChronoField.YEAR), parsed.get(ChronoField.MONTH_OF_YEAR), 1);
// 获取这个月的天数
return date.lengthOfMonth();
}
private String DateToWeekday(String years, String day) {
String year = years.substring(0, 4);
String mouth = years.substring(4, 6);
LocalDate date = LocalDate.of(Integer.parseInt(year), Integer.parseInt(mouth), Integer.parseInt(day));
// 获取星期几注意周日是1周一是2...周六是7
int dayOfWeek = date.getDayOfWeek().getValue();
switch (dayOfWeek) {
case 1:
return "星期一";
case 2:
return "星期二";
case 3:
return "星期三";
case 4:
return "星期四";
case 5:
return "星期五";
case 6:
return "星期六";
case 7:
return "星期日";
default:
return "未知";
}
}
}

@ -79,7 +79,6 @@ public class YysPostServiceImpl extends ServiceImpl<YysPostMapper, YysPostEntity
int total = 0;
int yysPostNum = 0;
QueryWrapper<YysPostEntity> yysPostQueryWrapper = new QueryWrapper<>();
yysPostQueryWrapper.lambda().orderByAsc(YysPostEntity::getPostSort);
yysPostQueryWrapper.lambda().isNull(YysPostEntity::getDeleteMark);
List<String> allSuperIDlist = new ArrayList<>();
String superOp = "";
@ -235,22 +234,7 @@ public class YysPostServiceImpl extends ServiceImpl<YysPostMapper, YysPostEntity
yysPostQueryWrapper.lambda().and(t -> t.in(YysPostEntity::getId, finalAllRuleIDlist));
}
//排序
if (StringUtil.isEmpty(yysPostPagination.getSidx())) {
yysPostQueryWrapper.lambda().orderByDesc(YysPostEntity::getId);
} else {
try {
String sidx = yysPostPagination.getSidx();
String[] strs = sidx.split("_name");
YysPostEntity yysPostEntity = new YysPostEntity();
Field declaredField = yysPostEntity.getClass().getDeclaredField(strs[0]);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
yysPostQueryWrapper = "asc".equals(yysPostPagination.getSort().toLowerCase()) ? yysPostQueryWrapper.orderByAsc(value) : yysPostQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
yysPostQueryWrapper.last("ORDER BY CAST(postSort AS UNSIGNED)");
if ("0".equals(dataType)) {
if ((total > 0 && AllIdList.size() > 0) || total == 0) {
@ -340,8 +324,8 @@ public class YysPostServiceImpl extends ServiceImpl<YysPostMapper, YysPostEntity
entity.setCreatorUserId(userInfo.getUserId());
entity.setId(mainId);
} else {
entity.setLastModifyTime(DateUtil.getNowDate());
entity.setLastModifyUserId(userInfo.getUserId());
entity.setLastModifyTime(DateUtil.getNowDate());
entity.setLastModifyUserId(userInfo.getUserId());
}
this.saveOrUpdate(entity);

@ -1,53 +1,39 @@
package jnpf.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.xuyanwu.spring.file.storage.FileInfo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.exception.DataException;
import jnpf.permission.entity.UserEntity;
import jnpf.service.*;
import jnpf.entity.*;
import jnpf.util.*;
import jnpf.model.yysgroup.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.*;
import jnpf.annotation.JnpfField;
import jnpf.base.model.ColumnDataModel;
import jnpf.base.util.VisualUtils;
import jnpf.base.vo.DownloadVO;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
import jnpf.base.vo.DownloadVO;
import jnpf.config.ConfigValueUtil;
import jnpf.base.entity.ProvinceEntity;
import java.io.IOException;
import java.util.stream.Collectors;
import jnpf.engine.entity.FlowTaskEntity;
import jnpf.exception.WorkFlowException;
import org.springframework.web.multipart.MultipartFile;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import jnpf.entity.YysGroupEntity;
import jnpf.model.visualJson.config.HeaderModel;
import jnpf.model.yysgroup.YysGroupConstant;
import jnpf.model.yysgroup.YysGroupForm;
import jnpf.model.yysgroup.YysGroupPagination;
import jnpf.service.YysGroupService;
import jnpf.util.*;
import lombok.Cleanup;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Workbook;
import java.io.File;
import jnpf.onlinedev.model.ExcelImFieldModel;
import jnpf.onlinedev.model.OnlineImport.ImportDataModel;
import jnpf.onlinedev.model.OnlineImport.ImportFormCheckUniqueModel;
import jnpf.onlinedev.model.OnlineImport.ExcelImportModel;
import jnpf.onlinedev.model.OnlineImport.VisualImportModel;
import cn.xuyanwu.spring.file.storage.FileInfo;
import lombok.Cleanup;
import jnpf.model.visualJson.config.HeaderModel;
import jnpf.base.model.ColumnDataModel;
import jnpf.base.util.VisualUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.Valid;
import java.io.IOException;
import java.util.*;
/**
* yysGroup

@ -20,6 +20,8 @@ public class YysCalendarEntity {
private String years;
@TableField("DAY")
private String day;
@TableField("WEEK")
private String week;
@TableField("IS_HOLIDAY")
private String isHoliday;
@TableField("F_CREATOR_TIME")

@ -9,7 +9,7 @@ import java.util.Map;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-08-05
* @ 2024-08-06
*/
public class YysGroupConstant{
/** 数据库链接 */
@ -21,7 +21,7 @@ public class YysGroupConstant{
/** 整个表单配置json */
public static final String getFormData(){
StringBuilder sb = new StringBuilder();
sb.append("{\"popupType\":\"general\",\"idGlobal\":105,\"formBtns\":false,\"labelWidth\":100,\"classNames\":[],\"className\":[],\"fullScreenWidth\":\"100%\",\"hasConfirmAndAddBtn\":true,\"labelPosition\":\"right\",\"printId\":\"\",\"disabled\":false,\"formModel\":\"dataForm\",\"cancelButtonText\":\"取 消\",\"confirmButtonText\":\"确 定\",\"hasCancelBtn\":true,\"primaryKeyPolicy\":1,\"confirmAndAddText\":\"确定并继续操作\",\"hasPrintBtn\":false,\"concurrencyLock\":true,\"classJson\":\"\",\"drawerWidth\":\"600px\",\"printButtonText\":\"打 印\",\"formRef\":\"formRef\",\"gutter\":15,\"logicalDelete\":true,\"size\":\"small\",\"formRules\":\"rules\",\"generalWidth\":\"600px\",\"hasConfirmBtn\":true,\"formStyle\":\"\",\"fields\":[{\"clearable\":true,\"suffixIcon\":\"\",\"addonAfter\":\"\",\"__config__\":{\"formId\":101,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"input\",\"noShow\":false,\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"班组名称\",\"trigger\":\"blur\",\"showLabel\":true,\"required\":true,\"tableName\":\"yys_group\",\"renderKey\":1722846415741,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-input\",\"unique\":false,\"tag\":\"JnpfInput\",\"regList\":[],\"span\":24},\"readonly\":false,\"showWordLimit\":false,\"__vModel__\":\"groupName\",\"showPassword\":false,\"style\":{\"width\":\"100%\"},\"disabled\":false,\"placeholder\":\"请输入班组名称\",\"prefixIcon\":\"\",\"addonBefore\":\"\"},{\"filterable\":false,\"clearable\":true,\"__config__\":{\"formId\":102,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"select\",\"defaultValue\":\"\",\"noShow\":false,\"dataType\":\"static\",\"dictionaryType\":\"\",\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"班组类型\",\"trigger\":\"change\",\"propsUrl\":\"\",\"templateJson\":[],\"showLabel\":true,\"required\":true,\"tableName\":\"yys_group\",\"renderKey\":1722846446702,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-select\",\"propsName\":\"\",\"tag\":\"JnpfSelect\",\"regList\":[],\"span\":24},\"options\":[{\"fullName\":\"生产线\",\"id\":\"1\"},{\"fullName\":\"包装线\",\"id\":\"2\"}],\"multiple\":false,\"__vModel__\":\"groupType\",\"style\":{\"width\":\"100%\"},\"disabled\":false,\"interfaceHasPage\":false,\"placeholder\":\"请选择班组类型\",\"props\":{\"label\":\"fullName\",\"value\":\"id\"}},{\"clearable\":true,\"__config__\":{\"formId\":103,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"userSelect\",\"noShow\":false,\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"组长\",\"trigger\":\"change\",\"showLabel\":true,\"required\":true,\"relationField\":\"\",\"tableName\":\"yys_group\",\"renderKey\":1722846480279,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-user\",\"defaultCurrent\":false,\"tag\":\"JnpfUserSelect\",\"regList\":[],\"span\":24},\"ableIds\":[],\"multiple\":false,\"__vModel__\":\"leader\",\"style\":{\"width\":\"100%\"},\"selectType\":\"all\",\"disabled\":false,\"placeholder\":\"请选择组长\",\"relationField\":\"\"},{\"clearable\":true,\"__config__\":{\"formId\":104,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"userSelect\",\"defaultValue\":\"\",\"noShow\":false,\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"成员\",\"trigger\":\"change\",\"showLabel\":true,\"required\":true,\"relationField\":\"\",\"tableName\":\"yys_group\",\"renderKey\":1722846506336,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-user\",\"defaultCurrent\":false,\"tag\":\"JnpfUserSelect\",\"regList\":[],\"span\":24},\"ableIds\":[],\"multiple\":false,\"__vModel__\":\"member\",\"style\":{\"width\":\"100%\"},\"selectType\":\"all\",\"disabled\":false,\"placeholder\":\"请选择成员\",\"relationField\":\"\"},{\"filterable\":false,\"clearable\":true,\"__config__\":{\"formId\":105,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"select\",\"defaultValue\":\"1\",\"noShow\":false,\"dataType\":\"static\",\"dictionaryType\":\"\",\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"启用状态\",\"trigger\":\"change\",\"propsUrl\":\"\",\"templateJson\":[],\"showLabel\":true,\"required\":true,\"tableName\":\"yys_group\",\"renderKey\":1722846553507,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-select\",\"propsName\":\"\",\"tag\":\"JnpfSelect\",\"regList\":[],\"span\":24},\"options\":[{\"fullName\":\"启用\",\"id\":\"1\"},{\"fullName\":\"未启用\",\"id\":\"2\"}],\"multiple\":false,\"__vModel__\":\"enabledStatus\",\"style\":{\"width\":\"100%\"},\"disabled\":false,\"interfaceHasPage\":false,\"placeholder\":\"请选择启用状态\",\"props\":{\"label\":\"fullName\",\"value\":\"id\"}}],\"span\":24}"); return sb.toString();
sb.append("{\"popupType\":\"general\",\"idGlobal\":107,\"formBtns\":false,\"labelWidth\":100,\"classNames\":[],\"className\":[],\"fullScreenWidth\":\"100%\",\"hasConfirmAndAddBtn\":true,\"labelPosition\":\"right\",\"printId\":\"\",\"disabled\":false,\"formModel\":\"dataForm\",\"cancelButtonText\":\"取 消\",\"confirmButtonText\":\"确 定\",\"hasCancelBtn\":true,\"primaryKeyPolicy\":1,\"confirmAndAddText\":\"确定并继续操作\",\"hasPrintBtn\":false,\"concurrencyLock\":true,\"classJson\":\"\",\"drawerWidth\":\"600px\",\"printButtonText\":\"打 印\",\"formRef\":\"formRef\",\"gutter\":15,\"logicalDelete\":true,\"size\":\"small\",\"formRules\":\"rules\",\"generalWidth\":\"600px\",\"hasConfirmBtn\":true,\"formStyle\":\"\",\"fields\":[{\"clearable\":true,\"suffixIcon\":\"\",\"addonAfter\":\"\",\"__config__\":{\"formId\":101,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"input\",\"noShow\":false,\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"班组名称\",\"trigger\":\"blur\",\"showLabel\":true,\"required\":true,\"tableName\":\"yys_group\",\"renderKey\":1722846415741,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-input\",\"unique\":false,\"tag\":\"JnpfInput\",\"regList\":[],\"span\":24},\"readonly\":false,\"showWordLimit\":false,\"__vModel__\":\"groupName\",\"showPassword\":false,\"style\":{\"width\":\"100%\"},\"disabled\":false,\"placeholder\":\"请输入班组名称\",\"prefixIcon\":\"\",\"addonBefore\":\"\"},{\"filterable\":false,\"clearable\":true,\"__config__\":{\"formId\":102,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"select\",\"defaultValue\":\"\",\"noShow\":false,\"dataType\":\"static\",\"dictionaryType\":\"\",\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"班组类型\",\"trigger\":\"change\",\"propsUrl\":\"\",\"templateJson\":[],\"showLabel\":true,\"required\":true,\"tableName\":\"yys_group\",\"renderKey\":1722846446702,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-select\",\"propsName\":\"\",\"tag\":\"JnpfSelect\",\"regList\":[],\"span\":24},\"options\":[{\"fullName\":\"生产线\",\"id\":\"1\"},{\"fullName\":\"包装线\",\"id\":\"2\"}],\"multiple\":false,\"__vModel__\":\"groupType\",\"style\":{\"width\":\"100%\"},\"disabled\":false,\"interfaceHasPage\":false,\"placeholder\":\"请选择班组类型\",\"props\":{\"label\":\"fullName\",\"value\":\"id\"}},{\"clearable\":true,\"__config__\":{\"formId\":103,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"userSelect\",\"noShow\":false,\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"组长\",\"trigger\":\"change\",\"showLabel\":true,\"required\":true,\"relationField\":\"\",\"tableName\":\"yys_group\",\"renderKey\":1722846480279,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-user\",\"defaultCurrent\":false,\"tag\":\"JnpfUserSelect\",\"regList\":[],\"span\":24},\"ableIds\":[],\"multiple\":false,\"__vModel__\":\"leader\",\"style\":{\"width\":\"100%\"},\"selectType\":\"all\",\"disabled\":false,\"placeholder\":\"请选择组长\",\"relationField\":\"\"},{\"clearable\":true,\"__config__\":{\"formId\":104,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"userSelect\",\"defaultValue\":[],\"noShow\":false,\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"成员\",\"trigger\":\"change\",\"showLabel\":true,\"required\":true,\"relationField\":\"\",\"tableName\":\"yys_group\",\"renderKey\":1722907341598,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-user\",\"defaultCurrent\":false,\"tag\":\"JnpfUserSelect\",\"regList\":[],\"span\":24},\"ableIds\":[],\"multiple\":true,\"__vModel__\":\"member\",\"style\":{\"width\":\"100%\"},\"selectType\":\"all\",\"disabled\":false,\"placeholder\":\"请选择成员\",\"relationField\":\"\"},{\"filterable\":false,\"clearable\":true,\"__config__\":{\"formId\":105,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"select\",\"defaultValue\":\"\",\"noShow\":false,\"dataType\":\"static\",\"dictionaryType\":\"\",\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"启用状态\",\"trigger\":\"change\",\"propsUrl\":\"\",\"templateJson\":[],\"showLabel\":true,\"required\":true,\"tableName\":\"yys_group\",\"renderKey\":1722846553507,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-select\",\"propsName\":\"\",\"tag\":\"JnpfSelect\",\"regList\":[],\"span\":24},\"options\":[{\"fullName\":\"启用\",\"id\":\"1\"},{\"fullName\":\"未启用\",\"id\":\"2\"}],\"multiple\":false,\"__vModel__\":\"enabledStatus\",\"style\":{\"width\":\"100%\"},\"disabled\":false,\"interfaceHasPage\":false,\"placeholder\":\"请选择启用状态\",\"props\":{\"label\":\"fullName\",\"value\":\"id\"}}],\"span\":24}"); return sb.toString();
}
/** 列表字段配置json */
public static final String getColumnData(){

@ -10,7 +10,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-08-05
* @ 2024-08-06
*/
@Data
public class YysGroupForm {

@ -11,7 +11,7 @@ import java.util.List;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-08-05
* @ 2024-08-06
*/
@Data
public class YysGroupPagination extends Pagination {

@ -23,8 +23,8 @@
<div>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" @click="addOrUpdateHandle()">
</el-button>
<el-button type="success" icon="icon-ym icon-ym-btn-download" @click="exportData()">
</el-button>
<!-- <el-button type="success" icon="icon-ym icon-ym-btn-download" @click="exportData()">
</el-button> -->
</div>
<div class="JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true">
@ -43,9 +43,11 @@
</el-table-column>
<el-table-column prop="day" label="日期" align="center">
</el-table-column>
<el-table-column prop="week" label="星期" align="center">
</el-table-column>
<el-table-column prop="isHoliday" label="是否节假日" align="center">
<template slot-scope="scope">
<el-switch v-model="scope.row.isHoliday" :active-value="1" :inactive-value="2"
<el-switch v-model="scope.row.isHoliday" :active-value="'1'" :inactive-value="'2'"
@change="handleHolidayChange(scope.$index, scope.row)">
</el-switch>
</template>
@ -95,7 +97,6 @@ export default {
},
data() {
return {
keyword: '',
expandsTree: true,
refreshTree: true,

@ -28,20 +28,6 @@
</JnpfDepSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="8小时产量" prop="eightOutput">
<JnpfInput v-model="dataForm.eightOutput" @change="changeData('eightOutput', -1)"
placeholder="请输入8小时产量" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="12小时产量" prop="twelveOutput">
<JnpfInput v-model="dataForm.twelveOutput" @change="changeData('twelveOutput', -1)"
placeholder="请输入12小时产量" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="设备类型" prop="deivceType">
<JnpfSelect v-model="dataForm.deivceType" @change="changeData('deivceType', -1)"
@ -58,6 +44,20 @@
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="8小时产量" prop="eightOutput">
<JnpfInput v-model="dataForm.eightOutput" @change="changeData('eightOutput', -1)"
placeholder="请输入8小时产量" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="12小时产量" prop="twelveOutput">
<JnpfInput v-model="dataForm.twelveOutput" @change="changeData('twelveOutput', -1)"
placeholder="请输入12小时产量" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<!-- 表单结束 -->
</template>
</el-form>
@ -65,7 +65,7 @@
@select="addForSelect" @close="selectDialogVisible = false" />
</el-row>
<span slot="footer" class="dialog-footer">
<div class="upAndDown-button" v-if="dataForm.id">
<!-- <div class="upAndDown-button" v-if="dataForm.id">
<el-button @click="prev" :disabled='prevDis'>
{{ '上一条' }}
</el-button>
@ -74,7 +74,7 @@
</el-button>
</div>
<el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-button>
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-button> -->
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
</span>

@ -33,7 +33,7 @@
<jnpf-form-tip-item label="成员" prop="member">
<JnpfUserSelect v-model="dataForm.member" @change="changeData('member', -1)"
placeholder="请选择成员" selectType="all" :ableIds="ableAll.memberableIds" clearable
:style='{ "width": "100%" }'>
:style='{ "width": "100%" }' :multiple="true">
</JnpfUserSelect>
</jnpf-form-tip-item>
</el-col>
@ -52,7 +52,7 @@
@select="addForSelect" @close="selectDialogVisible = false" />
</el-row>
<span slot="footer" class="dialog-footer">
<div class="upAndDown-button" v-if="dataForm.id">
<!-- <div class="upAndDown-button" v-if="dataForm.id">
<el-button @click="prev" :disabled='prevDis'>
{{ '上一条' }}
</el-button>
@ -61,7 +61,7 @@
</el-button>
</div>
<el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-button>
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-button> -->
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
</span>
@ -112,7 +112,7 @@ export default {
groupName: undefined,
groupType: undefined,
leader: undefined,
member: undefined,
member: [],
enabledStatus: "1",
version: 0,
},

Loading…
Cancel
Save