Commit c98675f1 by 焦凯

Merge branch 'develop' of gitlab.beecode.cn:kunlun/xyst_dinas/xyst_dinas_backend into develop

parents ea50c52d d6ebd1f3
package com.xyst.dinas.biz.config;
import com.beecode.amino.metadata.runtime.MetadataMech;
import com.beecode.bcp.type.KClass;
import com.beecode.bcp.type.TypeConstants;
import com.xyst.dinas.biz.constant.ProductionLineConstant;
import com.xyst.dinas.biz.dao.ProductionLineDao;
import com.xyst.dinas.biz.internal.dao.ProductionLineDaoImpl;
import com.xyst.dinas.biz.internal.service.ProductionLineServiceImpl;
import com.xyst.dinas.biz.service.ProductionLineService;
import com.xyst.dinas.biz.web.ProductionLineController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.core.io.ClassPathResource;
public class ProductionLineConfiguration {
@Autowired
@Qualifier(TypeConstants.CLASS_MECH)
private MetadataMech<KClass> typeMech;
//ProductionLineDaoImpl相关bean配置
@Bean
public ProductionLineDao productionLineDaoImpl() {
return new ProductionLineDaoImpl();
}
@Bean
public ProductionLineService productionLineServiceImpl(){
return new ProductionLineServiceImpl();
}
@Bean
public ProductionLineController productionLineController(){
return new ProductionLineController();
}
@Bean(ProductionLineConstant.ENTITY)
public KClass productionLineInfoEntity() {
return typeMech.createStaticBeanByResource(
new ClassPathResource("/com/xyst/dinas/biz/datamodel/ProductionLine.jmx", KClass.class));
}
}
package com.xyst.dinas.biz.config;
import com.beecode.amino.metadata.runtime.MetadataMech;
import com.beecode.bcp.type.KClass;
import com.beecode.bcp.type.TypeConstants;
import com.xyst.dinas.biz.constant.SandMiningAreaConstant;
import com.xyst.dinas.biz.constant.StationConstant;
import com.xyst.dinas.biz.dao.PositionDao;
import com.xyst.dinas.biz.internal.StationInfoQueryProcessor;
import com.xyst.dinas.biz.internal.dao.PositionDaoImpl;
import com.xyst.dinas.biz.internal.dao.StationDaoImpl;
import com.xyst.dinas.biz.internal.service.PositionServiceImpl;
import com.xyst.dinas.biz.internal.service.StationServiceImpl;
import com.xyst.dinas.biz.service.PositionService;
import com.xyst.dinas.biz.web.PositionController;
import com.xyst.dinas.biz.web.StationController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.core.io.ClassPathResource;
public class SandMiningAreaConfiguration {
@Autowired
@Qualifier(TypeConstants.CLASS_MECH)
private MetadataMech<KClass> typeMech;
@Bean(SandMiningAreaConstant.ENTITY)
public KClass sandMiningAreaEntity() {
return typeMech.createStaticBeanByResource(
new ClassPathResource("/com/xyst/dinas/biz/datamodel/SandMiningArea.jmx", KClass.class));
}
}
......@@ -5,12 +5,14 @@ import com.beecode.bcp.type.KClass;
import com.beecode.bcp.type.TypeConstants;
import com.xyst.dinas.biz.constant.StationConstant;
import com.xyst.dinas.biz.dao.PositionDao;
import com.xyst.dinas.biz.dao.StationDao;
import com.xyst.dinas.biz.internal.StationInfoQueryProcessor;
import com.xyst.dinas.biz.internal.dao.PositionDaoImpl;
import com.xyst.dinas.biz.internal.dao.StationDaoImpl;
import com.xyst.dinas.biz.internal.service.PositionServiceImpl;
import com.xyst.dinas.biz.internal.service.StationServiceImpl;
import com.xyst.dinas.biz.service.PositionService;
import com.xyst.dinas.biz.service.StationService;
import com.xyst.dinas.biz.web.PositionController;
import com.xyst.dinas.biz.web.StationController;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -48,11 +50,11 @@ public class StationConfiguration {
//StationDaoImpl相关bean配置
@Bean
public StationDaoImpl stationDaoImpl() {
public StationDao stationDao() {
return new StationDaoImpl();
}
@Bean
public StationServiceImpl stationServiceImpl(){
public StationService stationService(){
return new StationServiceImpl();
}
......
package com.xyst.dinas.biz.config;
import org.springframework.context.annotation.Bean;
import com.xyst.dinas.biz.warn.dao.WarnSettingDao;
import com.xyst.dinas.biz.warn.service.IWarningSettingService;
import com.xyst.dinas.biz.warn.service.WarningSettingServiceImpl;
import org.springframework.context.annotation.Bean;
import com.xyst.dinas.biz.web.WarnSettingController;
public class WarningConfiguration {
@Bean
public WarnSettingDao warnSettingDao() {
public WarnSettingDao warnSettingDao() {
return new WarnSettingDao();
}
@Bean
public IWarningSettingService warningSettingService() {
public IWarningSettingService warningSettingService() {
return new WarningSettingServiceImpl();
}
@Bean
public WarnSettingController warnSettingController() {
return new WarnSettingController();
}
}
package com.xyst.dinas.biz.constant;
public interface ProductionLineConstant {
/**
* 实体名
*/
String ENTITY = "com.xyst.dinas.biz.datamodel.ProductionLine";
}
package com.xyst.dinas.biz.constant;
public interface SandMiningAreaConstant {
/**
* 实体名
*/
String ENTITY = "com.xyst.dinas.biz.datamodel.SandMiningArea";
}
package com.xyst.dinas.biz.dao;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.type.KObject;
import com.beecode.inz.basis.dao.BaseDao;
import java.util.List;
import java.util.UUID;
public interface ProductionLineDao extends BaseDao {
KObject load(UUID id);
Page<KObject> listProductionLineInfoPaging(Page<KObject> page, Integer productionLineStatus);
UUID create(KObject kObject);
int selectCountByName(String productionLineName);
void deleteById(UUID id);
List<KObject> getByName(String name, UUID id);
void modify(KObject kobject);
}
......@@ -111,6 +111,7 @@ public class DinasTypeDaoImpl extends AbstractBaseDao implements DinasTypeDao, D
KObject id = load(kobject.getUuid("id"));
kobject.set("creator", id.get("creator"));
kobject.set("createTime", id.getDate("createTime"));
kobject.set("stations",id.get("stations"));
KObject staff = AminoContextHolder.getContext().getStaff();
kobject.set("modifyTime", new Date());
kobject.set("regionalCompany", getCurrentLoginRegionalCompany());
......
package com.xyst.dinas.biz.internal.dao;
import com.beecode.amino.core.Amino;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.core.context.AminoContextHolder;
import com.beecode.bcp.type.KClass;
import com.beecode.bcp.type.KObject;
import com.beecode.inz.basis.internal.dao.AbstractBaseDao;
import com.xyst.dinas.biz.constant.ProductionLineConstant;
import com.xyst.dinas.biz.dao.DinasTypeDao;
import com.xyst.dinas.biz.dao.ProductionLineDao;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate5.HibernateTemplate;
import java.util.Date;
import java.util.List;
import java.util.UUID;
public class ProductionLineDaoImpl extends AbstractBaseDao implements ProductionLineDao, ProductionLineConstant {
@Autowired
private HibernateTemplate template;
@Autowired
private DinasTypeDao dinasTypeDao;
@Override
public KObject load(UUID id) {
return (KObject) template.load(ENTITY, id);
}
@Override
public Page<KObject> listProductionLineInfoPaging(Page<KObject> page, Integer ProductionLineStatus) {
KClass bean = Amino.getStaticMetadataContext().getBean(ProductionLineConstant.ENTITY, KClass.class);
DetachedCriteria detachedCriteria = DetachedCriteria.forEntityName(bean.getName());
// detachedCriteria.add(Restrictions.eq("department.id", departmentId));
detachedCriteria.add(Restrictions.eq("del", false));
if(null!=ProductionLineStatus){
detachedCriteria.add(Restrictions.eq("ProductionLineStatus", ProductionLineStatus));
}
KObject currentLoginRegionalCompany = dinasTypeDao.getCurrentLoginRegionalCompany();
detachedCriteria.add(Restrictions.eq("regionalCompany.id",currentLoginRegionalCompany.getUuid("id")));
detachedCriteria.addOrder(Order.desc("sortOrder"));
int offset = page.getPageSize() * (page.getPageNo() - 1);
page.setTotal(template.findByCriteria(detachedCriteria).size());
List<KObject> list = (List<KObject>) template.findByCriteria(detachedCriteria,offset,page.getPageSize());
page.setDatas(list);
return page;
}
@Override
public List<KObject> getByName(String name, UUID id) {
// UUID departmentId = AminoContextHolder.getContext().getStaff().get("department").getUuid("id");
KClass bean = Amino.getStaticMetadataContext().getBean(ProductionLineConstant.ENTITY, KClass.class);
DetachedCriteria detachedCriteria = DetachedCriteria.forEntityName(bean.getName());
KObject currentLoginRegionalCompany = dinasTypeDao.getCurrentLoginRegionalCompany();
detachedCriteria.add(Restrictions.eq("regionalCompany.id",currentLoginRegionalCompany.getUuid("id")));
detachedCriteria.add(Restrictions.eq("del", false));
detachedCriteria.add(Restrictions.eq("name", name));
if(id!=null){
detachedCriteria.add(Restrictions.ne("id", id));
}
return (List<KObject>) template.findByCriteria(detachedCriteria);
}
@Override
public void modify(KObject kobject) {
KObject id = load(kobject.getUuid("id"));
kobject.set("creator",id.get("creator"));
kobject.set("createTime",id.getDate("createTime"));
KObject staff = AminoContextHolder.getContext().getStaff();
kobject.set("regionalCompany", dinasTypeDao.getCurrentLoginRegionalCompany());
kobject.set("modifyTime",new Date());
kobject.set("modifier",staff);
kobject.set("del",false);
template.merge(kobject);
}
@Override
public UUID create(KObject kObject) {
KObject staff = AminoContextHolder.getContext().getStaff();
// kObject.set("department", staff.get("department"));
if(null==kObject.getUuid("id")){
kObject.set("id",UUID.randomUUID());
}
kObject.set("regionalCompany", dinasTypeDao.getCurrentLoginRegionalCompany());
kObject.set("creator",staff);
kObject.set("createTime", new Date());
kObject.set("del",false);
return ((UUID)template.save(kObject));
}
@Override
public int selectCountByName(String ProductionLineName) {
String departmentId = AminoContextHolder.getContext().getStaff().get("department").getUuid("id").toString();
return 0;
}
@Override
public void deleteById(UUID id) {
KObject staff = AminoContextHolder.getContext().getStaff();
KObject kobject = (KObject) template.load(ENTITY, id);
kobject.set("modifyTime",new Date());
kobject.set("modifier",staff);
kobject.set("del",true);
template.update(kobject);
}
/**
* 抽象方法,需要实现类提供HibernateTemplate
*
* @return HibernateTemplate
*/
@Override
protected HibernateTemplate getHibernateTemplate() {
return template;
}
/**
* 抽象方法,需要实现类提供当前ModelName
*
* @return String
*/
@Override
protected String getModelName() {
return ProductionLineConstant.ENTITY;
}
}
......@@ -33,7 +33,7 @@ public class XystDinasCommonAllScene extends FollowerQueryScene {
Predicate p0 = builder.equal(context.getRoot().get("regionalCompany").get("id"), currentRegionalCompany.getUuid("id"));
if(currentRegionalCompany.getString("type").equals(OrganizationTypeEnum.REGIONAL_COMPANY.name())) {
if(OrganizationTypeEnum.REGIONAL_COMPANY.name().equals(currentRegionalCompany.getString("type"))) {
context.getCriteriaQuery().and(p0);
}
......
package com.xyst.dinas.biz.internal.service;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.type.KObject;
import com.xyst.dinas.biz.dao.ProductionLineDao;
import com.xyst.dinas.biz.service.ProductionLineService;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.UUID;
@Transactional(rollbackFor = Exception.class)
public class ProductionLineServiceImpl implements ProductionLineService {
@Autowired
private ProductionLineDao productionLineDao;
@Override
public Page<KObject> queryByPaging(Page<KObject> page, Integer ProductionLineStatus) throws Exception {
if(page.getPageNo()==0||page.getPageSize()==0) {
throw new Exception("pageSize or offset is null");
}
return productionLineDao.listProductionLineInfoPaging(page,ProductionLineStatus);
}
@Override
public UUID addProductionLine(KObject kObject) {
return productionLineDao.create(kObject);
}
@Override
public KObject getById(UUID id) {
return productionLineDao.load(id);
}
@Override
public int selectCountByName(String ProductionLineName) {
return productionLineDao.selectCountByName(ProductionLineName);
}
@Override
public KObject getByName(String name, UUID id) {
List<KObject> kObjects = productionLineDao.getByName(name,id);
if(CollectionUtils.isEmpty(kObjects)){
return null;
}
return kObjects.get(0);
}
@Override
public void update(KObject kobject) {
productionLineDao.modify(kobject);
}
@Override
public void deleteById(UUID id) {
productionLineDao.deleteById(id);
}
}
package com.xyst.dinas.biz.request;
import java.util.List;
import java.util.UUID;
public class UpdateWarnSetting {
private UUID id;
private UUID version;
private UUID billId;
private String target;
private String max;
private String min;
private List<UUID> personnel;
private String memo;
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
public UUID getVersion() {
return version;
}
public void setVersion(UUID version) {
this.version = version;
}
public UUID getBillId() {
return billId;
}
public void setBillId(UUID billId) {
this.billId = billId;
}
public String getTarget() {
return target;
}
public void setTarget(String target) {
this.target = target;
}
public String getMax() {
return max;
}
public void setMax(String max) {
this.max = max;
}
public String getMin() {
return min;
}
public void setMin(String min) {
this.min = min;
}
public List<UUID> getPersonnel() {
return personnel;
}
public void setPersonnel(List<UUID> personnel) {
this.personnel = personnel;
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
}
package com.xyst.dinas.biz.service;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.type.KObject;
import java.util.UUID;
public interface ProductionLineService {
Page<KObject> queryByPaging(Page<KObject> page, Integer productionLineStatus) throws Exception;
UUID addProductionLine(KObject kObject);
KObject getById(UUID id);
int selectCountByName(String productionLineName);
KObject getByName(String name, UUID id);
void update(KObject kobject);
void deleteById(UUID id);
}
......@@ -7,12 +7,14 @@ import java.util.UUID;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import com.beecode.amino.core.Amino;
import com.beecode.bap.staff.Staff;
import com.beecode.bap.staff.dao.StaffDAO;
import com.beecode.bap.staff.service.StaffService;
import com.beecode.bcp.type.KObject;
import com.beecode.bcp.type.json.JSONObjectUtils;
......@@ -22,7 +24,6 @@ import com.beecode.inz.message.enumeration.ParterType;
import com.beecode.inz.message.service.RemindService;
import com.beecode.inz.message.util.MessageUtils;
import com.jiuqi.np.util.DateUtil;
import com.xyst.dinas.biz.warn.dao.WarnSettingDao;
import com.xyst.dinas.biz.warn.service.IWarningSettingService;
/**
......@@ -50,6 +51,11 @@ public class BaseBusinessWarn {
private StaffService staffService;
@Value("${beecode.tenant.username:}")
private String userName;
private StaffDAO staffDAO;
public BaseBusinessWarn(@NonNull String billType, @Nullable UUID billId, @Nullable String target) {
Assert.notNull(billType, "The billType must not be null!");
this.billType = billType;
......@@ -58,6 +64,7 @@ public class BaseBusinessWarn {
remindService = getRemindService();
staffService = getStaffService();
warningSettingService = getWarningSettingService();
staffDAO = getStaffDAO();
}
/** 预警设置*/
......@@ -152,7 +159,14 @@ public class BaseBusinessWarn {
KObject kobject =(KObject)JSONObjectUtils.toObject(remObject.toString());
KObject creater = MessageUtils.gerCurrentStaff();
KObject creater = null;
List<KObject> list = staffDAO.listStaffByUsername("sysadmin");
if (list.isEmpty()) {
creater = MessageUtils.gerCurrentStaff();
}else {
creater = list.get(0);
}
kobject.set("sender", creater);//
kobject.validate();
......@@ -198,4 +212,7 @@ public class BaseBusinessWarn {
private StaffService getStaffService() {
return Amino.getApplicationMetadataContext().getBean(StaffService.class);
}
private StaffDAO getStaffDAO() {
return Amino.getApplicationMetadataContext().getBean(StaffDAO.class);
}
}
package com.xyst.dinas.biz.warn;
/**
* 指标类型
*
* @author Jackpot
* @date 2021年3月26日
*/
public enum TargetTypeEnum {
/** 整数类型*/
INT_TYPE("整数类型"),
/** 浮点类型*/
DOUBLE_TYPE("浮点类型"),
/** 日期类型*/
DATE_TYPE("日期类型"),
/** 日期时间类型*/
DATETIME_TYPE("日期时间类型"),
;
private String name;
TargetTypeEnum(String name){
this.name = name;
}
public String getName() {
return name;
}
}
......@@ -6,6 +6,8 @@ import java.util.UUID;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import com.beecode.bcp.type.KObject;
import com.xyst.dinas.biz.request.UpdateWarnSetting;
import com.xyst.dinas.biz.warn.WarnExeRecord;
import com.xyst.dinas.biz.warn.WarnSetting;
......@@ -19,7 +21,21 @@ public interface IWarningSettingService {
public UUID insertWarnSetting(WarnSetting warnSetting) ;
WarnSetting getWarnSetting(@NonNull String billType, @Nullable UUID billId, @Nullable String target);
/**
* 根据ID查询一条预警设置
* @param id
* @return
*/
KObject queryWarnSettingById(UUID id);
/**
* 更新预警设置
* @param warnSetting
*/
void updateWarnSetting(UpdateWarnSetting warnSetting);
/***************************************/
public UUID insertWarnExe(WarnExeRecord warnExeRecord);
......
......@@ -5,12 +5,14 @@ import java.util.UUID;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import com.beecode.amino.core.Amino;
import com.beecode.bcp.type.KClass;
import com.beecode.bcp.type.KObject;
import com.beecode.bcp.type.json.JSONObjectUtils;
import com.fasterxml.jackson.databind.JsonNode;
import com.xyst.dinas.biz.request.UpdateWarnSetting;
import com.xyst.dinas.biz.warn.WarnExeRecord;
import com.xyst.dinas.biz.warn.WarnSetting;
import com.xyst.dinas.biz.warn.WarnSettingConstant;
......@@ -69,4 +71,37 @@ public class WarningSettingServiceImpl implements IWarningSettingService{
warnSettingDao.update(object);
}
@Override
public KObject queryWarnSettingById(UUID id) {
KObject KObj = warnSettingDao.queryWarnSettingById(id);
return KObj;
}
@Override
public void updateWarnSetting(UpdateWarnSetting warnSetting) {
UUID warSettingId = warnSetting.getId();
Assert.notNull(warSettingId, "The warSettingId must not be null");
KObject warSettingIdObj = warnSettingDao.queryWarnSettingById(warSettingId);
List<UUID> personnel = warnSetting.getPersonnel();
if (personnel!=null) {
String personnelStr = UuidListToString(personnel);
warSettingIdObj.set("personnel", personnelStr);
}
String min = warnSetting.getMin();
if(min!=null) warSettingIdObj.set("min", min);
warnSettingDao.update(warSettingIdObj);
}
private String UuidListToString(List<UUID> uuids) {
StringBuilder str = new StringBuilder();
for (UUID uuid : uuids) {
str.append(uuid.toString()).append(",");
}
return str.toString();
}
}
......@@ -25,8 +25,8 @@ public class DinasTypeController {
@RequestMapping(value = "list/page", method = RequestMethod.GET)
public ResponseObj getDinasTypeList(
@RequestParam(name = "pageNo", required = false) Integer pageNo,
@RequestParam(name = "pageSize", required = false) Integer pageSize) throws Exception {
@RequestParam(name = "pageNo") Integer pageNo,
@RequestParam(name = "pageSize") Integer pageSize) throws Exception {
Page<KObject> objectPage = new Page<>();
objectPage.setPageNo(pageNo);
......
package com.xyst.dinas.biz.web;
import com.beecode.amino.core.Amino;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.type.KClass;
import com.beecode.bcp.type.KObject;
import com.beecode.bcp.type.json.JSONObjectUtils;
import com.beecode.inz.basis.team.pojo.ResponseObj;
import com.beecode.nlib.utils.StringUtils;
import com.xyst.dinas.biz.constant.ProductionLineConstant;
import com.xyst.dinas.biz.service.ProductionLineService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.UUID;
/**
* @author scol
*/
@RestController()
@RequestMapping(value="/dinasBiz/ProductionLineInfo")
public class ProductionLineController {
private static final Logger logger = LoggerFactory.getLogger(ProductionLineController.class);
@Autowired
private ProductionLineService productionLineService;
@RequestMapping(value = "list/page", method = RequestMethod.GET)
public ResponseObj getListPage(
@RequestParam(name = "pageNo") Integer pageNo,
@RequestParam(name = "pageSize") Integer pageSize,
@RequestParam(name = "productionLineStatus", required = false) Integer productionLineStatus
) throws Exception {
Page<KObject> objectPage = new Page<>();
objectPage.setPageNo(pageNo);
objectPage.setPageSize(pageSize);
return ResponseObj.success("查询成功", productionLineService.queryByPaging(objectPage,productionLineStatus));
}
/**
* 新建生产线
* @param body
* @return ResponseObj
*/
@PostMapping
public ResponseObj create(@RequestBody String body){
KObject kobject = JSONObjectUtils.toObject(body,Amino.getApplicationMetadataContext().getBean(ProductionLineConstant.ENTITY, KClass.class));
if(kobject.getUuid("id") == null){
return ResponseObj.error(400,"'id' must be not null!");
}
UUID id = productionLineService.addProductionLine(kobject);
return ResponseObj.success("保存成功", id);
}
/**
* 修改生产线
* @param body 生产线json
* @return
*/
@PutMapping
public ResponseObj update(@RequestBody String body){
KObject kobject = JSONObjectUtils.toObject(body,Amino.getApplicationMetadataContext().getBean(ProductionLineConstant.ENTITY, KClass.class));
if(kobject.getUuid("id") == null){
return ResponseObj.error(400,"'id' must be not null!");
}
productionLineService.update(kobject);
return ResponseObj.success("修改成功");
}
/**
* 根据id获取生产线
* @param id
* @return
*/
@GetMapping("/{id}")
public ResponseObj getById(@PathVariable("id") UUID id){
if(id == null){
return ResponseObj.error(400,"'id' must be not null!");
}
KObject ProductionLine = productionLineService.getById(id);
return ResponseObj.success("获取成功",ProductionLine);
}
/**
* 根据Id删除生产线
* @param id
* @return
*/
@DeleteMapping("/{id}")
public ResponseObj deleteById(@PathVariable("id") UUID id){
if(id == null){
return ResponseObj.error(400,"'id' must be not null!");
}
productionLineService.deleteById(id);
return ResponseObj.success("删除成功");
}
/**
* 查询是否有重名
* @param name
* @return
*/
@GetMapping("/validateName")
public ResponseObj validateName(@RequestParam("name") String name,@RequestParam(value = "id",required = false) UUID id){
if(StringUtils.isEmpty(name)){
return ResponseObj.error(400,"生产线名称不能为空");
}
KObject kObject = productionLineService.getByName(name,id);
if(kObject != null){
return ResponseObj.error("生产线名称已存在!");
}
return ResponseObj.success();
}
}
\ No newline at end of file
......@@ -25,8 +25,8 @@ public class ShipInfoController {
@RequestMapping(value = "list/page", method = RequestMethod.GET)
public ResponseObj getDinasTypeList(
@RequestParam(name = "pageNo", required = false) Integer pageNo,
@RequestParam(name = "pageSize", required = false) Integer pageSize,
@RequestParam(name = "pageNo") Integer pageNo,
@RequestParam(name = "pageSize") Integer pageSize,
@RequestParam(name = "shipName", required = false) String shipName,
@RequestParam(name = "shipCodeNum", required = false) String shipCodeNum
) throws Exception {
......
......@@ -31,8 +31,8 @@ public class StationController {
@RequestMapping(value = "list/page", method = RequestMethod.GET)
public ResponseObj getListPage(
@RequestParam(name = "pageNo", required = false) Integer pageNo,
@RequestParam(name = "pageSize", required = false) Integer pageSize,
@RequestParam(name = "pageNo") Integer pageNo,
@RequestParam(name = "pageSize") Integer pageSize,
@RequestParam(name = "stationStatus", required = false) Integer stationStatus
) throws Exception {
......
package com.xyst.dinas.biz.web;
import java.util.UUID;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.beecode.bcp.type.KObject;
import com.xyst.dinas.biz.request.UpdateWarnSetting;
import com.xyst.dinas.biz.warn.service.IWarningSettingService;
/**
* 预警
*
* @author Jackpot
* @date 2021年4月2日
*/
@RestController
public class WarnSettingController {
@Autowired
private IWarningSettingService warningSettingService;
//更新预警设置
@PostMapping("/warnsetting/update")
public String updateWarnSettingPerson(@RequestBody UpdateWarnSetting warnSetting) {
warningSettingService.updateWarnSetting(warnSetting);
return "success";
}
//查询一条预警设置
@GetMapping("/warnsetting/{id}")
public KObject queryWarnSetting(@PathVariable UUID id) {
Assert.notNull(id,"The id must not be null");
return warningSettingService.queryWarnSettingById(id);
}
}
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.xyst.dinas.biz.config.StationConfiguration,\
com.xyst.dinas.biz.config.SandMiningAreaConfiguration,\
com.xyst.dinas.biz.config.DinasTypeConfiguration,\
com.xyst.dinas.biz.config.ProductionLineConfiguration,\
com.xyst.dinas.biz.config.ShipConfiguration,\
com.xyst.dinas.biz.config.SceneConfiguration,\
com.xyst.dinas.biz.config.DinasOrganizationConfig,\
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-sequence">
<specification>1.0</specification>
<id>b6504505-63b0-43bf-bfc7-39e163c48236</id>
<id>c95a248e-fdd8-446e-81a1-8b054909da97</id>
<name>com.xyst.dinas.biz.bill.Organization$sequence</name>
<title>组织机构$sequence</title>
<description>组织机构</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-serial">
<specification>1.0</specification>
<id>6d2da1fe-a214-4a86-9687-d704f73ab436</id>
<id>d7431605-19fe-4aac-b40a-b4dc4f44b30f</id>
<name>com.xyst.dinas.biz.bill.Organization$serial</name>
<title>组织机构$serial</title>
<description>组织机构</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-biztype">
<specification>1.0</specification>
<id>a0223fad-af26-4d66-a617-596590057a97</id>
<id>b7a595e4-8bd8-4e9f-971f-63aa8933ad2f</id>
<name>com.xyst.dinas.biz.bill.Organization</name>
<title>组织机构</title>
<description>组织机构</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-sequence">
<specification>1.0</specification>
<id>1b890f66-2ba9-4f3c-8280-13b925a98295</id>
<id>fec40432-96e8-4583-90b5-b926a7f21c76</id>
<name>com.xyst.dinas.biz.bill.Position$sequence</name>
<title>岗位$sequence</title>
<description>岗位</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-serial">
<specification>1.0</specification>
<id>a2a79dc3-349e-42de-b2e2-c1499d998ce9</id>
<id>0d37758e-66c6-4a11-8f6a-7483b2aeb7ac</id>
<name>com.xyst.dinas.biz.bill.Position$serial</name>
<title>岗位$serial</title>
<description>岗位</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-biztype">
<specification>1.0</specification>
<id>5e5a8858-0b5d-46be-9f40-7055eda3963b</id>
<id>66b50105-6ae9-43dd-891b-b920ea637c19</id>
<name>com.xyst.dinas.biz.bill.Position</name>
<title>岗位</title>
<description>岗位</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-sequence">
<specification>1.0</specification>
<id>3059d27e-7400-4e5d-a466-ab058b7f8dc4</id>
<name>com.xyst.dinas.biz.bill.ProductionLine$sequence</name>
<title>生产线$sequence</title>
<description>生产线</description>
<define>bcp.sequence</define>
<define-version>1.0</define-version>
<content>
<m:sequence>
<m:start-with>0</m:start-with>
<m:increment>1</m:increment>
<m:max>99999</m:max>
<m:min>0</m:min>
<m:cycle>true</m:cycle>
<m:cache-size>10</m:cache-size>
</m:sequence>
</content>
</metadata>
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-serial">
<specification>1.0</specification>
<id>3424e2bc-cf17-4ab5-ab4e-0e8360d142c4</id>
<name>com.xyst.dinas.biz.bill.ProductionLine$serial</name>
<title>生产线$serial</title>
<description>生产线</description>
<define>bcp.serial</define>
<define-version>1.0</define-version>
<dependency>com.xyst.dinas.biz.datamodel.ProductionLine</dependency>
<dependency>com.xyst.dinas.biz.bill.ProductionLine$sequence</dependency>
<content>
<m:serial>
<m:input>com.xyst.dinas.biz.datamodel.ProductionLine</m:input>
<m:functionLibrarys/>
<m:segments>
<m:literal>
<m:value>PL</m:value>
</m:literal>
<m:sequence>
<m:length>5</m:length>
<m:pad-direction>left</m:pad-direction>
<m:pad-string>0</m:pad-string>
<m:key>com.xyst.dinas.biz.bill.ProductionLine$serial</m:key>
<m:sequenceName>com.xyst.dinas.biz.bill.ProductionLine$sequence</m:sequenceName>
</m:sequence>
</m:segments>
</m:serial>
</content>
</metadata>
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-biztype">
<specification>1.0</specification>
<id>6b0568ea-8d06-4b77-842d-fea287f2eb5b</id>
<name>com.xyst.dinas.biz.bill.ProductionLine</name>
<title>生产线管理</title>
<description>生产线管理</description>
<define>bcp.biz.Biztype</define>
<define-version>1.0</define-version>
<dependency>com.xyst.dinas.biz.bill.ProductionLine$serial</dependency>
<dependency>com.xyst.dinas.biz.datamodel.ProductionLine</dependency>
<dependency>com.beecode.bap.biztrait.BasicBillBiztrait</dependency>
<content>
<m:biztype>
<m:type>com.xyst.dinas.biz.datamodel.ProductionLine</m:type>
<m:inheritances>
<m:inheritance>
<m:biztrait>com.beecode.bap.biztrait.BasicBillBiztrait</m:biztrait>
<m:config type="xml">
<m:content>&lt;billBasictraitConfig&gt;&lt;formulas/&gt;&lt;parents&gt;&lt;parent&gt;&lt;billCodeConfig&gt;&lt;serialName&gt;com.xyst.dinas.biz.bill.ProductionLine$serial&lt;/serialName&gt;&lt;buildTime&gt;add&lt;/buildTime&gt;&lt;/billCodeConfig&gt;&lt;/parent&gt;&lt;parent&gt;&lt;workflowConfig&gt;&lt;workflow&gt;&lt;/workflow&gt;&lt;/workflowConfig&gt;&lt;/parent&gt;&lt;parent&gt;&lt;printConfig&gt;&lt;templates/&gt;&lt;/printConfig&gt;&lt;/parent&gt;&lt;/parents&gt;&lt;functionLibrarys/&gt;&lt;/billBasictraitConfig&gt;</m:content>
</m:config>
</m:inheritance>
</m:inheritances>
<m:methodAuthorityItems/>
</m:biztype>
</content>
</metadata>
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-sequence">
<specification>1.0</specification>
<id>4da57641-c5c9-4cc0-9663-be2ea146a510</id>
<name>com.xyst.dinas.biz.bill.SandMiningArea$sequence</name>
<title>采区管理$sequence</title>
<description>采区管理</description>
<define>bcp.sequence</define>
<define-version>1.0</define-version>
<content>
<m:sequence>
<m:start-with>0</m:start-with>
<m:increment>1</m:increment>
<m:max>99999</m:max>
<m:min>0</m:min>
<m:cycle>true</m:cycle>
<m:cache-size>10</m:cache-size>
</m:sequence>
</content>
</metadata>
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-serial">
<specification>1.0</specification>
<id>fc3e8c68-4604-4e9a-8518-36c78d7fb596</id>
<name>com.xyst.dinas.biz.bill.SandMiningArea$serial</name>
<title>采区管理$serial</title>
<description>采区管理</description>
<define>bcp.serial</define>
<define-version>1.0</define-version>
<dependency>com.xyst.dinas.biz.datamodel.SandMiningArea</dependency>
<dependency>com.xyst.dinas.biz.bill.SandMiningArea$sequence</dependency>
<content>
<m:serial>
<m:input>com.xyst.dinas.biz.datamodel.SandMiningArea</m:input>
<m:functionLibrarys/>
<m:segments>
<m:literal>
<m:value>MA</m:value>
</m:literal>
<m:sequence>
<m:length>5</m:length>
<m:pad-direction>left</m:pad-direction>
<m:pad-string>0</m:pad-string>
<m:key>com.xyst.dinas.biz.bill.SandMiningArea$serial</m:key>
<m:sequenceName>com.xyst.dinas.biz.bill.SandMiningArea$sequence</m:sequenceName>
</m:sequence>
</m:segments>
</m:serial>
</content>
</metadata>
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-biztype">
<specification>1.0</specification>
<id>ae7e04be-3b09-4f31-9033-aa5ae35a4c6e</id>
<name>com.xyst.dinas.biz.bill.SandMiningArea</name>
<title>采区管理</title>
<description>采区管理</description>
<define>bcp.biz.Biztype</define>
<define-version>1.0</define-version>
<dependency>com.xyst.dinas.biz.bill.SandMiningArea$serial</dependency>
<dependency>com.xyst.dinas.biz.datamodel.SandMiningArea</dependency>
<dependency>com.beecode.bap.biztrait.BasicBillBiztrait</dependency>
<content>
<m:biztype>
<m:type>com.xyst.dinas.biz.datamodel.SandMiningArea</m:type>
<m:inheritances>
<m:inheritance>
<m:biztrait>com.beecode.bap.biztrait.BasicBillBiztrait</m:biztrait>
<m:config type="xml">
<m:content>&lt;billBasictraitConfig&gt;&lt;formulas/&gt;&lt;parents&gt;&lt;parent&gt;&lt;billCodeConfig&gt;&lt;serialName&gt;com.xyst.dinas.biz.bill.SandMiningArea$serial&lt;/serialName&gt;&lt;buildTime&gt;add&lt;/buildTime&gt;&lt;/billCodeConfig&gt;&lt;/parent&gt;&lt;parent&gt;&lt;workflowConfig&gt;&lt;workflow&gt;&lt;/workflow&gt;&lt;/workflowConfig&gt;&lt;/parent&gt;&lt;parent&gt;&lt;printConfig&gt;&lt;templates/&gt;&lt;/printConfig&gt;&lt;/parent&gt;&lt;/parents&gt;&lt;functionLibrarys/&gt;&lt;/billBasictraitConfig&gt;</m:content>
</m:config>
</m:inheritance>
</m:inheritances>
<m:methodAuthorityItems/>
</m:biztype>
</content>
</metadata>
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-sequence">
<specification>1.0</specification>
<id>4f0581c6-e8ec-49e2-8ff6-5e0d2733831f</id>
<id>5cd1a27b-bf97-4eaa-9ce5-e1d449254ccf</id>
<name>com.xyst.dinas.biz.bill.ShipInfo$sequence</name>
<title>船舶备案$sequence</title>
<description>船舶备案</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-serial">
<specification>1.0</specification>
<id>3c9cb123-f6ed-4912-bc51-81fb04287954</id>
<id>718034ed-f1a4-44bd-9e7e-98e34194b2e4</id>
<name>com.xyst.dinas.biz.bill.ShipInfo$serial</name>
<title>船舶备案$serial</title>
<description>船舶备案</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-biztype">
<specification>1.0</specification>
<id>77b6abb6-a300-4628-a1db-2cbda1ac09e2</id>
<id>a03f6e52-9a7c-49b0-95bc-247c29978903</id>
<name>com.xyst.dinas.biz.bill.ShipInfo</name>
<title>船舶备案</title>
<description>船舶备案</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-sequence">
<specification>1.0</specification>
<id>5e9e0a6d-d45a-463a-8056-dd16ab133d45</id>
<id>881b4728-d7f6-484d-b929-50dafbdb252b</id>
<name>com.xyst.dinas.biz.bill.Station$sequence</name>
<title>场站$sequence</title>
<description>场站</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-serial">
<specification>1.0</specification>
<id>9f69f089-510d-4dc3-a1df-c7fdab4afae7</id>
<id>9b277039-347c-40b1-98c0-7fbfe4258258</id>
<name>com.xyst.dinas.biz.bill.Station$serial</name>
<title>场站$serial</title>
<description>场站</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-biztype">
<specification>1.0</specification>
<id>280523dd-ab45-4e62-a025-bc64964e6c98</id>
<id>69964751-1fa0-452b-9a3a-1e5124b36171</id>
<name>com.xyst.dinas.biz.bill.Station</name>
<title>场站</title>
<description>场站</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-type">
<specification>1.0</specification>
<id>c9f6bffb-98c1-4b0b-b6ef-959fbcaab776</id>
<name>com.xyst.dinas.biz.datamodel.ProductionLine</name>
<title>生产线管理</title>
<description>生产线管理</description>
<define>bcp.type.Class</define>
<define-version>1.0</define-version>
<dependency>bcp.type.constraint.StringLength</dependency>
<dependency>com.beecode.bap.biztrait.datamodel.StoreSubTableRequirement</dependency>
<dependency>com.beecode.inz.common.datamodel.BaseInfo</dependency>
<dependency>com.xyst.dinas.biz.datamodel.Station</dependency>
<dependency>bcp.type.json.JsonIgnore</dependency>
<content>
<m:class>
<m:parents>
<m:parent>com.beecode.bap.biztrait.datamodel.StoreSubTableRequirement</m:parent>
</m:parents>
<m:attributes>
<m:attribute>
<m:annotations/>
<m:id>37e148ea-47af-4a01-8a41-9f0622f06f2e</m:id>
<m:name>name</m:name>
<m:title>生产线名称</m:title>
<m:type>string</m:type>
<m:description>生产线名称</m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>bcp.type.json.JsonIgnore</m:type>
</m:annotation>
</m:annotations>
<m:id>ababc07b-381a-4d5e-9ab6-84a376aa26b8</m:id>
<m:name>station</m:name>
<m:title>所属场站</m:title>
<m:type>com.xyst.dinas.biz.datamodel.Station</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
</m:attributes>
</m:class>
</content>
</metadata>
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-type">
<specification>1.0</specification>
<id>2ef34ffe-6181-40de-a414-6adfc7e8e618</id>
<name>com.xyst.dinas.biz.datamodel.SandMiningArea</name>
<title>采区管理</title>
<description>采区管理</description>
<define>bcp.type.Class</define>
<define-version>1.0</define-version>
<dependency>bcp.type.constraint.StringLength</dependency>
<dependency>bcp.type.constraint.NotNull</dependency>
<dependency>com.beecode.inz.common.datamodel.BaseInfo</dependency>
<dependency>com.xyst.dinas.biz.datamodel.Organization</dependency>
<dependency>com.beecode.bap.biztrait.datamodel.BasicBillRequirement</dependency>
<content>
<m:class>
<m:parents>
<m:parent>com.beecode.inz.common.datamodel.BaseInfo</m:parent>
<m:parent>com.beecode.bap.biztrait.datamodel.BasicBillRequirement</m:parent>
</m:parents>
<m:attributes>
<m:attribute>
<m:annotations/>
<m:id>15457cfc-f82d-4e99-b143-b8cee92c9fff</m:id>
<m:name>regionalCompany</m:name>
<m:title>所属区域公司</m:title>
<m:type>com.xyst.dinas.biz.datamodel.Organization</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations/>
<m:id>acf11cb7-bf53-4ac2-81ff-b4d14bd747b6</m:id>
<m:name>sandMiningAreaName</m:name>
<m:title>采区名称</m:title>
<m:type>string</m:type>
<m:description>采区名称</m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations/>
<m:id>c7e790b4-efc8-4cc4-99f1-324ca09579e7</m:id>
<m:name>sandMiningAreaType</m:name>
<m:title>采区类型</m:title>
<m:type>int</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
</m:annotations>
<m:id>03de3264-23d0-4fdf-bbe4-7a9ad227a7e4</m:id>
<m:name>sandMiningQuantity</m:name>
<m:title>可采量</m:title>
<m:type>fixnum</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations/>
<m:id>4957fc36-a43a-48d5-b0b2-4c551d677778</m:id>
<m:name>stationCoordinate</m:name>
<m:title>采区坐标</m:title>
<m:type>string</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>bcp.type.constraint.StringLength</m:type>
<m:value>300</m:value>
</m:annotation>
</m:annotations>
<m:id>4b5839ed-ced7-4f1a-af32-88833253f8e3</m:id>
<m:name>reason</m:name>
<m:title>备注</m:title>
<m:type>string</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations></m:annotations>
<m:id>4bb7343d-6733-417d-9cc9-4b97270d63f6</m:id>
<m:name>sortOrder</m:name>
<m:title>排序</m:title>
<m:type>int</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
</m:attributes>
</m:class>
</content>
</metadata>
......@@ -145,6 +145,15 @@
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations></m:annotations>
<m:id>7be63807-31fd-4f4b-85c1-293e433195cc</m:id>
<m:name>type</m:name>
<m:title>船类型</m:title>
<m:type>int</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
</m:attributes>
</m:class>
</content>
......
......@@ -125,6 +125,19 @@
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>com.beecode.bap.biztrait.datamodel.SubTableAnnotation</m:type>
</m:annotation>
</m:annotations>
<m:id>ae84d9e7-5b69-4651-beaa-c0f2fef7b7a2</m:id>
<m:name>productionLines</m:name>
<m:title>生产线</m:title>
<m:type>com.xyst.dinas.biz.datamodel.ProductionLine[]</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
</m:attributes>
</m:class>
</content>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/inz-query">
<specification>1.0</specification>
<id>236a3c6a-031c-473f-aed9-0a4d2a1f45e9</id>
<name>com.xyst.dinas.biz.query.ProductionLine</name>
<title>生产线管理</title>
<description>生产线管理</description>
<define>inz.query.Query</define>
<define-version>1.0</define-version>
<dependency>com.xyst.dinas.biz.datamodel.ProductionLine</dependency>
<dependency>com.xyst.dinas.biz.datamodel.Station</dependency>
<content>
<m:query>
<m:type>com.xyst.dinas.biz.datamodel.ProductionLine</m:type>
<m:dataProcessor/>
<m:authorityItem/>
<m:fields>
<m:field>
<m:name>id</m:name>
<m:title>id</m:title>
<m:type>uuid</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>station.id</m:name>
<m:title>场站</m:title>
<m:type>uuid</m:type>
<m:ref>
<m:name>com.xyst.dinas.biz.datamodel.Station</m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>name</m:name>
<m:title>名称</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
</m:fields>
</m:query>
</content>
</metadata>
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/inz-query">
<specification>1.0</specification>
<id>1dce51dc-63f3-48f1-bd18-908c4085942c</id>
<name>com.xyst.dinas.biz.query.SandMiningArea</name>
<title>采区管理</title>
<description>采区管理</description>
<define>inz.query.Query</define>
<define-version>1.0</define-version>
<dependency>com.xyst.dinas.biz.datamodel.SandMiningArea</dependency>
<content>
<m:query>
<m:type>com.xyst.dinas.biz.datamodel.SandMiningArea</m:type>
<m:dataProcessor/>
<m:authorityItem/>
<m:innerScenes>
<m:innerScene>
<m:id>acf11cb7-bf53-4ac2-81ff-b4d14bd747b6</m:id>
<m:title>全部</m:title>
<m:javaImplement>com.beecode.inz.common.scene.CommonAllScene</m:javaImplement>
<m:defaultExecute></m:defaultExecute>
<m:hide></m:hide>
</m:innerScene>
<m:innerScene>
<m:id>0eea20cd-9577-4d96-8d06-219663f34af8</m:id>
<m:title>已废弃</m:title>
<m:javaImplement>com.beecode.inz.common.scene.DefaultDiscardScene</m:javaImplement>
<m:defaultExecute></m:defaultExecute>
<m:hide></m:hide>
</m:innerScene>
<m:innerScene>
<m:id>06c7eaf2-efec-488f-9d4e-92fca63b8107</m:id>
<m:title>权限过滤</m:title>
<m:javaImplement>com.xyst.dinas.biz.scene.XystDinasCommonAllScene</m:javaImplement>
<m:defaultExecute>true</m:defaultExecute>
<m:hide>true</m:hide>
</m:innerScene>
</m:innerScenes>
<m:fields>
<m:field>
<m:name>id</m:name>
<m:title>id</m:title>
<m:type>uuid</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>regionalCompany.id</m:name>
<m:title>区域公司</m:title>
<m:type>uuid</m:type>
<m:ref>
<m:name>com.xyst.dinas.biz.datamodel.Organization</m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>regionalCompany.name</m:name>
<m:title>区域公司名称</m:title>
<m:type>string</m:type>
<m:ref>
<m:name>com.xyst.dinas.biz.datamodel.Organization</m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>createTime</m:name>
<m:title>创建时间</m:title>
<m:type>datetime</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>creator.name</m:name>
<m:title>创建人</m:title>
<m:type>string</m:type>
<m:ref/>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>modifyTime</m:name>
<m:title>修改时间</m:title>
<m:type>datetime</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>modifier</m:name>
<m:title>修改人</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>discard</m:name>
<m:title>废弃</m:title>
<m:type>boolean</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>sandMiningAreaName</m:name>
<m:title>采区名称</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>sandMiningAreaType</m:name>
<m:title>采区类型</m:title>
<m:type>int</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>sandMiningQuantity</m:name>
<m:title>可采量</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>reason</m:name>
<m:title>描述</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>stationCoordinate</m:name>
<m:title>采区坐标</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>del</m:name>
<m:title>是否删除</m:title>
<m:type>boolean</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>sortOrder</m:name>
<m:title>排序</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
</m:fields>
</m:query>
</content>
</metadata>
......@@ -204,6 +204,16 @@
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>type</m:name>
<m:title>类型</m:title>
<m:type>int</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
</m:fields>
</m:query>
</content>
......
<?xml version="1.0" encoding="UTF-8"?>
<hibernate-mapping xmlns="http://www.hibernate.org/xsd/hibernate-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hibernate.org/xsd/hibernate-mapping
http://www.hibernate.org/xsd/hibernate-mapping/hibernate-mapping-4.0.xsd">
<class entity-name="com.xyst.dinas.biz.datamodel.SandMiningArea" table="xyst_dinas_biz_sand_mining_area" optimistic-lock="version">
<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
<id name="id" type="uuid-binary" column="id" length="16">
<generator class="assigned" />
</id>
<version name="version" type="int" column="version"/>
<property name="createTime" type="timestamp" not-null="false">
<column name="create_time"></column>
</property>
<many-to-one name="creator" entity-name="com.beecode.bap.staff.datamodel.Staff" fetch="select">
<column name="creator_id" not-null="false"/>
</many-to-one>
<property name="modifyTime" type="timestamp" not-null="false">
<column name="modify_time"></column>
</property>
<many-to-one name="modifier" entity-name="com.beecode.bap.staff.datamodel.Staff" fetch="select">
<column name="modifier_id" not-null="false"/>
</many-to-one>
<property name="billState" type="nstring" not-null="false">
<column name="bill_state" length="100"></column>
</property>
<many-to-one name="bizProcess" entity-name="com.beecode.bap.workflow.datamodel.BizProcess" fetch="select">
<column name="biz_process_id" not-null="false"/>
</many-to-one>
<property name="billCode" type="nstring" not-null="false">
<column name="bill_code" length="200"></column>
</property>
<property name="discard" type="boolean" not-null="false">
<column name="discard"></column>
</property>
<property name="del" type="boolean" not-null="false">
<column name="del"></column>
</property>
<property name="approveState" type="integer" not-null="false">
<column name="approve_state"></column>
</property>
<many-to-one name="regionalCompany" entity-name="com.xyst.dinas.biz.datamodel.Organization" fetch="select">
<column name="regional_company" not-null="false">
<comment>所属部门</comment>
</column>
</many-to-one>
<property name="sandMiningAreaName" type="nstring" not-null="true">
<column name="sand_mining_area_name" length="30" >
<comment>采区名称</comment>
</column>
</property>
<property name="sandMiningQuantity" type="big_decimal" not-null="false">
<column name="sand_mining_quantity" precision="12" scale="2">
<comment>可以开采量</comment>
</column>
</property>
<property name="sandMiningAreaType" type="integer" not-null="true">
<column name="sand_mining_area_type" >
<comment>采区类型,0流域 1可采区 2禁采区 3保留区 4综合弃沙区</comment>
</column>
</property>
<property name="stationCoordinate" type="nstring" not-null="false">
<column name="station_coordinate">
<comment>采区坐标区域 按照逗号和分号分隔</comment>
</column>
</property>
<property name="reason" type="nstring" not-null="false">
<column name="reason" length="300" >
<comment>备注</comment>
</column>
</property>
<property name="sortOrder" type="int" not-null="true" unique="true" index="sand_mining_area_sort_index" >
<column name="sort_order" length="10">
<comment >排序</comment>
</column>
</property>
</class>
</hibernate-mapping>
\ No newline at end of file
......@@ -85,5 +85,10 @@
<comment >排序</comment>
</column>
</property>
<property name="type" type="int" not-null="true" >
<column name="type" length="1">
<comment >船只类型 0采砂 1运砂</comment>
</column>
</property>
</class>
</hibernate-mapping>
\ No newline at end of file
......@@ -10,34 +10,34 @@
</id>
<version name="version" type="int" column="version"/>
<property name="createTime" type="timestamp" not-null="false">
<column name="create_time"></column>
<column name="create_time"/>
</property>
<many-to-one name="creator" entity-name="com.beecode.bap.staff.datamodel.Staff" fetch="select">
<column name="creator_id" not-null="false"/>
</many-to-one>
<property name="modifyTime" type="timestamp" not-null="false">
<column name="modify_time"></column>
<column name="modify_time"/>
</property>
<many-to-one name="modifier" entity-name="com.beecode.bap.staff.datamodel.Staff" fetch="select">
<column name="modifier_id" not-null="false"/>
</many-to-one>
<property name="billState" type="nstring" not-null="false">
<column name="bill_state" length="100"></column>
<column name="bill_state" length="100"/>
</property>
<many-to-one name="bizProcess" entity-name="com.beecode.bap.workflow.datamodel.BizProcess" fetch="select">
<column name="biz_process_id" not-null="false"/>
</many-to-one>
<property name="billCode" type="nstring" not-null="false">
<column name="bill_code" length="200"></column>
<column name="bill_code" length="200"/>
</property>
<property name="discard" type="boolean" not-null="false">
<column name="discard"></column>
<column name="discard"/>
</property>
<property name="del" type="boolean" not-null="false">
<column name="del"></column>
<column name="del"/>
</property>
<property name="approveState" type="integer" not-null="false">
<column name="approve_state"></column>
<column name="approve_state"/>
</property>
<many-to-one name="regionalCompany" entity-name="com.xyst.dinas.biz.datamodel.Organization" fetch="select">
......@@ -53,19 +53,20 @@
<property name="stationAddress" type="nstring" length="80" not-null="false">
<column name="station_address">
<comment>场站地址</comment>
</column>
</property>
<property name="stationStatus" type="integer" not-null="true">
<column name="station_status" >
<comment>场站状态,0已停业1经营中</comment>
</column>
</property>
<bag name="productionLines" lazy="true" fetch="select" inverse="true">
<key column="station_id" not-null="true" />
<one-to-many entity-name="com.xyst.dinas.biz.datamodel.ProductionLine" />
</bag>
<property name="stationCoordinate" type="nstring" not-null="false">
<column name="station_coordinate">
<comment>场站的坐标按照逗号分隔</comment>
</column>
</property>
<property name="linkMan" type="nstring" not-null="false">
......@@ -94,4 +95,20 @@
</column>
</property>
</class>
<class entity-name="com.xyst.dinas.biz.datamodel.ProductionLine" table="xyst_dinas_biz_production_Line" optimistic-lock="version">
<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
<id name="id" type="uuid-binary" column="id" length="16">
<generator class="assigned" />
</id>
<many-to-one name="station" entity-name="com.xyst.dinas.biz.datamodel.ProductionLine" fetch="select">
<column name="station_id" not-null="false">
<comment>所属场站</comment>
</column>
</many-to-one>
<property name="name" type="nstring" not-null="false">
<column name="name">
<comment>名称</comment>
</column>
</property>
</class>
</hibernate-mapping>
\ No newline at end of file
......@@ -15,7 +15,8 @@ import com.xyst.dinas.contract.internal.dao.ContractInfoDao;
import com.xyst.dinas.contract.internal.service.ContractServiceImpl;
import com.xyst.dinas.contract.internal.service.ContractWarnServiceImpl;
import com.xyst.dinas.contract.listener.ContractProcessEventListener;
import com.xyst.dinas.contract.query.processor.PerformWarningProcessor;
import com.xyst.dinas.contract.query.processor.ContractPerformWarningProcessor;
import com.xyst.dinas.contract.query.processor.ContractWarnSettingProcessor;
import com.xyst.dinas.contract.service.ContractService;
import com.xyst.dinas.contract.service.ContractWarnService;
import com.xyst.dinas.contract.web.ContractController;
......@@ -68,9 +69,35 @@ public class ContractConfiguration {
return configuration;
}
@Bean("com.xyst.dinas.contract.query.processor.PerformWarningProcessor")
public PerformWarningProcessor performWarningProcessor() {
return new PerformWarningProcessor();
@Bean("com.xyst.dinas.contract.query.processor.ContractPerformWarningProcessor")
public ContractPerformWarningProcessor performWarningProcessor() {
return new ContractPerformWarningProcessor();
}
//合同变更审批工作流
@Bean
public BizTypeWorkflowConfiguration contractUpdateWorkflowConfig() {
//1.根据业务主体初始化配置类
BizTypeInfo bizTypeInfo = new BizTypeInfo(ContractConstant.BIZ_TYPE_UPDATE,ContractConstant.BIZ_TITLE_UPDATE, ContractConstant.ENTITY_CONTRACT);
BizTypeWorkflowConfiguration configuration = new BizTypeWorkflowConfiguration(bizTypeInfo);
//2.配置触发动作
TriggerCondition triggerCondition = new TriggerCondition();
List<TriggerAction> triggerActions = new ArrayList<>();
triggerActions.add(new TriggerAction("SUBMIT","提交"));
triggerCondition.setTriggerActions(triggerActions);
configuration.setTriggerCondition(triggerCondition);
//3.配置流程监听器
ProcessConfiguration processConfig = new ProcessConfiguration();
processConfig.setProcessEventListener(ContractConstant.CONTRACT_UPDATE_LISTENER);
configuration.setProcessConfiguration(processConfig);
return configuration;
}
@Bean("com.xyst.dinas.contract.query.processor.ContractWarnSettingProcessor")
public ContractWarnSettingProcessor cContractWarnSettingProcessor() {
return new ContractWarnSettingProcessor();
}
......
......@@ -35,14 +35,20 @@ public class ContractConstant {
/** 流程配置 */
/** 业务类型名称 */
/** 业务类型名称:合同 */
public static final String BIZ_TYPE = "Contract";
/** 业务类型标题 */
public static final String BIZ_TITLE = "合同";
/** 流程监听器 */
public static final String CONTRACT_LISTENER = "com.xyst.dinas.contract.listene.ContractProcessEventListener";
/** 业务类型名称:合同变更 */
public static final String BIZ_TYPE_UPDATE = "ContractUpdate";
/** 业务类型标题 */
public static final String BIZ_TITLE_UPDATE = "合同变更";
/** 流程监听器 */
public static final String CONTRACT_LISTENER = "com.xyst.dinas.contract.listene.ContractProcessEventListener";
public static final String CONTRACT_UPDATE_LISTENER = "com.xyst.dinas.contract.listene.ContractUpdateProcessListener";
}
......@@ -86,25 +86,32 @@ public class ContractServiceImpl implements ContractService {
return obj;
}
@Override
@Transactional
@Override
public void submitFlow(UUID id) {
KObject kobject = contractInfoDao.load(id);
if (needSubmitFlow(kobject)) {
// 调用流程接口发起流程
inzWorkflowService.startWorkflow("SUBMIT", ContractConstant.BIZ_TYPE, kobject.getString("lendReason"),
kobject);
if (needSubmitFlow(ContractConstant.BIZ_TYPE,kobject)) {
inzWorkflowService.startWorkflow("SUBMIT", ContractConstant.BIZ_TYPE, kobject.getString("lendReason"),kobject);
}
}
//变更合同的工作流
public void submitFlowForUpdate(UUID id) {
KObject kobject = contractInfoDao.load(id);
if (needSubmitFlow(ContractConstant.BIZ_TYPE_UPDATE,kobject)) {
inzWorkflowService.startWorkflow("SUBMIT", ContractConstant.BIZ_TYPE_UPDATE, kobject.getString("lendReason"),kobject);
}
}
/**
* 判断提交是否需要走流程
*
* @param bizTypeName 业务类型标识
* @param data
* @return
*/
private boolean needSubmitFlow(KObject data) {
return inzWorkflowService.canStartWotkflow("SUBMIT", ContractConstant.BIZ_TYPE, data);
private boolean needSubmitFlow(String bizTypeName ,KObject data) {
return inzWorkflowService.canStartWotkflow("SUBMIT", bizTypeName, data);
}
@Override
......
package com.xyst.dinas.contract.listener;
import org.springframework.beans.factory.annotation.Autowired;
import com.beecode.bap.workflow.core.BizProcessState;
import com.beecode.inz.workflow.listener.InzBizProcessEvent;
import com.beecode.inz.workflow.listener.InzBizProcessEventListener;
import com.xyst.dinas.contract.service.ContractWarnService;
public class ContractUpdateProcessListener implements InzBizProcessEventListener {
// @Autowired
// private ContractWarnService contractWarnService;
@Override
public void beforeProcessStarted(InzBizProcessEvent event) {
//do nothing
}
@Override
public void afterProcessStarted(InzBizProcessEvent event) {
//do nothing
}
@Override
public void beforeProcessCompleted(InzBizProcessEvent event) {
//do nothing
}
@Override
public void afterProcessCompleted(InzBizProcessEvent event) {
//自动新增合同预警条目
if(event.getInzBizProcess().getWorkflowState() == BizProcessState.DONE_WITH_AGREE.getValue()){
// contractWarnService.afterApproved(event.getInzBizProcess().getBizDataObject());
}
}
}
......@@ -11,7 +11,7 @@ import com.beecode.inz.query.processor.DataProcessor;
import com.beecode.inz.query.processor.DataProcessorContext;
import com.xyst.dinas.contract.service.ContractService;
public class PerformWarningProcessor implements DataProcessor {
public class ContractPerformWarningProcessor implements DataProcessor {
@Autowired
private ContractService contractService;
......@@ -21,7 +21,7 @@ public class PerformWarningProcessor implements DataProcessor {
List<RowData> rowDatas = context.getRowDatas();
for (RowData row : rowDatas) {
//合同,项目,购砂单位
UUID contractId = UUID.fromString(row.get("id").toString());
UUID contractId = UUID.fromString(row.get("billId").toString());
KObject contract = contractService.queryContractById(contractId);
row.put("projectName", contract.isNull("project") ? "" : contract.get("project").getString("name"));
row.put("contractName", contract.getString("contractName"));
......
package com.xyst.dinas.contract.query.processor;
import java.util.List;
import java.util.UUID;
import org.springframework.beans.factory.annotation.Autowired;
import com.beecode.bcp.type.KObject;
import com.beecode.inz.query.entity.RowData;
import com.beecode.inz.query.processor.DataProcessor;
import com.beecode.inz.query.processor.DataProcessorContext;
import com.xyst.dinas.contract.service.ContractService;
/**
* 合同预警设置
*
* @author Jackpot
* @date 2021年4月2日
*/
public class ContractWarnSettingProcessor implements DataProcessor {
@Autowired
private ContractService contractService;
@Override
public void process(DataProcessorContext context) {
List<RowData> rowDatas = context.getRowDatas();
for (RowData row : rowDatas) {
//合同,项目,购砂单位
UUID contractId = UUID.fromString(row.get("billId").toString());
KObject contract = contractService.queryContractById(contractId);
row.put("projectName", contract.isNull("project") ? "" : contract.get("project").getString("name"));
row.put("contractName", contract.getString("contractName"));
row.put("purchaseSandUnitName", contract.getString("purchaseSandUnitName"));
}
}
}
......@@ -16,7 +16,17 @@ public interface ContractService {
KObject queryContractInfo(UUID id);
/**
* 新增合同工作流
* @param id
*/
void submitFlow(UUID id);
/**
* 变更合同工作流
* @param id
*/
void submitFlowForUpdate(UUID id);
/**
* 根据购砂单位ID 查询所有合同列表里的项目ID列表
......
......@@ -68,6 +68,13 @@ public class ContractController {
return baseEntity;
}
@PostMapping("/contract/update/submitFlow")
public Object submitFlowForUpdate(@RequestBody BaseEntity baseEntity) {
UUID id = UUID.fromString(baseEntity.getId());
contractService.submitFlowForUpdate(id);
return baseEntity;
}
//根据购砂单位ID 查询所有合同列表里的项目ID列表
@PostMapping("/sand/user/projectList")
......
<model>
<header>
<type>inz.query.Query</type>
<package>com.xyst.dinas.contract.query</package>
<name>ContractWarnSetting</name>
<title>合同预警设置</title>
<tags></tags>
<description></description>
</header>
<content>
<customQuery id='7226bf7b-a061-4554-bef3-c7968b55fdba'>
<kclass>com.xyst.dinas.biz.datamodel.WarnSetting</kclass>
<dataProcessor>com.xyst.dinas.contract.query.processor.ContractWarnSettingProcessor</dataProcessor>
<innerScene title='全部'>
<id>fa6d9e0d-a774-4f90-b20a-b4b3d5b468a6</id>
<javaImplement>com.beecode.inz.common.scene.CommonAllScene</javaImplement>
<defaultExecute></defaultExecute>
<hide></hide>
</innerScene>
<innerScene title='已废弃'>
<id>12cb7e87-edde-4447-ac5f-53fcd2bdc163</id>
<javaImplement>com.beecode.inz.common.scene.DefaultDiscardScene</javaImplement>
<defaultExecute></defaultExecute>
<hide></hide>
</innerScene>
<field title='id'>
<name>id</name>
<type>uuid</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='version'>
<name>version</name>
<type>int</type>
<description></description>
</field>
<field title='购砂单位'>
<name>purchaseSandUnitName</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='项目名称'>
<name>projectName</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='合同名称'>
<name>contractName</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='预警指标'>
<name>target</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='实际值'>
<name>min</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='通知人员'>
<name>personnel</name>
<type>string</type>
<description></description>
</field>
<field title='创建时间'>
<name>createTime</name>
<type>datetime</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='创建人'>
<name>creator.name</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='修改时间'>
<name>modifyTime</name>
<type>datetime</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='修改人'>
<name>modifier.name</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
</customQuery>
</content>
</model>
\ No newline at end of file
......@@ -10,7 +10,7 @@
<content>
<customQuery id='7226bf7b-a061-4554-bef3-c7968b05fdba'>
<kclass>com.xyst.dinas.biz.datamodel.WarningExe</kclass>
<dataProcessor>com.xyst.dinas.contract.query.processor.PerformWarningProcessor</dataProcessor>
<dataProcessor>com.xyst.dinas.contract.query.processor.ContractPerformWarningProcessor</dataProcessor>
<innerScene title='全部'>
<id>fa6d9e0d-a774-4f90-b20a-b4b3d5b468a6</id>
<javaImplement>com.beecode.inz.common.scene.CommonAllScene</javaImplement>
......@@ -50,27 +50,9 @@
</ref>
<description></description>
</field>
<field title='购砂单位'>
<name>purchaseSandUnitName</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='项目名称'>
<name>projectName</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='合同名称'>
<name>contractName</name>
<type>string</type>
<field title='业务id'>
<name>billId</name>
<type>uuid</type>
<ref>
<type></type>
<name></name>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-sequence">
<specification>1.0</specification>
<id>b6aed80e-65b8-4a09-b6fe-80e1d4121f6b</id>
<id>d2d7ed24-6e02-4257-a4cb-ef6e797b3e91</id>
<name>com.xyst.dinas.contract.bill.ContractBill$sequence</name>
<title>合同单据$sequence</title>
<description>合同单据</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-serial">
<specification>1.0</specification>
<id>eba21aa3-e272-427b-b63a-05f1ee4e12d1</id>
<id>eb5c7a0c-3f4d-4f83-9679-eb2d1e621ef2</id>
<name>com.xyst.dinas.contract.bill.ContractBill$serial</name>
<title>合同单据$serial</title>
<description>合同单据</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-biztype">
<specification>1.0</specification>
<id>63768a7d-4403-4419-8866-1b19a7ba636e</id>
<id>bde748fe-ee10-4027-806a-de8833be4f2d</id>
<name>com.xyst.dinas.contract.bill.ContractBill</name>
<title>合同单据</title>
<description>合同单据</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/inz-query">
<specification>1.0</specification>
<id>7226bf7b-a061-4554-bef3-c7968b55fdba</id>
<name>com.xyst.dinas.contract.query.ContractWarnSetting</name>
<title>合同预警设置</title>
<define>inz.query.Query</define>
<define-version>1.0</define-version>
<dependency>com.xyst.dinas.biz.datamodel.WarnSetting</dependency>
<content>
<m:query>
<m:type>com.xyst.dinas.biz.datamodel.WarnSetting</m:type>
<m:dataProcessor>com.xyst.dinas.contract.query.processor.ContractWarnSettingProcessor</m:dataProcessor>
<m:authorityItem></m:authorityItem>
<m:innerScenes>
<m:innerScene>
<m:id>fa6d9e0d-a774-4f90-b20a-b4b3d5b468a6</m:id>
<m:title>全部</m:title>
<m:javaImplement>com.beecode.inz.common.scene.CommonAllScene</m:javaImplement>
<m:defaultExecute></m:defaultExecute>
<m:hide></m:hide>
</m:innerScene>
<m:innerScene>
<m:id>12cb7e87-edde-4447-ac5f-53fcd2bdc163</m:id>
<m:title>已废弃</m:title>
<m:javaImplement>com.beecode.inz.common.scene.DefaultDiscardScene</m:javaImplement>
<m:defaultExecute></m:defaultExecute>
<m:hide></m:hide>
</m:innerScene>
</m:innerScenes>
<m:fields>
<m:field>
<m:name>id</m:name>
<m:title>id</m:title>
<m:type>uuid</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>version</m:name>
<m:title>version</m:title>
<m:type>int</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>purchaseSandUnitName</m:name>
<m:title>购砂单位</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>projectName</m:name>
<m:title>项目名称</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>contractName</m:name>
<m:title>合同名称</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>target</m:name>
<m:title>预警指标</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>min</m:name>
<m:title>实际值</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>personnel</m:name>
<m:title>通知人员</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>createTime</m:name>
<m:title>创建时间</m:title>
<m:type>datetime</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>creator.name</m:name>
<m:title>创建人</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>modifyTime</m:name>
<m:title>修改时间</m:title>
<m:type>datetime</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>modifier.name</m:name>
<m:title>修改人</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
</m:fields>
</m:query>
</content>
</metadata>
......@@ -10,7 +10,7 @@
<content>
<m:query>
<m:type>com.xyst.dinas.biz.datamodel.WarningExe</m:type>
<m:dataProcessor>com.xyst.dinas.contract.query.processor.PerformWarningProcessor</m:dataProcessor>
<m:dataProcessor>com.xyst.dinas.contract.query.processor.ContractPerformWarningProcessor</m:dataProcessor>
<m:authorityItem></m:authorityItem>
<m:innerScenes>
<m:innerScene>
......@@ -60,29 +60,9 @@
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>purchaseSandUnitName</m:name>
<m:title>购砂单位</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>projectName</m:name>
<m:title>项目名称</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>contractName</m:name>
<m:title>合同名称</m:title>
<m:type>string</m:type>
<m:name>billId</m:name>
<m:title>业务id</m:title>
<m:type>uuid</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-sequence">
<specification>1.0</specification>
<id>da26179f-26dd-4b75-82be-3f0d89c2bbde</id>
<id>78300200-17a6-45fa-a03a-a9e020f3eaf3</id>
<name>com.xyst.dinas.oa.bill.BusinessTripApply$sequence</name>
<title>出差申请$sequence</title>
<description>出差申请</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-serial">
<specification>1.0</specification>
<id>1aef3fc7-8d69-4805-921a-014b2b4da479</id>
<id>4dd0876c-6030-4fcb-a764-132c138f8747</id>
<name>com.xyst.dinas.oa.bill.BusinessTripApply$serial</name>
<title>出差申请$serial</title>
<description>出差申请</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-biztype">
<specification>1.0</specification>
<id>4b897e00-d7f2-45de-900a-13b482a663e8</id>
<id>c87da3cc-7053-479a-b5c8-56040f33b3b8</id>
<name>com.xyst.dinas.oa.bill.BusinessTripApply</name>
<title>出差申请</title>
<description>出差申请</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-sequence">
<specification>1.0</specification>
<id>ab399931-41f4-44ef-97b5-549225bbcb6e</id>
<id>9f07d98c-e8e9-4fdd-b28c-013ce9c35642</id>
<name>com.xyst.dinas.oa.bill.ProtocolDocument$sequence</name>
<title>拟文$sequence</title>
<description>拟文</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-serial">
<specification>1.0</specification>
<id>b19e13de-1421-40f4-9452-e32c9a17a4ed</id>
<id>db684ed1-350c-434a-89b7-87f83c2c847d</id>
<name>com.xyst.dinas.oa.bill.ProtocolDocument$serial</name>
<title>拟文$serial</title>
<description>拟文</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-biztype">
<specification>1.0</specification>
<id>0196dd56-8596-49b3-be39-b829f966d244</id>
<id>f915cf5c-cdb0-4a43-a834-492e73013f4b</id>
<name>com.xyst.dinas.oa.bill.ProtocolDocument</name>
<title>拟文</title>
<description>拟文</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-sequence">
<specification>1.0</specification>
<id>2efcf528-0636-423b-8aaa-5ee582c0ce31</id>
<id>b9ac64cc-5a4d-4b37-baee-043174e5c957</id>
<name>com.xyst.dinas.oa.bill.SealBorrow$sequence</name>
<title>证章借出$sequence</title>
<description>证章借出</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-serial">
<specification>1.0</specification>
<id>ca8e5738-189a-45c7-9ba4-e49ace867002</id>
<id>9537c6f7-8529-40e5-9e54-ef95f0e40315</id>
<name>com.xyst.dinas.oa.bill.SealBorrow$serial</name>
<title>证章借出$serial</title>
<description>证章借出</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-biztype">
<specification>1.0</specification>
<id>ea1f0c09-6c6d-4ca1-999a-03b30bb9430d</id>
<id>fd6357af-ed19-4805-9693-d6633e23eace</id>
<name>com.xyst.dinas.oa.bill.SealBorrow</name>
<title>证章借出</title>
<description>证章借出</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-sequence">
<specification>1.0</specification>
<id>3b5333b7-e842-49d1-bcf4-4b9fe79aa5f6</id>
<id>47d2d069-06cb-436a-99bb-f23464f931a0</id>
<name>com.xyst.dinas.oa.bill.UseCarApply$sequence</name>
<title>用车申请$sequence</title>
<description>用车申请</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-serial">
<specification>1.0</specification>
<id>075d4d9c-f6fd-41d9-8665-4737c2b939a1</id>
<id>78642653-8d2e-4b8b-beee-8eabf3c511e9</id>
<name>com.xyst.dinas.oa.bill.UseCarApply$serial</name>
<title>用车申请$serial</title>
<description>用车申请</description>
......
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-biztype">
<specification>1.0</specification>
<id>153f1b2e-a89a-4d73-adc9-aec0643e801b</id>
<id>748f1a4f-9f07-47e4-8cf3-9bcdef563d6d</id>
<name>com.xyst.dinas.oa.bill.UseCarApply</name>
<title>用车申请</title>
<description>用车申请</description>
......
package com.xyst.dinas.production.config;
import com.beecode.amino.metadata.runtime.MetadataMech;
import com.beecode.bcp.type.KClass;
import com.beecode.bcp.type.TypeConstants;
import com.xyst.dinas.production.constant.DischargingConstant;
import com.xyst.dinas.production.internal.dao.DischargingDaoImpl;
import com.xyst.dinas.production.internal.service.DischargingServiceImpl;
import com.xyst.dinas.production.service.DischargingService;
import com.xyst.dinas.production.web.DischargingController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.core.io.ClassPathResource;
public class DischargingConfiguration {
@Autowired
@Qualifier(TypeConstants.CLASS_MECH)
private MetadataMech<KClass> typeMech;
@Bean(DischargingConstant.ENTITY)
public KClass dischargingEntity() {
return typeMech.createStaticBeanByResource(
new ClassPathResource("/com/xyst/dinas/production/datamodel/Discharging.jmx", KClass.class));
}
//DischargingDaoImpl相关bean配置
@Bean
public DischargingDaoImpl dischargingDao() {
return new DischargingDaoImpl();
}
@Bean
public DischargingService dischargingService(){
return new DischargingServiceImpl();
}
@Bean
public DischargingController dischargingController(){
return new DischargingController();
}
}
package com.xyst.dinas.production.config;
import com.beecode.amino.metadata.runtime.MetadataMech;
import com.beecode.bcp.type.KClass;
import com.beecode.bcp.type.TypeConstants;
import com.xyst.dinas.production.constant.SandMiningConstant;
import com.xyst.dinas.production.internal.dao.SandMiningDaoImpl;
import com.xyst.dinas.production.internal.service.SandMiningServiceImpl;
import com.xyst.dinas.production.service.SandMiningService;
import com.xyst.dinas.production.web.SandMiningController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.core.io.ClassPathResource;
public class SandMiningConfiguration {
@Autowired
@Qualifier(TypeConstants.CLASS_MECH)
private MetadataMech<KClass> typeMech;
@Bean(SandMiningConstant.ENTITY)
public KClass sandMiningEntity() {
return typeMech.createStaticBeanByResource(
new ClassPathResource("/com/xyst/dinas/production/datamodel/SandMining.jmx", KClass.class));
}
//SandMiningDaoImpl相关bean配置
@Bean
public SandMiningDaoImpl sandMiningDao() {
return new SandMiningDaoImpl();
}
@Bean
public SandMiningService sandMiningService(){
return new SandMiningServiceImpl();
}
@Bean
public SandMiningController sandMiningController(){
return new SandMiningController();
}
}
package com.xyst.dinas.production.constant;
public interface DischargingConstant {
/**
* 实体名
*/
String ENTITY = "com.xyst.dinas.production.datamodel.Discharging";
}
package com.xyst.dinas.production.constant;
public interface SandMiningConstant {
/**
* 实体名
*/
String ENTITY = "com.xyst.dinas.production.datamodel.SandMining";
}
package com.xyst.dinas.production.dao;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.type.KObject;
import com.beecode.inz.basis.dao.BaseDao;
import java.util.List;
import java.util.UUID;
public interface DischargingDao extends BaseDao {
KObject load(UUID id);
Page<KObject> listDischargingInfoPaging(Page<KObject> page, Integer stationStatus);
UUID create(KObject kObject);
void deleteById(UUID id);
List<KObject> getByCodeNum(String name, UUID id);
void modify(KObject kobject);
}
package com.xyst.dinas.production.dao;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.type.KObject;
import com.beecode.inz.basis.dao.BaseDao;
import java.util.List;
import java.util.UUID;
public interface SandMiningDao extends BaseDao {
KObject load(UUID id);
Page<KObject> listSandMiningInfoPaging(Page<KObject> page, Integer stationStatus);
UUID create(KObject kObject);
void deleteById(UUID id);
List<KObject> getByCodeNum(String name, UUID id);
void modify(KObject kobject);
}
package com.xyst.dinas.production.internal.dao;
import com.beecode.amino.core.Amino;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.core.context.AminoContextHolder;
import com.beecode.bcp.type.KClass;
import com.beecode.bcp.type.KObject;
import com.beecode.inz.basis.internal.dao.AbstractBaseDao;
import com.xyst.dinas.biz.dao.DinasTypeDao;
import com.xyst.dinas.production.constant.DischargingConstant;
import com.xyst.dinas.production.dao.DischargingDao;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate5.HibernateTemplate;
import java.util.Date;
import java.util.List;
import java.util.UUID;
/**
* @author scol
*/
public class DischargingDaoImpl extends AbstractBaseDao implements DischargingDao, DischargingConstant {
@Autowired
private HibernateTemplate template;
@Autowired
private DinasTypeDao dinasTypeDao;
@Override
public KObject load(UUID id) {
return (KObject) template.load(ENTITY, id);
}
@Override
public Page<KObject> listDischargingInfoPaging(Page<KObject> page, Integer dischargingStatus) {
KClass bean = Amino.getStaticMetadataContext().getBean(DischargingConstant.ENTITY, KClass.class);
DetachedCriteria detachedCriteria = DetachedCriteria.forEntityName(bean.getName());
detachedCriteria.add(Restrictions.eq("del", false));
if(null!=dischargingStatus){
detachedCriteria.add(Restrictions.eq("status", dischargingStatus));
}
KObject currentLoginRegionalCompany = dinasTypeDao.getCurrentLoginRegionalCompany();
detachedCriteria.add(Restrictions.eq("regionalCompany.id",currentLoginRegionalCompany.getUuid("id")));
detachedCriteria.addOrder(Order.desc("sortOrder"));
int offset = page.getPageSize() * (page.getPageNo() - 1);
page.setTotal(template.findByCriteria(detachedCriteria).size());
List<KObject> list = (List<KObject>) template.findByCriteria(detachedCriteria,offset,page.getPageSize());
page.setDatas(list);
return page;
}
@Override
public List<KObject> getByCodeNum(String permitCode, UUID id) {
KClass bean = Amino.getStaticMetadataContext().getBean(DischargingConstant.ENTITY, KClass.class);
DetachedCriteria detachedCriteria = DetachedCriteria.forEntityName(bean.getName());
KObject currentLoginRegionalCompany = dinasTypeDao.getCurrentLoginRegionalCompany();
detachedCriteria.add(Restrictions.eq("regionalCompany.id",currentLoginRegionalCompany.getUuid("id")));
detachedCriteria.add(Restrictions.eq("del", false));
detachedCriteria.add(Restrictions.eq("permitCode", permitCode));
if(id!=null){
detachedCriteria.add(Restrictions.ne("id", id));
}
return (List<KObject>) template.findByCriteria(detachedCriteria);
}
@Override
public void modify(KObject kobject) {
KObject id = load(kobject.getUuid("id"));
kobject.set("creator",id.get("creator"));
kobject.set("createTime",id.getDate("createTime"));
KObject staff = AminoContextHolder.getContext().getStaff();
kobject.set("regionalCompany", dinasTypeDao.getCurrentLoginRegionalCompany());
kobject.set("modifyTime",new Date());
kobject.set("modifier",staff);
kobject.set("del",false);
template.merge(kobject);
}
@Override
public UUID create(KObject kObject) {
KObject staff = AminoContextHolder.getContext().getStaff();
// kObject.set("department", staff.get("department"));
if(null==kObject.getUuid("id")){
kObject.set("id",UUID.randomUUID());
}
kObject.set("regionalCompany", dinasTypeDao.getCurrentLoginRegionalCompany());
kObject.set("creator",staff);
kObject.set("createTime", new Date());
kObject.set("del",false);
return ((UUID)template.save(kObject));
}
@Override
public void deleteById(UUID id) {
KObject staff = AminoContextHolder.getContext().getStaff();
KObject kobject = (KObject) template.load(ENTITY, id);
kobject.set("modifyTime",new Date());
kobject.set("modifier",staff);
kobject.set("del",true);
template.update(kobject);
}
/**
* 抽象方法,需要实现类提供HibernateTemplate
*
* @return HibernateTemplate
*/
@Override
protected HibernateTemplate getHibernateTemplate() {
return template;
}
/**
* 抽象方法,需要实现类提供当前ModelName
*
* @return String
*/
@Override
protected String getModelName() {
return DischargingConstant.ENTITY;
}
}
package com.xyst.dinas.production.internal.dao;
import com.beecode.amino.core.Amino;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.core.context.AminoContextHolder;
import com.beecode.bcp.type.KClass;
import com.beecode.bcp.type.KObject;
import com.beecode.inz.basis.internal.dao.AbstractBaseDao;
import com.xyst.dinas.biz.dao.DinasTypeDao;
import com.xyst.dinas.production.constant.SandMiningConstant;
import com.xyst.dinas.production.dao.SandMiningDao;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate5.HibernateTemplate;
import java.util.Date;
import java.util.List;
import java.util.UUID;
/**
* @author scol
*/
public class SandMiningDaoImpl extends AbstractBaseDao implements SandMiningDao, SandMiningConstant {
@Autowired
private HibernateTemplate template;
@Autowired
private DinasTypeDao dinasTypeDao;
@Override
public KObject load(UUID id) {
return (KObject) template.load(ENTITY, id);
}
@Override
public Page<KObject> listSandMiningInfoPaging(Page<KObject> page, Integer sandMiningStatus) {
KClass bean = Amino.getStaticMetadataContext().getBean(SandMiningConstant.ENTITY, KClass.class);
DetachedCriteria detachedCriteria = DetachedCriteria.forEntityName(bean.getName());
detachedCriteria.add(Restrictions.eq("del", false));
if(null!=sandMiningStatus){
detachedCriteria.add(Restrictions.eq("status", sandMiningStatus));
}
KObject currentLoginRegionalCompany = dinasTypeDao.getCurrentLoginRegionalCompany();
detachedCriteria.add(Restrictions.eq("regionalCompany.id",currentLoginRegionalCompany.getUuid("id")));
detachedCriteria.addOrder(Order.desc("sortOrder"));
int offset = page.getPageSize() * (page.getPageNo() - 1);
page.setTotal(template.findByCriteria(detachedCriteria).size());
List<KObject> list = (List<KObject>) template.findByCriteria(detachedCriteria,offset,page.getPageSize());
page.setDatas(list);
return page;
}
@Override
public List<KObject> getByCodeNum(String permitCode, UUID id) {
KClass bean = Amino.getStaticMetadataContext().getBean(SandMiningConstant.ENTITY, KClass.class);
DetachedCriteria detachedCriteria = DetachedCriteria.forEntityName(bean.getName());
KObject currentLoginRegionalCompany = dinasTypeDao.getCurrentLoginRegionalCompany();
detachedCriteria.add(Restrictions.eq("regionalCompany.id",currentLoginRegionalCompany.getUuid("id")));
detachedCriteria.add(Restrictions.eq("del", false));
detachedCriteria.add(Restrictions.eq("permitCode", permitCode));
if(id!=null){
detachedCriteria.add(Restrictions.ne("id", id));
}
return (List<KObject>) template.findByCriteria(detachedCriteria);
}
@Override
public void modify(KObject kobject) {
KObject id = load(kobject.getUuid("id"));
kobject.set("creator",id.get("creator"));
kobject.set("createTime",id.getDate("createTime"));
KObject staff = AminoContextHolder.getContext().getStaff();
kobject.set("regionalCompany", dinasTypeDao.getCurrentLoginRegionalCompany());
kobject.set("modifyTime",new Date());
kobject.set("modifier",staff);
kobject.set("del",false);
template.merge(kobject);
}
@Override
public UUID create(KObject kObject) {
KObject staff = AminoContextHolder.getContext().getStaff();
// kObject.set("department", staff.get("department"));
if(null==kObject.getUuid("id")){
kObject.set("id",UUID.randomUUID());
}
kObject.set("regionalCompany", dinasTypeDao.getCurrentLoginRegionalCompany());
kObject.set("creator",staff);
kObject.set("createTime", new Date());
kObject.set("del",false);
return ((UUID)template.save(kObject));
}
@Override
public void deleteById(UUID id) {
KObject staff = AminoContextHolder.getContext().getStaff();
KObject kobject = (KObject) template.load(ENTITY, id);
kobject.set("modifyTime",new Date());
kobject.set("modifier",staff);
kobject.set("del",true);
template.update(kobject);
}
/**
* 抽象方法,需要实现类提供HibernateTemplate
*
* @return HibernateTemplate
*/
@Override
protected HibernateTemplate getHibernateTemplate() {
return template;
}
/**
* 抽象方法,需要实现类提供当前ModelName
*
* @return String
*/
@Override
protected String getModelName() {
return SandMiningConstant.ENTITY;
}
}
package com.xyst.dinas.production.internal.service;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.type.KObject;
import com.xyst.dinas.production.dao.DischargingDao;
import com.xyst.dinas.production.service.DischargingService;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.UUID;
@Transactional(rollbackFor = Exception.class)
public class DischargingServiceImpl implements DischargingService {
@Autowired
private DischargingDao dischargingDao;
@Override
public Page<KObject> queryByPaging(Page<KObject> page, Integer DischargingStatus) throws Exception {
if(page.getPageNo()==0||page.getPageSize()==0) {
throw new Exception("pageSize or offset is null");
}
return dischargingDao.listDischargingInfoPaging(page,DischargingStatus);
}
@Override
public UUID addDischarging(KObject kObject) {
return dischargingDao.create(kObject);
}
@Override
public KObject getById(UUID id) {
return dischargingDao.load(id);
}
@Override
public KObject getByCodeNum(String name, UUID id) {
List<KObject> kObjects = dischargingDao.getByCodeNum(name,id);
if(CollectionUtils.isEmpty(kObjects)){
return null;
}
return kObjects.get(0);
}
@Override
public void update(KObject kobject) {
dischargingDao.modify(kobject);
}
@Override
public void deleteById(UUID id) {
dischargingDao.deleteById(id);
}
}
package com.xyst.dinas.production.internal.service;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.type.KObject;
import com.xyst.dinas.production.dao.SandMiningDao;
import com.xyst.dinas.production.service.SandMiningService;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.UUID;
@Transactional(rollbackFor = Exception.class)
public class SandMiningServiceImpl implements SandMiningService {
@Autowired
private SandMiningDao sandMiningDao;
@Override
public Page<KObject> queryByPaging(Page<KObject> page, Integer sandMiningStatus) throws Exception {
if(page.getPageNo()==0||page.getPageSize()==0) {
throw new Exception("pageSize or offset is null");
}
return sandMiningDao.listSandMiningInfoPaging(page,sandMiningStatus);
}
@Override
public UUID addSandMining(KObject kObject) {
return sandMiningDao.create(kObject);
}
@Override
public KObject getById(UUID id) {
return sandMiningDao.load(id);
}
@Override
public KObject getByCodeNum(String name, UUID id) {
List<KObject> kObjects = sandMiningDao.getByCodeNum(name,id);
if(CollectionUtils.isEmpty(kObjects)){
return null;
}
return kObjects.get(0);
}
@Override
public void update(KObject kobject) {
sandMiningDao.modify(kobject);
}
@Override
public void deleteById(UUID id) {
sandMiningDao.deleteById(id);
}
}
package com.xyst.dinas.production.service;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.type.KObject;
import java.util.UUID;
public interface DischargingService {
Page<KObject> queryByPaging(Page<KObject> page, Integer dischargingStatus) throws Exception;
UUID addDischarging(KObject kObject);
KObject getById(UUID id);
KObject getByCodeNum(String name, UUID id);
void update(KObject kobject);
void deleteById(UUID id);
}
package com.xyst.dinas.production.service;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.type.KObject;
import java.util.UUID;
public interface SandMiningService {
Page<KObject> queryByPaging(Page<KObject> page, Integer sandMiningStatus) throws Exception;
UUID addSandMining(KObject kObject);
KObject getById(UUID id);
KObject getByCodeNum(String name, UUID id);
void update(KObject kobject);
void deleteById(UUID id);
}
package com.xyst.dinas.production.task;
import com.beecode.amino.metadata.context.ApplicationMetadataContext;
import com.beecode.amino.metadata.runtime.ServiceInitializer;
import com.beecode.bap.scheduler.entity.ScheduleDetail;
import com.beecode.bap.scheduler.service.ScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Optional;
public class SandMiningExpiredSchedule implements ServiceInitializer {
@Autowired
private ScheduleService scheduleService;
private String SAND_MINING_EXPIRED_TASK = "SandMiningExpiredTask";
@Override
public void init(ApplicationMetadataContext applicationMetadataContext) {
Optional<ScheduleDetail> byName = scheduleService.findByName(SAND_MINING_EXPIRED_TASK);
if(byName.isPresent()){
}
}
}
package com.xyst.dinas.production.task;
import com.beecode.bap.scheduler.core.Task;
import com.beecode.bap.scheduler.core.TaskContext;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @author scol
*/
public class SandMiningExpiredTask implements Task {
@Override
public void execute(TaskContext taskContext) {
}
}
package com.xyst.dinas.production.web;
import com.beecode.amino.core.Amino;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.type.KClass;
import com.beecode.bcp.type.KObject;
import com.beecode.bcp.type.json.JSONObjectUtils;
import com.beecode.inz.basis.team.pojo.ResponseObj;
import com.beecode.nlib.utils.StringUtils;
import com.xyst.dinas.production.constant.DischargingConstant;
import com.xyst.dinas.production.service.DischargingService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.UUID;
/**
* @author scol
*/
@RestController()
@RequestMapping(value="/production/discharging")
public class DischargingController {
private static final Logger logger = LoggerFactory.getLogger(DischargingController.class);
@Autowired
private DischargingService dischargingService;
@RequestMapping(value = "list/page", method = RequestMethod.GET)
public ResponseObj getListPage(
@RequestParam(name = "pageNo") Integer pageNo,
@RequestParam(name = "pageSize") Integer pageSize,
@RequestParam(name = "dischargingStatus", required = false) Integer dischargingStatus
) throws Exception {
Page<KObject> objectPage = new Page<>();
objectPage.setPageNo(pageNo);
objectPage.setPageSize(pageSize);
return ResponseObj.success("查询成功", dischargingService.queryByPaging(objectPage,dischargingStatus));
}
/**
* 新建采砂许可证
* @param body
* @return ResponseObj
*/
@PostMapping
public ResponseObj create(@RequestBody String body){
KObject kobject = JSONObjectUtils.toObject(body,Amino.getApplicationMetadataContext().getBean(DischargingConstant.ENTITY, KClass.class));
if(kobject.getUuid("id") == null){
return ResponseObj.error(400,"'id' must be not null!");
}
UUID id = dischargingService.addDischarging(kobject);
return ResponseObj.success("保存成功", id);
}
/**
* 修改采砂许可证
* @param body 采砂许可证json
* @return
*/
@PutMapping
public ResponseObj update(@RequestBody String body){
KObject kobject = JSONObjectUtils.toObject(body,Amino.getApplicationMetadataContext().getBean(DischargingConstant.ENTITY, KClass.class));
if(StringUtils.isEmpty(kobject.getString("DischargingName"))){
return ResponseObj.error(400,"采砂许可证编号不能为空");
}
if(StringUtils.isEmpty(kobject.getString("DischargingAddress"))){
return ResponseObj.error(400,"采砂许可证地址不能为空");
}
if(StringUtils.isEmpty(kobject.getString("DischargingCoordinate"))){
return ResponseObj.error(400,"坐标点不能为空");
}
if(StringUtils.isEmpty(kobject.getString("linkMan"))){
return ResponseObj.error(400,"联系人不能为空");
}
if(StringUtils.isEmpty(kobject.getString("telephone"))){
return ResponseObj.error(400,"联系人电话不能为空");
}
if(kobject.getUuid("id") == null){
return ResponseObj.error(400,"'id' must be not null!");
}
dischargingService.update(kobject);
return ResponseObj.success("修改成功");
}
/**
* 根据id获取采砂许可证
* @param id
* @return
*/
@GetMapping("/{id}")
public ResponseObj getById(@PathVariable("id") UUID id){
if(id == null){
return ResponseObj.error(400,"'id' must be not null!");
}
KObject discharging = dischargingService.getById(id);
return ResponseObj.success("获取成功",discharging);
}
/**
* 根据Id删除采砂许可证
* @param id
* @return
*/
@DeleteMapping("/{id}")
public ResponseObj deleteById(@PathVariable("id") UUID id){
if(id == null){
return ResponseObj.error(400,"'id' must be not null!");
}
dischargingService.deleteById(id);
return ResponseObj.success("删除成功");
}
/**
* 查询是否有重名
* @param codeNum
* @return
*/
@GetMapping("/validateCodeNum")
public ResponseObj validateName(@RequestParam("codeNum") String codeNum,@RequestParam(value = "id",required = false) UUID id){
if(StringUtils.isEmpty(codeNum)){
return ResponseObj.error(400,"采砂许可证编号不能为空");
}
KObject kObject = dischargingService.getByCodeNum(codeNum,id);
if(kObject != null){
return ResponseObj.error("采砂许可证编号已存在!");
}
return ResponseObj.success();
}
}
\ No newline at end of file
package com.xyst.dinas.production.web;
import com.beecode.amino.core.Amino;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.type.KClass;
import com.beecode.bcp.type.KObject;
import com.beecode.bcp.type.json.JSONObjectUtils;
import com.beecode.inz.basis.team.pojo.ResponseObj;
import com.beecode.nlib.utils.StringUtils;
import com.xyst.dinas.production.constant.SandMiningConstant;
import com.xyst.dinas.production.service.SandMiningService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.UUID;
/**
* @author scol
*/
@RestController()
@RequestMapping(value="/production/sandMining")
public class SandMiningController {
private static final Logger logger = LoggerFactory.getLogger(SandMiningController.class);
@Autowired
private SandMiningService sandMiningService;
@RequestMapping(value = "list/page", method = RequestMethod.GET)
public ResponseObj getListPage(
@RequestParam(name = "pageNo") Integer pageNo,
@RequestParam(name = "pageSize") Integer pageSize,
@RequestParam(name = "sandMiningStatus", required = false) Integer SandMiningStatus
) throws Exception {
Page<KObject> objectPage = new Page<>();
objectPage.setPageNo(pageNo);
objectPage.setPageSize(pageSize);
return ResponseObj.success("查询成功",sandMiningService.queryByPaging(objectPage,SandMiningStatus));
}
/**
* 新建采砂许可证
* @param body
* @return ResponseObj
*/
@PostMapping
public ResponseObj create(@RequestBody String body){
KObject kobject = JSONObjectUtils.toObject(body,Amino.getApplicationMetadataContext().getBean(SandMiningConstant.ENTITY, KClass.class));
if(StringUtils.isEmpty(kobject.getString("SandMiningName"))){
return ResponseObj.error(400,"采砂许可证编号不能为空");
}
if(StringUtils.isEmpty(kobject.getString("SandMiningAddress"))){
return ResponseObj.error(400,"采砂许可证地址不能为空");
}
if(StringUtils.isEmpty(kobject.getString("SandMiningCoordinate"))){
return ResponseObj.error(400,"坐标点不能为空");
}
if(StringUtils.isEmpty(kobject.getString("linkMan"))){
return ResponseObj.error(400,"联系人不能为空");
}
if(StringUtils.isEmpty(kobject.getString("telephone"))){
return ResponseObj.error(400,"联系人电话不能为空");
}
if(kobject.getUuid("id") == null){
return ResponseObj.error(400,"'id' must be not null!");
}
UUID id = sandMiningService.addSandMining(kobject);
return ResponseObj.success("保存成功", id);
}
/**
* 修改采砂许可证
* @param body 采砂许可证json
* @return
*/
@PutMapping
public ResponseObj update(@RequestBody String body){
KObject kobject = JSONObjectUtils.toObject(body,Amino.getApplicationMetadataContext().getBean(SandMiningConstant.ENTITY, KClass.class));
if(StringUtils.isEmpty(kobject.getString("SandMiningName"))){
return ResponseObj.error(400,"采砂许可证编号不能为空");
}
if(StringUtils.isEmpty(kobject.getString("SandMiningAddress"))){
return ResponseObj.error(400,"采砂许可证地址不能为空");
}
if(StringUtils.isEmpty(kobject.getString("SandMiningCoordinate"))){
return ResponseObj.error(400,"坐标点不能为空");
}
if(StringUtils.isEmpty(kobject.getString("linkMan"))){
return ResponseObj.error(400,"联系人不能为空");
}
if(StringUtils.isEmpty(kobject.getString("telephone"))){
return ResponseObj.error(400,"联系人电话不能为空");
}
if(kobject.getUuid("id") == null){
return ResponseObj.error(400,"'id' must be not null!");
}
sandMiningService.update(kobject);
return ResponseObj.success("修改成功");
}
/**
* 根据id获取采砂许可证
* @param id
* @return
*/
@GetMapping("/{id}")
public ResponseObj getById(@PathVariable("id") UUID id){
if(id == null){
return ResponseObj.error(400,"'id' must be not null!");
}
KObject SandMining = sandMiningService.getById(id);
return ResponseObj.success("获取成功",SandMining);
}
/**
* 根据Id删除采砂许可证
* @param id
* @return
*/
@DeleteMapping("/{id}")
public ResponseObj deleteById(@PathVariable("id") UUID id){
if(id == null){
return ResponseObj.error(400,"'id' must be not null!");
}
sandMiningService.deleteById(id);
return ResponseObj.success("删除成功");
}
/**
* 查询是否有重名
* @param codeNum
* @return
*/
@GetMapping("/validateCodeNum")
public ResponseObj validateName(@RequestParam("codeNum") String codeNum,@RequestParam(value = "id",required = false) UUID id){
if(StringUtils.isEmpty(codeNum)){
return ResponseObj.error(400,"采砂许可证编号不能为空");
}
KObject kObject = sandMiningService.getByCodeNum(codeNum,id);
if(kObject != null){
return ResponseObj.error("采砂许可证编号已存在!");
}
return ResponseObj.success();
}
}
\ No newline at end of file
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=
\ No newline at end of file
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.xyst.dinas.production.config.SandMiningConfiguration,\
com.xyst.dinas.production.config.DischargingConfiguration
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-sequence">
<specification>1.0</specification>
<id>793a8da2-d9f6-406c-8568-8463c1b5d2ea</id>
<name>com.xyst.dinas.production.bill.Discharging$sequence</name>
<title>接驳管理$sequence</title>
<description>接驳管理</description>
<define>bcp.sequence</define>
<define-version>1.0</define-version>
<content>
<m:sequence>
<m:start-with>0</m:start-with>
<m:increment>1</m:increment>
<m:max>99999</m:max>
<m:min>0</m:min>
<m:cycle>true</m:cycle>
<m:cache-size>10</m:cache-size>
</m:sequence>
</content>
</metadata>
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-serial">
<specification>1.0</specification>
<id>ad676c88-4172-498d-b4fc-fc9ca806b2b1</id>
<name>com.xyst.dinas.production.bill.Discharging$serial</name>
<title>采砂许可$serial</title>
<description>采砂许可</description>
<define>bcp.serial</define>
<define-version>1.0</define-version>
<dependency>com.xyst.dinas.production.datamodel.Discharging</dependency>
<dependency>com.xyst.dinas.production.bill.Discharging$sequence</dependency>
<content>
<m:serial>
<m:input>com.xyst.dinas.production.datamodel.Discharging</m:input>
<m:functionLibrarys/>
<m:segments>
<m:literal>
<m:value>DC</m:value>
</m:literal>
<m:sequence>
<m:length>5</m:length>
<m:pad-direction>left</m:pad-direction>
<m:pad-string>0</m:pad-string>
<m:key>com.xyst.dinas.production.bill.Discharging$serial</m:key>
<m:sequenceName>com.xyst.dinas.production.bill.Discharging$sequence</m:sequenceName>
</m:sequence>
</m:segments>
</m:serial>
</content>
</metadata>
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-biztype">
<specification>1.0</specification>
<id>0b47b2c0-b35e-4edb-9e3a-1881fb693fcb</id>
<name>com.xyst.dinas.production.bill.Discharging</name>
<title>接驳管理</title>
<description>接驳管理</description>
<define>bcp.biz.Biztype</define>
<define-version>1.0</define-version>
<dependency>com.xyst.dinas.production.bill.Discharging$serial</dependency>
<dependency>com.xyst.dinas.production.datamodel.Discharging</dependency>
<dependency>com.beecode.bap.biztrait.BasicBillBiztrait</dependency>
<content>
<m:biztype>
<m:type>com.xyst.dinas.production.datamodel.Discharging</m:type>
<m:inheritances>
<m:inheritance>
<m:biztrait>com.beecode.bap.biztrait.BasicBillBiztrait</m:biztrait>
<m:config type="xml">
<m:content>&lt;billBasictraitConfig&gt;&lt;formulas/&gt;&lt;parents&gt;&lt;parent&gt;&lt;billCodeConfig&gt;&lt;serialName&gt;com.xyst.dinas.production.bill.Discharging$serial&lt;/serialName&gt;&lt;buildTime&gt;add&lt;/buildTime&gt;&lt;/billCodeConfig&gt;&lt;/parent&gt;&lt;parent&gt;&lt;workflowConfig&gt;&lt;workflow&gt;&lt;/workflow&gt;&lt;/workflowConfig&gt;&lt;/parent&gt;&lt;parent&gt;&lt;printConfig&gt;&lt;templates/&gt;&lt;/printConfig&gt;&lt;/parent&gt;&lt;/parents&gt;&lt;functionLibrarys/&gt;&lt;/billBasictraitConfig&gt;</m:content>
</m:config>
</m:inheritance>
</m:inheritances>
<m:methodAuthorityItems/>
</m:biztype>
</content>
</metadata>
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-sequence">
<specification>1.0</specification>
<id>8933e1ff-397e-4e72-b883-058fd6d7c91f</id>
<name>com.xyst.dinas.production.bill.SandMining$sequence</name>
<title>采砂许可$sequence</title>
<description>采砂许可</description>
<define>bcp.sequence</define>
<define-version>1.0</define-version>
<content>
<m:sequence>
<m:start-with>0</m:start-with>
<m:increment>1</m:increment>
<m:max>99999</m:max>
<m:min>0</m:min>
<m:cycle>true</m:cycle>
<m:cache-size>10</m:cache-size>
</m:sequence>
</content>
</metadata>
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-serial">
<specification>1.0</specification>
<id>db0a707e-70e1-4e8f-a1b3-2d6580829f66</id>
<name>com.xyst.dinas.production.bill.SandMining$serial</name>
<title>采砂许可$serial</title>
<description>采砂许可</description>
<define>bcp.serial</define>
<define-version>1.0</define-version>
<dependency>com.xyst.dinas.production.datamodel.SandMining</dependency>
<dependency>com.xyst.dinas.production.bill.SandMining$sequence</dependency>
<content>
<m:serial>
<m:input>com.xyst.dinas.production.datamodel.SandMining</m:input>
<m:functionLibrarys/>
<m:segments>
<m:literal>
<m:value>SP</m:value>
</m:literal>
<m:sequence>
<m:length>5</m:length>
<m:pad-direction>left</m:pad-direction>
<m:pad-string>0</m:pad-string>
<m:key>com.xyst.dinas.production.bill.SandMining$serial</m:key>
<m:sequenceName>com.xyst.dinas.production.bill.SandMining$sequence</m:sequenceName>
</m:sequence>
</m:segments>
</m:serial>
</content>
</metadata>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment