2020-09-10

            urlConnection.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
<dependencies>
        <dependency>
            <groupId>org.springblade</groupId>
            <artifactId>tfcloud-weave-api</artifactId>
            <version>2.0.1.RELEASE</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springblade</groupId>
            <artifactId>blade-starter-mybatis</artifactId>
            <version>${bladex.tool.version}</version>
        </dependency>
        <dependency>
            <groupId>com.tianfu</groupId>
            <artifactId>tianfu-system-agent-api</artifactId>
            <version>${bladex.project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springblade</groupId>
            <artifactId>blade-common</artifactId>
            <version>${bladex.project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springblade</groupId>
            <artifactId>blade-core-boot</artifactId>
            <version>${bladex.tool.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springblade</groupId>
            <artifactId>blade-starter-swagger</artifactId>
            <version>${bladex.tool.version}</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>${swagger.version}</version>
            <!--<version>2.6.1</version>-->
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <!--<version>2.6.1</version>-->
            <version>${swagger.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springblade</groupId>
            <artifactId>blade-system-api</artifactId>
            <version>${bladex.project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springblade</groupId>
            <artifactId>blade-user-api</artifactId>
            <version>${bladex.project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springblade</groupId>
            <artifactId>blade-core-auto</artifactId>
            <version>${bladex.tool.version}</version>
            <scope>provided</scope>
        </dependency>
        <!-- drools lib -->
        <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-compiler</artifactId>
            <version>7.5.0.Final</version>
        </dependency>

        <dependency>
            <groupId>org.kie</groupId>
            <artifactId>kie-api</artifactId>
            <version>7.5.0.Final</version>
        </dependency>
        <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-core</artifactId>
            <version>7.5.0.Final</version>
        </dependency>

        <!-- Quartz -->
        <!-- https://mvnrepository.com/artifact/org.quartz-scheduler/quartz -->
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
            <version>2.3.1</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.springframework.data/spring-data-mongodb -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-mongodb</artifactId>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.spring4all/mongodb-plus-spring-boot-starter -->
        <dependency>
            <groupId>com.spring4all</groupId>
            <artifactId>mongodb-plus-spring-boot-starter</artifactId>
            <version>1.0.0.RELEASE</version>
        </dependency>

        <!--mybatis主从数据源切换依赖-->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
            <version>2.5.6</version>
        </dependency>
        <dependency>
            <groupId>org.springblade</groupId>
            <artifactId>blade-system</artifactId>
            <version>2.0.1.RELEASE</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>RELEASE</version>
            <scope>compile</scope>
        </dependency>
        <!--<dependency>-->
            <!--<groupId>ch.qos.logback</groupId>-->
            <!--<artifactId>logback-classic</artifactId>-->
        <!--</dependency>-->
        <!--<dependency>-->
            <!--<groupId>org.slf4j</groupId>-->
            <!--<artifactId>jcl-over-slf4j</artifactId>-->
        <!--</dependency>-->
/**
	 * 公司Logo文件
	 */
	@ApiModelProperty(value = "公司Logo文件")
	private String logoFile;

	/**
	 * 营业执照文件
	 */
	@ApiModelProperty(value = "营业执照文件")
	private String licenseFile;

	/**
	 * 自定义软件名称
	 */
	@ApiModelProperty(value = "自定义软件名称")
	private String selfName;

	/**
	 * 职位
	 */
	@ApiModelProperty(value = "职位")
	private String position;

	/**
	 * 手机号码
	 */
	@ApiModelProperty(value = "手机号码")
	private String mobile;

	/**
	 * 开户银行
	 */
	@ApiModelProperty(value = "开户银行")
	private String bankName;

	/**
	 * 银行账号
	 */
	@ApiModelProperty(value = "银行账号")
	private String bankNo;

	/**
	 * 实名认证阶段
	 */
	@ApiModelProperty(value = "实名认证阶段")
	private String currProcess;

	/**
	 * ActiveMQ服务器外网地址
	 */
	@ApiModelProperty(value = "ActiveMQ服务器地址")
	private String activemqAddress;
	/**
	 * ActiveMQ服务器内网地址
	 */
	@ApiModelProperty(value = "ActiveMQ服务器内网地址")
	private String activemqAddressLocal;

	/***
	 * ActiveMQ服务端口
	 */
	@ApiModelProperty(value = "ActiveMQ服务端口")
	private Integer activemqPort;

	/***
	 * ActiveMQ服务ws端口
	 */
	@ApiModelProperty(value = "ActiveMQ服务ws端口")
	private Integer activemqPortWs;

	/**
	 * ActiveMQ用户
	 */
	@ApiModelProperty(value = "ActiveMQ用户")
	private String activemqUser;

	/**
	 * ActiveMQ密码
	 */
	@ApiModelProperty(value = "ActiveMQ密码")
	private String activemqPassword;

	/**
	 * 服务编号
	 */
	@ApiModelProperty(value = "服务编号")
	private String serverCode;
	/**
	 * 服务端口
	 */
	@ApiModelProperty(value = "服务端口")
	private String serverPort;
	//是否启用私有库
	@JsonSerialize(nullsUsing = NullSerializer.class)
	@ApiModelProperty(value = "是否启用私有库")
	private Integer isPrivateDb;
	@ApiModelProperty(value = "私有库地址")
	private String privateDbAddr;
	@ApiModelProperty(value = "mysql端口")
	private Integer mysqlPort;
	@ApiModelProperty(value = "mysql账号")
	private String mysqlUser;
	@ApiModelProperty(value = "mysql密码")
	private String mysqlPassword;
	@ApiModelProperty(value = "mongo端口")
	private Integer mongoPort;
	@ApiModelProperty(value = "mongo账号")
	private String mongoUser;
	@ApiModelProperty(value = "mongo密码")
	private String mongoPassword;
	@ApiModelProperty(value = "租户首页页面地址")
	private String homeUrl;
db.getCollection("TF_ZZ0099").createIndex({
    _time: NumberInt("-1"),
    "machine_code": "text",
    "scheme_code": "text",
    "param_code": "text"
}, {
    name: "union_indexs",background: true
})

SELECT DISTINCT
tt.*
FROM
tfshuttle.p_machine_info AS tpe
LEFT JOIN tfshuttle.m_machine_status_select AS tt ON tpe.tenant_code = tt.tenant_code
AND tpe.tenant_code=‘ZZ0092’ and tpe.machine_code=tt.machine_code

SELECT tt.shift_class, ty.curr_date AS formatDate, round(avg(ty.efficiency) * 100, 2) AS efficiency, sum(ty.meters) AS sumMaters FROM 
				(SELECT tp.curr_date, te.machine_code, tp.emp_code, tmp.`name`, tp.shift_class, tp.shift_start_date FROM tfshuttle.m_shift_emp AS tp JOIN tfshuttle.m_shift_emp_machine AS te ON tp.id = te.parent_id AND tp.tenant_code = 'ZZ0091' AND te.is_deleted = 0 AND tp.is_deleted = 0 JOIN tfshuttle.m_emp AS tmp ON tmp.tenant_code = tp.tenant_code AND tmp.is_deleted = 0 AND tmp.emp_code = tp.emp_code AND tp.curr_date BETWEEN '2020-12-06' AND '2020-12-06' GROUP BY tp.curr_date, tp.shift_class ORDER BY tp.curr_date) tt JOIN tfshuttle.m_yield_efficiency AS ty  
			 ON tt.emp_code = ty.emp_code and 	ty.curr_date = tt.curr_date and ty.process_id=30
				GROUP BY formatDate, shift_class LIMIT 0,10
select machine_code as 'empName',ROUND((sum(warpstop_time)/sum(warpstop_number))/60,2) as sumTimes from
        m_yield_efficiency
        WHERE tenant_code='ZZ0099'
        and start_time='2020-12-09 07:00:00' and dept_code='01010402'
        GROUP BY machine_code HAVING sumTimes is not null
        ORDER BY sumTimes desc LIMIT 0,10

Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJhZG1pbiIsImF2YXRhciI6Imh0dHBzOi8vZ3cuYWxpcGF5b2JqZWN0cy5jb20vem9zL3Jtc3BvcnRhbC9CaWF6ZmFueG1hbU5Sb3h4VnhrYS5wbmciLCJhdXRob3JpdGllcyI6WyJhZG1pbiJdLCJjbGllbnRfaWQiOiJzYWJlciIsInJvbGVfbmFtZSI6ImFkbWluIiwibGljZW5zZSI6InBvd2VyZWQgYnkgYmxhZGV4IiwidXNlcl9pZCI6MTE3MTIzMDYzNDQwNzk4NTE1Mywicm9sZV9pZCI6IjExNzEyMzA2MzM1MDIwMjc3NzgiLCJlbXBDb2RlIjoiRTAwMDAwMSIsInNjb3BlIjpbImFsbCJdLCJuaWNrX25hbWUiOiLnp5_miLfnrqHnkIblkZgiLCJleHAiOjE2MDY1ODM1MzEsImp0aSI6Ijg2N2VmMmEzLTU1NDEtNGQ2Zi1iYmY2LTE4YzkyZjRlMjYwZSIsImFjY291bnQiOiJhZG1pbiIsInRlbmFudF9jb2RlIjoiWlowMDg1In0.kRrcWzK4BxITHnTUVwE1LCQ8gzGGOejPQ-JuNzBbhWE

 SELECT
        curr_date accDate,
        sum(above_yarn_stopcounts)  as stop10,
        sum(below_yarn_stopcounts) as  stop20,
        sum(above_needle_stopcounts) as stop30,
        sum(below_needle_stopcounts) as stop40,
        sum(lackoil_stopcounts) as stop50,
        sum(safedoor_stopcounts) as stop60,
        sum(stop_counts) as stop100
        FROM
        m_yield_efficiency
        <where>
        <if test="startTime !='' and startTime !=null and endTime !='' and endTime !=null">
            AND curr_date between #{startTime} and #{endTime}
        </if>
        and tenant_code=#{tenantCode}
        </where>
        GROUP BY
        curr_date
SELECT DISTINCT
        ms.crop_time,
        ms.surplus_time,
        ms.tenant_code,
        ms.qty_coefficient,
        ms.job_sheet_no,
        jt.faric_code styleCode,
        jt.faric_name styleName,
        jt.roll_fixqty,
        jt.cust_name,
        ms.machine_code, `status`,
        ms.speed,
        round(ifnull(ms.efficiency,0.00), 2)*100 AS efficiency,
        IFNULL(ms.crop_fixcircles, 0) AS cropFixcircles,
        ms.weave_circles,
        IFNULL(round(ms.weave_circles / ms.qty_coefficient, 2), 0) AS cricleWeight,
        ifnull(my.weave_circles,0) as shiftCircles,
        my.weave_qty as shiftCricleWeight
        FROM
        tfweftknit.p_machine_info as ot
        LEFT JOIN
        m_machine_status as ms on ot.tenant_code=ms.tenant_code and ot.machine_code=ms.machine_code and  ot.is_deleted=0
        LEFT JOIN
        m_yield_efficiency as my
        on ms.tenant_code=my.tenant_code and ms.machine_code=my.machine_code and  my.curr_date=CURRENT_DATE()
        LEFT JOIN job_weftknit as jt on ms.tenant_code=jt.tenant_code and ms.job_sheet_no=jt.sheet_no
				and jt.real_start_time is not null and jt.real_end_time is null and jt.is_deleted=0
        WHERE ot.tenant_code ='WB0096' 
SELECT DISTINCT
	ms.crop_time,
	ms.surplus_time,
	ms.tenant_code,
	ms.qty_coefficient,
	ms.job_sheet_no,
	jt.faric_code styleCode,
	jt.faric_name styleName,
	jt.roll_fixqty,
	jt.cust_name,
	ms.machine_code,
	`status`,
	ms.speed,
	round( ifnull( ms.efficiency, 0.00 ), 2 ) * 100 AS efficiency,
	IFNULL( ms.crop_fixcircles, 0 ) AS cropFixcircles,
	ms.weave_circles,
	IFNULL( round( ms.weave_circles / ms.qty_coefficient, 2 ), 0 ) AS cricleWeight,
	ifnull( my.weave_circles, 0 ) AS shiftCircles,
	my.weave_qty AS shiftCricleWeight 
FROM
	tfweftknit.p_machine_info AS ot 
	LEFT JOIN m_machine_status AS ms ON ot.tenant_code = ms.tenant_code 
	AND ot.machine_code = ms.machine_code 
	AND ot.is_deleted = 0
	LEFT JOIN m_yield_efficiency AS my ON ms.tenant_code = my.tenant_code 
	AND ms.machine_code = my.machine_code 
	AND my.curr_date = CURRENT_DATE ( )
	LEFT JOIN job_weftknit AS jt ON ms.tenant_code = jt.tenant_code 
	AND ms.job_sheet_no = jt.sheet_no and jt.real_start_time is not null and jt.real_end_time is null
WHERE
	ot.tenant_code = 'WB0097' 
ORDER BY
	ot.machine_no ASC
EXPLAIN SELECT y.emp_code as ‘EmpCode’,tp.name,SUM(my.meters) asvaluefrom (
SELECT
m.emp_code,
me.machine_code,
m.curr_date,
m.shift_time,
m.shift_start_date
FROM
tfshuttle.m_shift_emp AS m
JOIN tfshuttle.m_shift_emp_machine AS me ON m.id = me.parent_id
AND m.is_deleted = 0
AND me.is_deleted = 0
AND m.curr_date BETWEEN2020-09-01AND2020-09-30ORDER BY m.curr_date asc ) as y JOIN tfshuttle.m_yield_efficiency as my on y.machine_code=my.machine_code and
y.curr_date=my.curr_date and y.shift_start_date=my.start_time JOIN tfshuttle.m_emp as tp on
y.emp_code=tp.emp_code
GROUP BY y.emp_code ORDER BY value desc limit 10
('101', '102', '103', '104', '105', '106', '107', '108', '201', '202', '203', '204', '205', '206', '207', '208', '301', '302', '303', '304', '305', '306', '307', '308', '401', '402', '403', '404', '405', '406', '407', '408', '501', '502', '503', '504', '505', '506', '507', '508', '601', '602', '603', '604', '605', '606', '607', '608', '701', '702', '703', '704', '705', '706', '707', '708', '801', '802', '803', '804', '805', '806', '807', '808', '901', '902', '903', '904', '905', '906', '907', '908', '1001', '1002', '1003', '1004', '1005', '1006', '1007', '1008', '1101', '1102', '1103', '1104', '1105', '1106', '1107', '1108', '1201', '1202', '1203', '1204', '1205', '1206', '1207', '1208', '1301', '1302', '1303', '1304', '1305', '1306', '1307', '1308', '1401', '1402', '1403', '1404', '1405', '1406', '1407', '1408', '1501', '1502', '1503', '1504', '1505', '1506', '1507', '1508', '1601', '1602', '1603', '1604', '1605', '1606', '1607', '1608', '1701', '1702', '1703', '1704', '1705', '1706', '1707', '1708', '1801', '1802', '1803', '1804', '1805', '1806', '1807', '1808', '1901', '1902', '1903', '1904', '1905', '1906', '1907', '1908', '2001', '2002', '2003', '2004', '2005', '2006', '2007', '2008')
Select distinct m.tenant_code,m.create_time,m.dept_code,m.machine_code,m.beam_name,m.style_name,m.weaveloom_fixlength,
j2.bar_code as jiang_bar_code,j1.jiang_end_date,j2.prod_name as jiang_style_name,j2.actual_length_qty as jiang_length_qty
from m_machine_status_select m
Left Join (
Select ja.tenant_code, ja.axis_no, MAX(ja.end_date) as jiang_end_date
from m_pre_job_weaveaxis ja 
Group By ja.tenant_code, ja.axis_no
) j1 On m.tenant_code = j1.tenant_code and m.beam_name = j1.axis_no
Left Join m_pre_job_weaveaxis j2 On m.tenant_code = j2.tenant_code and m.beam_name = j2.axis_no and j1.jiang_end_date = j2.end_date
Where 1=1
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值