feat no.3896941 新增考勤日报、月报Eb表增加【考勤同步】按钮的功能 #1
|
|
@ -51,4 +51,8 @@ public @interface FormItem {
|
|||
int precision() default 5;
|
||||
|
||||
boolean needNumberSetting() default false;
|
||||
|
||||
boolean browserShowCheckStrictly() default true;
|
||||
|
||||
String datepickerType() default "day";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
package com.weaver.seconddev.chapanda.controller;
|
||||
|
||||
import com.weaver.common.authority.annotation.WeaPermission;
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.common.component.form.WeaForm;
|
||||
import com.weaver.seconddev.chapanda.service.AttendSyncFormService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/secondev/chapanda/attendSync")
|
||||
@WeaPermission(publicPermission = true)
|
||||
public class AttendSyncFormController {
|
||||
|
||||
@Autowired
|
||||
private AttendSyncFormService attendSyncFormService;
|
||||
|
||||
@GetMapping("/getForm")
|
||||
@ApiOperation("获取表单")
|
||||
public WeaResult<WeaForm> getFrom(@RequestParam(value = "id", required = false) Long id) {
|
||||
return WeaResult.success(attendSyncFormService.getForm());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.weaver.seconddev.chapanda.entity.dto;
|
||||
|
||||
import com.weaver.common.component.form.item.WeaFormItemType;
|
||||
import com.weaver.seconddev.chapanda.annotation.Form;
|
||||
import com.weaver.seconddev.chapanda.annotation.FormItem;
|
||||
import com.weaver.seconddev.chapanda.annotation.TableColumn;
|
||||
import com.weaver.seconddev.chapanda.common.BaseDTO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AttendSyncFormDTO {
|
||||
|
||||
@Form(
|
||||
label = "考勤周期",
|
||||
labelId = 0,
|
||||
items = {
|
||||
@FormItem(itemType = WeaFormItemType.DATEPICKER, required = true,datepickerType = "month")
|
||||
},
|
||||
group = "baseInfo"
|
||||
)
|
||||
private String attendMonth;
|
||||
|
||||
@Form(
|
||||
label = "人员",
|
||||
labelId = 0,
|
||||
items = {
|
||||
@FormItem(browserModule = "attend/web",itemType = WeaFormItemType.BROWSER, browserType = "resource", required = true, browserMultiple = true)
|
||||
}
|
||||
)
|
||||
private BaseDTO resource;
|
||||
|
||||
|
||||
@Form(
|
||||
label = "部门范围",
|
||||
labelId = 0,
|
||||
items = {
|
||||
@FormItem(browserModule = "attend/web", itemType = WeaFormItemType.BROWSER, browserType = "department", required = true, browserMultiple = true)
|
||||
}
|
||||
)
|
||||
private BaseDTO deptScope;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.weaver.seconddev.chapanda.service;
|
||||
|
||||
import com.weaver.common.component.form.WeaForm;
|
||||
import com.weaver.common.component.search.WeaSearchCondition;
|
||||
import com.weaver.common.component.table.WeaTable;
|
||||
import com.weaver.common.component.table.page.Page;
|
||||
import com.weaver.seconddev.chapanda.entity.dto.DemoListDTO;
|
||||
import com.weaver.seconddev.chapanda.entity.dto.OrderTypeListDTO;
|
||||
import com.weaver.seconddev.chapanda.entity.param.DemoQueryParam;
|
||||
import com.weaver.seconddev.chapanda.entity.param.OrderTypeQueryParam;
|
||||
|
||||
public interface AttendSyncFormService {
|
||||
|
||||
WeaForm getForm();
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.weaver.seconddev.chapanda.service.impl;
|
||||
|
||||
import com.weaver.common.component.form.WeaForm;
|
||||
import com.weaver.seconddev.chapanda.entity.dto.AttendSyncFormDTO;
|
||||
import com.weaver.seconddev.chapanda.service.AttendSyncFormService;
|
||||
import com.weaver.seconddev.chapanda.util.FormatUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class AttendSyncFormServiceImpl implements AttendSyncFormService {
|
||||
|
||||
@Override
|
||||
public WeaForm getForm() {
|
||||
AttendSyncFormDTO attendSyncFormDTO = new AttendSyncFormDTO();
|
||||
return FormatUtil.<AttendSyncFormDTO>getInstance().buildForm(AttendSyncFormDTO.class, attendSyncFormDTO);
|
||||
}
|
||||
}
|
||||
|
|
@ -258,6 +258,7 @@ public class FormatUtil<T> {
|
|||
weaBrowserBean.setCompleteParams(ImmutableMap.of("publishStatus", "ALL"));
|
||||
weaBrowserBean.setRequestHeaderParams(ImmutableMap.of("ebBusinessid", "10000000000000000"));
|
||||
}
|
||||
weaBrowserBean.setShowCheckStrictly(itemAnnotation.browserShowCheckStrictly());
|
||||
weaFormItem.setBrowserBean(weaBrowserBean);
|
||||
break;
|
||||
case TYPESBROWSER:
|
||||
|
|
@ -271,6 +272,11 @@ public class FormatUtil<T> {
|
|||
weaFormItem.setShareBrowserBean(shareBrowserBean);
|
||||
weaFormItem.setOtherParams(ImmutableMap.of("showShareDetail", "true"));
|
||||
break;
|
||||
case DATEPICKER:
|
||||
Map<String, Object> otherParams = new HashMap<>();
|
||||
otherParams.put("type",itemAnnotation.datepickerType());
|
||||
weaFormItem.setOtherParams(otherParams);
|
||||
break;
|
||||
case LOCALE:
|
||||
String tablefield = "";
|
||||
MultiLanguage languageAnnotation = f.getAnnotation(MultiLanguage.class);
|
||||
|
|
|
|||
Loading…
Reference in New Issue